Skip to content

Commit 04ea569

Browse files
author
Finn Plummer
committed
self-review: specify required feature
1 parent 6afdd40 commit 04ea569

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

test/Feature/RootSignatures/StaticSamplers.test

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,8 @@ DescriptorSets:
133133
# Unsupported: https://github.com/llvm/llvm-project/issues/101558
134134
# XFAIL: Clang
135135

136+
# REQUIRES: Derivatives
137+
136138
# RUN: split-file %s %t
137139
# RUN: %dxc_target -T cs_6_6 -Fo %t.o %t/source.hlsl
138140
# RUN: %offloader %t/pipeline.yaml %t.o

test/lit.cfg.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,10 @@
4747
ToolSubst("imgdiff", FindTool("imgdiff")),
4848
]
4949

50+
def getHighestShaderModel(features):
51+
sm = features.get("HighestShaderModel", 6.0)
52+
major, minor = str(sm).split('.')
53+
return int(major), int(minor)
5054

5155
def setDeviceFeatures(config, device, compiler):
5256
API = device["API"]
@@ -74,6 +78,11 @@ def setDeviceFeatures(config, device, compiler):
7478

7579
config.available_features.add("%s-%s" % (compiler, API))
7680

81+
HighestShaderModel = getHighestShaderModel(device["Features"])
82+
if (6, 6) <= HighestShaderModel:
83+
# https://github.com/microsoft/DirectX-Specs/blob/master/d3d/HLSL_ShaderModel6_6.md#derivatives
84+
config.available_features.add("Derivatives")
85+
7786
if device["API"] == "DirectX":
7887
if device["Features"].get("Native16BitShaderOpsSupported", False):
7988
config.available_features.add("Int16")

0 commit comments

Comments
 (0)