[spirv] None (0x0) is an invalid Image Operand. (#1311)
This commit is contained in:
Родитель
7ad425a495
Коммит
f28b030c74
|
@ -188,7 +188,8 @@ InstBuilder &InstBuilder::opImageSample(
|
|||
TheInst.emplace_back(coordinate);
|
||||
if (dref)
|
||||
TheInst.emplace_back(dref);
|
||||
if (image_operands.hasValue()) {
|
||||
if (image_operands.hasValue() &&
|
||||
image_operands.getValue() != spv::ImageOperandsMask::MaskNone) {
|
||||
const auto &val = image_operands.getValue();
|
||||
encodeImageOperands(val);
|
||||
}
|
||||
|
|
|
@ -98,7 +98,7 @@ float4 main(int2 offset: A) : SV_Target {
|
|||
// Make sure OpImageSparseSampleImplicitLod returns a struct, in which the second member is a vec4.
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// CHECK: [[v4result:%\d+]] = OpImageSampleImplicitLod %v4float {{%\d+}} %float_0_5 None
|
||||
// CHECK: [[v4result:%\d+]] = OpImageSampleImplicitLod %v4float {{%\d+}} %float_0_5
|
||||
// CHECK: {{%\d+}} = OpCompositeExtract %float [[v4result]] 0
|
||||
float val9 = t5.Sample(gSampler, 0.5);
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче