File tree Expand file tree Collapse file tree 2 files changed +22
-0
lines changed
Expand file tree Collapse file tree 2 files changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -6899,6 +6899,7 @@ SpirvInstruction *SpirvEmitter::doUnaryOperator(const UnaryOperator *expr) {
68996899}
69006900
69016901spv::Op SpirvEmitter::translateOp(BinaryOperator::Opcode op, QualType type) {
6902+ type = type.getDesugaredType(astContext);
69026903 const bool isSintType = isSintOrVecMatOfSintType(type);
69036904 const bool isUintType = isUintOrVecMatOfUintType(type);
69046905 const bool isFloatType = isFloatOrVecMatOfFloatType(type);
Original file line number Diff line number Diff line change 1+ // RUN: %dxc -spirv -T lib_6_8 %s -fcgl | FileCheck %s
2+
3+ enum LuminairePlanesSymmetry : uint
4+ {
5+ ISOTROPIC = 0u,
6+ NO_LATERAL_SYMMET
7+ };
8+
9+ using symmetry_t = LuminairePlanesSymmetry;
10+ const symmetry_t symmetry;
11+
12+ [numthreads (1 ,1 ,1 )]
13+ [shader ("compute" )]
14+ void main (uint3 id : SV_DispatchThreadID )
15+ {
16+ // CHECK: [[AC:%[0-9]+]] = OpAccessChain %_ptr_Uniform_int %_Globals %int_0
17+ // CHECK: [[LHS:%[0-9]+]] = OpLoad %int [[AC]]
18+ // CHECK: [[RHS:%[0-9]+]] = OpLoad %int %ISOTROPIC
19+ // CHECK: OpIEqual %bool [[LHS]] [[RHS]]
20+ const uint i0 = (symmetry == symmetry_t::ISOTROPIC) ? 0u : 1u;
21+ }
You can’t perform that action at this time.
0 commit comments