vkd3d: Use shader VISIBILITY_ALL for 32bit constants when using vk_heaps.
Fixes validation errors about the stage flags of push constant ranges.
Merge request reports
Activity
- Resolved by navi
Thanks! How would you feel about this alternative fix?
@@ -635,13 +635,15 @@ static HRESULT d3d12_root_signature_init_push_constants(struct d3d12_root_signat for (i = 0; i < desc->NumParameters; ++i) { const D3D12_ROOT_PARAMETER *p = &desc->pParameters[i]; + D3D12_SHADER_VISIBILITY visibility; + if (p->ParameterType != D3D12_ROOT_PARAMETER_TYPE_32BIT_CONSTANTS) continue; - VKD3D_ASSERT(p->ShaderVisibility <= D3D12_SHADER_VISIBILITY_PIXEL); - push_constants[p->ShaderVisibility].stageFlags = use_vk_heaps ? VK_SHADER_STAGE_ALL - : stage_flags_from_visibility(p->ShaderVisibility); - push_constants[p->ShaderVisibility].size += align(p->u.Constants.Num32BitValues, 4) * sizeof(uint32_t); + visibility = use_vk_heaps ? D3D12_SHADER_VISIBILITY_ALL : p->ShaderVisibility; + VKD3D_ASSERT(visibility <= D3D12_SHADER_VISIBILITY_PIXEL); + push_constants[visibility].stageFlags = stage_flags_from_visibility(visibility); + push_constants[visibility].size += align(p->u.Constants.Num32BitValues, 4) * sizeof(uint32_t); } if (push_constants[D3D12_SHADER_VISIBILITY_ALL].size) {
added 1 commit
- 8eff1cb3 - vkd3d: Use shader VISIBILITY_ALL for 32bit constants when using vk_heaps.
added 7 commits
-
8eff1cb3...6226f533 - 6 commits from branch
wine:master
- cdcb9db9 - vkd3d: Use shader VISIBILITY_ALL for 32bit constants when using vk_heaps.
-
8eff1cb3...6226f533 - 6 commits from branch
added 1 commit
- 16e98727 - vkd3d: Use D3D12_SHADER_VISIBILITY_ALL for 32-bit root constants when using vk_heaps.
Please register or sign in to reply