Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

usdview version 22.03 crashes on startup on Mac #1780

Closed
guidoq opened this issue Feb 23, 2022 · 3 comments
Closed

usdview version 22.03 crashes on startup on Mac #1780

guidoq opened this issue Feb 23, 2022 · 3 comments

Comments

@guidoq
Copy link

guidoq commented Feb 23, 2022

Description of Issue

Loading any USD files crashes usdview

This is what I get in the console:

...
Compilation failed:

program_source:249:28: error: no matching member function for call to 'write'
textureBind_outTexture.write(data, coord);
~~~~~~~~~~~~~~~~~~~~~~~^~~~~
/System/Library/PrivateFrameworks/GPUCompiler.framework/Versions/31001/Libraries/lib/clang/31001.192/include/metal/metal_texture:2916:19: note: candidate function not viable: no known conversion from 'float4' (vector of 4 'float' values) to 'vec<half, 4>' (vector of 4 'half' values) for 1st argument
METAL_FUNC void write(vec<T, 4> color, uint2 coord, uint lod = 0) const thread METAL_VALID_LOD_ARG(lod)
^
/System/Library/PrivateFrameworks/GPUCompiler.framework/Versions/31001/Libraries/lib/clang/31001.192/include/metal/metal_texture:2893:19: note: candidate function not viable: no known conversion from 'float4' (vector of 4 'float' values) to 'vec<half, 4>' (vector of 4 'half' values) for 1st argument
METAL_FUNC void write(vec<T, 4> color, ushort2 coord, ushort lod = 0) const thread METAL_VALID_LOD_ARG(lod)
^
/System/Library/PrivateFrameworks/GPUCompiler.framework/Versions/31001/Libraries/lib/clang/31001.192/include/metal/metal_texture:2963:19: note: candidate function not viable: address space mismatch in 'this' argument ('texture2d<half, access::write>'), parameter type must be 'const device metal::texture2d<half, metal::access::write, void>'
METAL_FUNC void write(vec<T, 4> color, uint2 coord, uint lod = 0) const device METAL_VALID_LOD_ARG(lod)
^
/System/Library/PrivateFrameworks/GPUCompiler.framework/Versions/31001/Libraries/lib/clang/31001.192/include/metal/metal_texture:3011:19: note: candidate function not viable: address space mismatch in 'this' argument ('texture2d<half, access::write>'), parameter type must be 'const constant metal::texture2d<half, metal::access::write, void>'
METAL_FUNC void write(vec<T, 4> color, uint2 coord, uint lod = 0) const constant METAL_VALID_LOD_ARG(lod)
^
/System/Library/PrivateFrameworks/GPUCompiler.framework/Versions/31001/Libraries/lib/clang/31001.192/include/metal/metal_texture:2940:19: note: candidate function not viable: address space mismatch in 'this' argument ('texture2d<half, access::write>'), parameter type must be 'const device metal::texture2d<half, metal::access::write, void>'
METAL_FUNC void write(vec<T, 4> color, ushort2 coord, ushort lod = 0) const device METAL_VALID_LOD_ARG(lod)
^
/System/Library/PrivateFrameworks/GPUCompiler.framework/Versions/31001/Libraries/lib/clang/31001.192/include/metal/metal_texture:2988:19: note: candidate function not viable: address space mismatch in 'this' argument ('texture2d<half, access::write>'), parameter type must be 'const constant metal::texture2d<half, metal::access::write, void>'
METAL_FUNC void write(vec<T, 4> color, ushort2 coord, ushort lod = 0) const constant METAL_VALID_LOD_ARG(lod)
^
program_source:261:20: error: use of undeclared identifier 'HdGetSize_outTexture'; did you mean 'HdGetSize_inTexture'?
vec2 outDims = HdGetSize_outTexture();
^~~~~~~~~~~~~~~~~~~~
HdGetSize_inTexture
program_source:237:7: note: 'HdGetSize_inTexture' declared here
uint2 HdGetSize_inTexture() {
^
program_source:261:10: error: cannot initialize a variable of type 'float2' (vector of 2 'float' values) with an rvalue of type 'uint2' (vector of 2 'unsigned int' values)
vec2 outDims = HdGetSize_outTexture();
^ ~~~~~~~~~~~~~~~~~~~~~~
program_source:263:33: error: implicit conversions between vector types ('int2' (vector of 2 'int' values) and 'float2' (vector of 2 'float' values)) are not permitted
vec2 texCoords = (outCoords + vec2(0.5, 0.5)) / outDims;
^
program_source:297:11: error: cannot initialize a variable of type 'int2' (vector of 2 'int' values) with an rvalue of type 'uint2' (vector of 2 'unsigned int' values)
ivec2 inDims = HdGetSize_inTexture();
^ ~~~~~~~~~~~~~~~~~~~~~
program_source:334:22: error: cannot initialize a parameter of type 'uint2' (vector of 2 'unsigned int' values) with an lvalue of type 'int2' (vector of 2 'int' values)
HdSet_outTexture(outCoords, outColor);
^~~~~~~~~
program_source:248:29: note: passing argument to parameter 'coord' here
void HdSet_outTexture(uint2 coord, float4 data) {

@davidgyu
Copy link
Member

Hi Guido!

As a workaround for now, we recommend specifying a renderer from the command line, e.g. "usdview --renderer Embree".
22.03 does not yet have our full implementation of Hydra Storm for Metal (that's still to come), but it looks like some of the supporting code change are active and that's the source of this problem. Continuing to investigate...

@jilliene
Copy link

Filed as internal issue #USD-7233

@guidoq
Copy link
Author

guidoq commented Feb 23, 2022

Thank you for the suggestion David, the workaround works fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants