Skip to content

[ObjectYAML][RootSignature] Fix handling of StaticSamplersOffset and RootParameterOffset #155299

@inbelic

Description

@inbelic

There are a couple inconsistencies in behaviour of how we handle StaticSamplersOffset with respect to DXC and RootParameterOffset.

The static sampler offset of the output object is generated in two ways:

  1. through codegen in DXILRootSignature: the behaviour is to compute the offset if there are StaticSamplers. Otherwise, set it to 0.
  2. with yaml2obj: the behaviour is to ignore the given StaticSamplersOffset and compute the offset if there are any samplers. Otherwise, set it to the specified value from yaml.

If we consider 1, this is inconsistent with DXC behaviour, which computes and outputs the offset to the first static sampler in the RTS0 regardless of if there are any.

1 is easily fixed with this (and updating many test cases).

I am not sure of any practical situation that 2 is beneficial (perhaps to create an invalid object for testing), since there is only one correct value for it to be. This is similar to RootParameterOffset which allows us to specify any offset even though it has exactly one valid value.

This issue would propose to either:

  • remove those two parameters from being manually specified, here, allowing them to always be computed
  • make them optionally specified, such that if they are specified then that should be selected over the computed value

AC:

  • ensure that the offset is correctly computed through codegen updating DXILRootSignature
  • remove the RootParameterOffset and StaticSamplerOffset options from the yaml representation
  • update offload test-suite to mark corresponding xfails

Metadata

Metadata

Assignees

Type

Projects

Status

Closed

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions