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

D3D12: SPIRV translation should depend on PipelineLayout #127

Open
Kangz opened this issue Sep 20, 2017 · 0 comments
Open

D3D12: SPIRV translation should depend on PipelineLayout #127

Kangz opened this issue Sep 20, 2017 · 0 comments
Labels

Comments

@Kangz
Copy link
Contributor

Kangz commented Sep 20, 2017

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();
@Kangz Kangz added the bug label Sep 20, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

1 participant