Skip to content

SM 6.5+ Sampler feedback DXIL shader flag is not set #8533

@Icohedron

Description

@Icohedron

As @tex3d noted while reviewing #7295, the sampler feedback DXIL shader flag was not being set at all even though it should be set when any sampler feedback operations are used.

This should be the fix (minus the test), if we were able to get this into the next point release for 1.9:

diff --cc lib/DXIL/DxilShaderFlags.cpp
index 71c7305b6,71c7305b6..cbe62e0e2
--- a/lib/DXIL/DxilShaderFlags.cpp
+++ b/lib/DXIL/DxilShaderFlags.cpp
@@@ -586,6 -586,6 +586,8 @@@ ShaderFlags ShaderFlags::CollectShaderF
            continue;
          if (hlsl::OP::IsDxilOpWave(dxilOp))
            hasWaveOps = true;
++        if (hlsl::OP::IsDxilOpFeedback(dxilOp))
++          hasSamplerFeedback = true;
          switch (dxilOp) {
          case DXIL::OpCode::CheckAccessFullyMapped:
            hasCheckAccessFully = true;
@@@ -821,6 -821,6 +823,10 @@@
      // Before validator version 1.8, RequiresGroup flag did not exist.
      requiresGroup = false;
    }
++  if (hasSamplerFeedback && DXIL::CompareVersions(valMajor, valMinor, 1, 9) < 0) {
++    // Before validator version 1.9, SamplerFeedback flag was not set.
++    hasSamplerFeedback = false;
++  }
  
    flag.SetEnableDoublePrecision(hasDouble);
    flag.SetStencilRef(hasStencilRef);

Originally posted by @tex3d in #7295 (comment)

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No fields configured for Bug.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions