Skip to content

Commit

Permalink
Merge Changes from ogs/v22.08 to adsk/release/22.08 (PixarAnimationSt…
Browse files Browse the repository at this point in the history
…udios#140)

* Fix warning on glBindTextures
* Fix build break with custom install path
* Fix build break on Linux with clang11
  • Loading branch information
zhangha182 authored and GitHub Enterprise committed Sep 23, 2022
1 parent 45f7e52 commit 0f1b54b
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pxr/base/arch/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ if (PXR_BUILD_TESTS AND WIN32)
# place that .pdbs will be searched for, other than the baked-in absolute
# path in the windows binary
install(
FILES ${CMAKE_CURRENT_BINARY_DIR}/testArchStackTrace.pdb
FILES $<TARGET_PDB_FILE:testArchStackTrace>
DESTINATION tests/ctest/testArchStackTrace
CONFIGURATIONS Debug RelWithDebInfo
)
Expand Down
6 changes: 6 additions & 0 deletions pxr/imaging/hgiGL/resourceBindings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,12 @@ HgiGLResourceBindings::BindResources()
// Texture sampling (for graphics pipeline)
HgiTextureHandle const& texHandle = texDesc.textures.front();
HgiGLTexture* glTex = static_cast<HgiGLTexture*>(texHandle.Get());

// Fix for setting glBindTextures with texture names,
// that hadn't previously been created by being bound via glBindTexture.
// Note that because glBindTextures cannot create new textures (even if a name passed has been previously generated by call to glGenTextures),
// names passed to glBindTextures must have been bound at least once previously via a call to glBindTexture.
// https://www.khronos.org/registry/OpenGL-Refpages/gl4/html/glBindTextures.xhtml
auto textureId = glTex->GetTextureId();
hasTex = glIsTexture(textureId);
if (!hasTex)
Expand Down
1 change: 1 addition & 0 deletions pxr/usd/sdr/shaderNode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
#include "pxr/usd/sdr/shaderNode.h"
#include "pxr/usd/sdr/shaderProperty.h"

#include <algorithm>
#include <unordered_set>

PXR_NAMESPACE_OPEN_SCOPE
Expand Down

0 comments on commit 0f1b54b

Please sign in to comment.