Skip to content
This repository was archived by the owner on Aug 1, 2019. It is now read-only.
This repository was archived by the owner on Aug 1, 2019. It is now read-only.

D3D12: SPIRV translation should depend on PipelineLayout #127

Description

@Kangz

In the D3D12 backend we generate the HLSL code in the ShaderModule constructor, before we know the pipeline state. The code numbers the descriptors of each type in increasing order for each set. Then the pipeline layout does the same thing independently.

This would make the following break as the shader module would make t2 use the SRV at index 1 in the descriptor range.

layout(set = 0, location = 0) texture2D t0;
layout(set = 0, location = 2) texture2D t2;
nxt::BindGroupLayout = device.CreateBindGroupLayoutBuilder()
    .SetBindingsType(0, 3, nxt::BindingType::SampledTexture, kAllShaderStages)
    .GetResult();

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions