mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-31 14:10:09 +01:00
microsoft/compiler: Implement inot
Fixes: cb283616 ("nir/algebraic: Small optimizations for SpvOpFOrdNotEqual and SpvOpFUnordEqual")
Reviewed-by: Enrico Galli <enrico.galli@intel.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14140>
This commit is contained in:
parent
249556dad8
commit
45354be410
2 changed files with 14 additions and 8 deletions
|
|
@ -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
|
||||
Test:ValidIndex_SpvParserSwizzleTest_Sample_3.spvasm:main|Fragment: Pass
|
||||
|
|
|
|||
|
|
@ -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]);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue