Skip to content
Snippets Groups Projects

vkd3d: Use shader VISIBILITY_ALL for 32bit constants when using vk_heaps.

Merged navi requested to merge navi/vkd3d:push-constant-all into master

Fixes validation errors about the stage flags of push constant ranges.

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
    • 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)
           {
  • navi added 1 commit

    added 1 commit

    • 8eff1cb3 - vkd3d: Use shader VISIBILITY_ALL for 32bit constants when using vk_heaps.

    Compare with previous version

  • navi resolved all threads

    resolved all threads

  • navi added 7 commits

    added 7 commits

    • 8eff1cb3...6226f533 - 6 commits from branch wine:master
    • cdcb9db9 - vkd3d: Use shader VISIBILITY_ALL for 32bit constants when using vk_heaps.

    Compare with previous version

  • Henri Verbeet approved this merge request

    approved this merge request

  • Henri Verbeet added 1 commit

    added 1 commit

    • 16e98727 - vkd3d: Use D3D12_SHADER_VISIBILITY_ALL for 32-bit root constants when using vk_heaps.

    Compare with previous version

Please register or sign in to reply
Loading