diff --git a/src/microsoft/ci/spirv2dxil_reference.txt b/src/microsoft/ci/spirv2dxil_reference.txt index 576426e6d93..744f3b9a789 100644 --- a/src/microsoft/ci/spirv2dxil_reference.txt +++ b/src/microsoft/ci/spirv2dxil_reference.txt @@ -376,11 +376,11 @@ Assertion failed: glsl_get_components(type) == 4, file ../src/microsoft/compiler Test:SpvModuleScopeVarParserTest_BuiltinPointSize_Write1_IsErased.spvasm:main|Vertex: Fail -Assertion failed: instr->deref_type == nir_deref_type_var || instr->deref_type == nir_deref_type_array, file ../src/microsoft/compiler/nir_to_dxil.c, line 3732 +Assertion failed: instr->deref_type == nir_deref_type_var || instr->deref_type == nir_deref_type_array, file ../src/microsoft/compiler/nir_to_dxil.c, line 3738 Test:SpvModuleScopeVarParserTest_BuiltinPointSize_WriteViaCopyObjectPostAccessChainErased.spvasm:main|Vertex: Fail -Assertion failed: instr->deref_type == nir_deref_type_var || instr->deref_type == nir_deref_type_array, file ../src/microsoft/compiler/nir_to_dxil.c, line 3732 +Assertion failed: instr->deref_type == nir_deref_type_var || instr->deref_type == nir_deref_type_array, file ../src/microsoft/compiler/nir_to_dxil.c, line 3738 Test:SpvModuleScopeVarParserTest_BuiltinPosition_BuiltIn_Position.spvasm:main|Vertex: Fail @@ -388,23 +388,23 @@ Assertion failed: glsl_get_components(type) == 4, file ../src/microsoft/compiler Test:SpvModuleScopeVarParserTest_BuiltinPosition_BuiltIn_Position_Initializer.spvasm:main|Vertex: Fail -Assertion failed: instr->deref_type == nir_deref_type_var || instr->deref_type == nir_deref_type_array, file ../src/microsoft/compiler/nir_to_dxil.c, line 3732 +Assertion failed: instr->deref_type == nir_deref_type_var || instr->deref_type == nir_deref_type_array, file ../src/microsoft/compiler/nir_to_dxil.c, line 3738 Test:SpvModuleScopeVarParserTest_BuiltinPosition_StorePosition.spvasm:main|Vertex: Fail -Assertion failed: instr->deref_type == nir_deref_type_var || instr->deref_type == nir_deref_type_array, file ../src/microsoft/compiler/nir_to_dxil.c, line 3732 +Assertion failed: instr->deref_type == nir_deref_type_var || instr->deref_type == nir_deref_type_array, file ../src/microsoft/compiler/nir_to_dxil.c, line 3738 Test:SpvModuleScopeVarParserTest_BuiltinPosition_StorePosition_PerVertexStructOutOfOrderDecl.spvasm:main|Vertex: Fail -Assertion failed: instr->deref_type == nir_deref_type_var || instr->deref_type == nir_deref_type_array, file ../src/microsoft/compiler/nir_to_dxil.c, line 3732 +Assertion failed: instr->deref_type == nir_deref_type_var || instr->deref_type == nir_deref_type_array, file ../src/microsoft/compiler/nir_to_dxil.c, line 3738 Test:SpvModuleScopeVarParserTest_BuiltinPosition_StorePositionMember_OneAccessChain.spvasm:main|Vertex: Fail -Assertion failed: instr->deref_type == nir_deref_type_var || instr->deref_type == nir_deref_type_array, file ../src/microsoft/compiler/nir_to_dxil.c, line 3732 +Assertion failed: instr->deref_type == nir_deref_type_var || instr->deref_type == nir_deref_type_array, file ../src/microsoft/compiler/nir_to_dxil.c, line 3738 Test:SpvModuleScopeVarParserTest_BuiltinPosition_StorePositionMember_TwoAccessChain.spvasm:main|Vertex: Fail -Assertion failed: instr->deref_type == nir_deref_type_var || instr->deref_type == nir_deref_type_array, file ../src/microsoft/compiler/nir_to_dxil.c, line 3732 +Assertion failed: instr->deref_type == nir_deref_type_var || instr->deref_type == nir_deref_type_array, file ../src/microsoft/compiler/nir_to_dxil.c, line 3738 Test:SpvModuleScopeVarParserTest_BuiltinVertexIndex.spvasm:main|Vertex: Fail @@ -1501,4 +1501,4 @@ Test:SpvUnaryLogicalTest_LogicalNot_Vector.spvasm:main|Fragment: Pass Test:ValidIndex_SpvParserSwizzleTest_Sample_0.spvasm:main|Fragment: Pass Test:ValidIndex_SpvParserSwizzleTest_Sample_1.spvasm:main|Fragment: Pass Test:ValidIndex_SpvParserSwizzleTest_Sample_2.spvasm:main|Fragment: Pass -Test:ValidIndex_SpvParserSwizzleTest_Sample_3.spvasm:main|Fragment: Pass \ No newline at end of file +Test:ValidIndex_SpvParserSwizzleTest_Sample_3.spvasm:main|Fragment: Pass diff --git a/src/microsoft/compiler/nir_to_dxil.c b/src/microsoft/compiler/nir_to_dxil.c index 9c9c18d8817..37afc451607 100644 --- a/src/microsoft/compiler/nir_to_dxil.c +++ b/src/microsoft/compiler/nir_to_dxil.c @@ -2112,6 +2112,12 @@ emit_alu(struct ntd_context *ctx, nir_alu_instr *alu) case nir_op_iand: return emit_binop(ctx, alu, DXIL_BINOP_AND, src[0], src[1]); case nir_op_ior: return emit_binop(ctx, alu, DXIL_BINOP_OR, src[0], src[1]); case nir_op_ixor: return emit_binop(ctx, alu, DXIL_BINOP_XOR, src[0], src[1]); + case nir_op_inot: { + unsigned bit_size = alu->dest.dest.ssa.bit_size; + intmax_t val = bit_size == 1 ? 1 : -1; + const struct dxil_value *negative_one = dxil_module_get_int_const(&ctx->mod, val, bit_size); + return emit_binop(ctx, alu, DXIL_BINOP_XOR, src[0], negative_one); + } case nir_op_ieq: return emit_cmp(ctx, alu, DXIL_ICMP_EQ, src[0], src[1]); case nir_op_ine: return emit_cmp(ctx, alu, DXIL_ICMP_NE, src[0], src[1]); case nir_op_ige: return emit_cmp(ctx, alu, DXIL_ICMP_SGE, src[0], src[1]);