We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Describe the bug BX_CHECK in shader_dxbc.cpp fails:
shader_dxbc.cpp
void parse(const DxbcShader& _src, DxbcParseFn _fn, void* _userData, bx::Error* _err) { BX_ERROR_SCOPE(_err); bx::MemoryReader reader(_src.byteCode.data(), uint32_t(_src.byteCode.size() ) ); for (uint32_t token = 0, numTokens = uint32_t(_src.byteCode.size() / sizeof(uint32_t) ); token < numTokens;) { DxbcInstruction instruction; uint32_t size = read(&reader, instruction, _err); BX_CHECK(size/4 == instruction.length, "read %d, expected %d", size/4, instruction.length); BX_UNUSED(size); //Fails HERE
Shaders to reproduce: varying.def.sc
vec3 a_position : POSITION; vec4 a_normal : NORMAL; vec3 v_normal : NORMAL = vec3(0.0, 0.0, 1.0);
vertex
$input a_position, a_normal $output v_normal #include "common.sh" void main() { v_normal = a_normal; gl_Position = mul(u_modelViewProj, vec4(a_position, 1.0) );; }
fragment
$input v_normal #include "common.sh" void main() { vec3 normal = normalize(v_normal); //problematic line gl_FragColor = vec4(normal,1); }
Binary Shaders: shaders.zip
Compilation commands: shaderc.exe -f "vs_default.sc" -o "vertex.bin" -i "bgfx.cmake/bgfx/src" --type vertex --platform windows --varyingdef default_varying.def.sc" --profile vs_5_0
shaderc.exe -f "vs_default.sc" -o "vertex.bin" -i "bgfx.cmake/bgfx/src" --type vertex --platform windows --varyingdef default_varying.def.sc" --profile vs_5_0
shaderc.exe -f "fs_default.sc" -o "fragment.bin" -i "bgfx.cmake/bgfx/src" --type fragment --platform windows --varyingdef "default_varying.def.sc" --profile ps_5_0
To Reproduce Steps to reproduce the behavior:
Expected behavior The shader should execute without crashing, or fail to compile
Additional context OS: Windows 10, Visual Studio 2019 bgfx backend: DirectX11
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Describe the bug
BX_CHECK in
shader_dxbc.cpp
fails:Shaders to reproduce:
varying.def.sc
vertex
fragment
Binary Shaders:
shaders.zip
Compilation commands:
shaderc.exe -f "vs_default.sc" -o "vertex.bin" -i "bgfx.cmake/bgfx/src" --type vertex --platform windows --varyingdef default_varying.def.sc" --profile vs_5_0
shaderc.exe -f "fs_default.sc" -o "fragment.bin" -i "bgfx.cmake/bgfx/src" --type fragment --platform windows --varyingdef "default_varying.def.sc" --profile ps_5_0
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The shader should execute without crashing, or fail to compile
Additional context
OS: Windows 10, Visual Studio 2019
bgfx backend: DirectX11
The text was updated successfully, but these errors were encountered: