Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Texture in the second ParameterBlock is not reported as used in any stage in the new reflection-api demo #5905

Closed
jjiangweilan opened this issue Dec 18, 2024 · 1 comment · Fixed by #5906
Assignees
Labels
goal:quality & productivity Quality issues and issues that impact our productivity coding day to day inside slang

Comments

@jjiangweilan
Copy link

jjiangweilan commented Dec 18, 2024

I just tested the new reflection-api demo using the following code, #5839
I see the perMaterial.texture is marked as used in Fragment shader but perMaterial2 is not while it's actually the opposite

struct Vertex
{
    float2 position;
    float2 uv;
    [format("rgba8")]
    float4 color;
}

struct Complicated
{
    float4 cFloat4;
}

struct PerMaterial
{
    float4 aFloat4;
    float4 bFloat4;
    Complicated cFloat4;
    Sampler2D texture;
}

struct PerMaterial2
{
    float4 aFloat4;
    float4 bFloat4;
    Complicated cFloat4;
    Sampler2D texture;
}

ParameterBlock<PerMaterial> perMaterial;
ParameterBlock<PerMaterial2> perMaterial2;

struct VOut
{
    float4 position : SV_Position;
    float4 color;
    float2 uv;
}

struct PushConstant
{
    float2 scale;
    float2 translate;
}
[vk::push_constant]
PushConstant p;

[shader("vertex")]
VOut VertexMain(Vertex input)
{
    VOut output;
    output.position = float4(input.position * p.scale + p.translate, 0, 1);
    output.color = input.color;

    return output;
}

struct In
{
    float4 color;
    float2 uv;
}

[shader("fragment")]
float4 FragmentMain(VOut input) : SV_Target
{
    let color = perMaterial2.texture.Sample(input.uv * perMaterial.aFloat4.xy * perMaterial.cFloat4.cFloat4.xy);
    return color;
}


@csyonghe
Copy link
Collaborator

Yes, this is a known issue. Our IMetadata reporting interface is ignoring descriptor set/space value.

@csyonghe csyonghe self-assigned this Dec 18, 2024
@csyonghe csyonghe added the goal:quality & productivity Quality issues and issues that impact our productivity coding day to day inside slang label Dec 18, 2024
@csyonghe csyonghe added this to the Q4 2024 (Fall) milestone Dec 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
goal:quality & productivity Quality issues and issues that impact our productivity coding day to day inside slang
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants