hlsl: Avoid HLSL_CLASS_OBJECT, part 2.
Merge request reports
Activity
added 12 commits
-
8d3014bf...4b0a328a - 5 commits from branch
wine:master
- 4577cefc - vkd3d-shader/hlsl: Move shader version helpers to hlsl.h.
- 839aaf16 - vkd3d-shader/hlsl: Add SM5.1 shader target strings.
- 6003bb75 - tests: Test HLSL unbounded array syntax.
- cb5d865e - vkd3d-shader/hlsl: Use hlsl_type_is_resource() for unbounded array checks.
- 55f2c2ca - tests: Add more tests for manual packing.
- c1ef154e - vkd3d-shader/hlsl: Consider any valid register reservation to invoke manual packing.
- fab57036 - vkd3d-shader/hlsl: Avoid using HLSL_CLASS_OBJECT without checking the base type.
Toggle commit list-
8d3014bf...4b0a328a - 5 commits from branch
This is failing to validate sm6 -> spirv on the last test in cbuffer.shader_test, but it doesn't fail locally, which is confusing. I don't suppose anyone has a hint?
Without knowing your exact local setup, SPIR-V validation depends on both building vkd3d-shader against SPIRV-Tools and having VKD3D_SHADER_CONFIG=force_validation in the environment when running the tests. Do you have both of those? My other guess would be subtle differences in the versions of SPIRV-Tools and/or dxcompiler between what you have locally and what's on the CI.
- Resolved by Giovanni Mascellani
- Resolved by Giovanni Mascellani
Yeah, I can see the SPIR-V validation error with SPIRV-Tools and
force_validation
:vkd3d:3746511:trace:spirv_compiler_generate_spirv Structure id 45 decorated as Block for variable in PushConstant storage class must follow standard storage buffer layout rules: member 1 at offset 64 overlaps previous member ending at offset 79 vkd3d:3746511:trace:spirv_compiler_generate_spirv %push_cb_struct = OpTypeStruct %_arr_v4float_uint_5 %_arr_uint_uint_1
This warning seems related too:
vkd3d:3746511:warn:spirv_compiler_emit_cbv_declaration Constant buffer size 76 exceeds push constant size 64.
I never read into detail our code to allocate constant buffers in SPIR-V, but problems related to the push constants are popping every now and then and make me suspect that that part needs some revising. Notice also the Mesa reduced
maxPushConstantsSize
to 128 for Intel GPUs some time ago, which is often less than we assume is available.It's a slightly obscure failure that happens when we pass less uniforms to the shader than it asks for. The validation failure is because vkd3d puts an internal uniform after the count in the root signature, but the count comes from the shader runner. We don't currently have a good way to get the required count from the shader via reflection.
We should indeed probably stop using push constants, but I'll leave that to a separate patch.
added 7 commits
- a6555abf - vkd3d-shader/hlsl: Use hlsl_version_ge() when checking for unbounded arrays.
- a3f82d29 - vkd3d-shader/hlsl: Add SM5.1 shader target strings.
- ac1ce2fe - tests: Test HLSL unbounded array syntax.
- 900c33c4 - vkd3d-shader/hlsl: Use hlsl_type_is_resource() for unbounded array checks.
- 749845fd - tests: Add more tests for manual packing.
- f9c705a7 - vkd3d-shader/hlsl: Consider any valid register reservation to invoke manual packing.
- 927a081d - vkd3d-shader/hlsl: Avoid using HLSL_CLASS_OBJECT without checking the base type.
Toggle commit list- Resolved by Giovanni Mascellani
- Resolved by Giovanni Mascellani
added 5 commits
- 759e3bf3 - tests: Test HLSL unbounded array syntax.
- 44214ad7 - vkd3d-shader/hlsl: Use hlsl_type_is_resource() for unbounded array checks.
- c761035a - tests: Add more tests for manual packing.
- f02a8874 - vkd3d-shader/hlsl: Consider any valid register reservation to invoke manual packing.
- 315598d5 - vkd3d-shader/hlsl: Avoid using HLSL_CLASS_OBJECT without checking the base type.
Toggle commit list