To avoid conflicts with coming TGSI_TYPE_x enums. --- src/gallium/auxiliary/gallivm/lp_bld_tgsi.c | 26 +++++----- src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c | 54 ++++++++++---------- src/gallium/auxiliary/tgsi/tgsi_info.c | 14 ++--- src/gallium/auxiliary/tgsi/tgsi_info.h | 12 ++--- src/gallium/drivers/ilo/shader/toy_tgsi.c | 12 ++--- src/gallium/drivers/radeon/radeon_llvm.h | 8 +-- .../drivers/radeon/radeon_setup_tgsi_llvm.c | 8 +-- 7 files changed, 67 insertions(+), 67 deletions(-)
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_tgsi.c b/src/gallium/auxiliary/gallivm/lp_bld_tgsi.c index 51cb54c..9464348 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_tgsi.c +++ b/src/gallium/auxiliary/gallivm/lp_bld_tgsi.c @@ -315,15 +315,15 @@ lp_build_emit_fetch( if (reg->Register.Absolute) { switch (stype) { - case TGSI_TYPE_FLOAT: - case TGSI_TYPE_DOUBLE: - case TGSI_TYPE_UNTYPED: + case TGSI_OPCODE_TYPE_FLOAT: + case TGSI_OPCODE_TYPE_DOUBLE: + case TGSI_OPCODE_TYPE_UNTYPED: /* modifiers on movs assume data is float */ res = lp_build_emit_llvm_unary(bld_base, TGSI_OPCODE_ABS, res); break; - case TGSI_TYPE_UNSIGNED: - case TGSI_TYPE_SIGNED: - case TGSI_TYPE_VOID: + case TGSI_OPCODE_TYPE_UNSIGNED: + case TGSI_OPCODE_TYPE_SIGNED: + case TGSI_OPCODE_TYPE_VOID: default: /* abs modifier is only legal on floating point types */ assert(0); @@ -333,20 +333,20 @@ lp_build_emit_fetch( if (reg->Register.Negate) { switch (stype) { - case TGSI_TYPE_FLOAT: - case TGSI_TYPE_UNTYPED: + case TGSI_OPCODE_TYPE_FLOAT: + case TGSI_OPCODE_TYPE_UNTYPED: /* modifiers on movs assume data is float */ res = lp_build_negate( &bld_base->base, res ); break; - case TGSI_TYPE_DOUBLE: + case TGSI_OPCODE_TYPE_DOUBLE: /* no double build context */ assert(0); break; - case TGSI_TYPE_SIGNED: - case TGSI_TYPE_UNSIGNED: + case TGSI_OPCODE_TYPE_SIGNED: + case TGSI_OPCODE_TYPE_UNSIGNED: res = lp_build_negate( &bld_base->int_bld, res ); break; - case TGSI_TYPE_VOID: + case TGSI_OPCODE_TYPE_VOID: default: assert(0); break; @@ -381,7 +381,7 @@ lp_build_emit_fetch_texoffset( struct tgsi_full_src_register reg; unsigned swizzle; LLVMValueRef res; - enum tgsi_opcode_type stype = TGSI_TYPE_SIGNED; + enum tgsi_opcode_type stype = TGSI_OPCODE_TYPE_SIGNED; /* convert offset "register" to ordinary register so can use normal emit funcs */ memset(®, 0, sizeof(reg)); diff --git a/src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c b/src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c index 2b47fc2..4bf9f23 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c +++ b/src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c @@ -1148,18 +1148,18 @@ stype_to_fetch(struct lp_build_tgsi_context * bld_base, struct lp_build_context *bld_fetch; switch (stype) { - case TGSI_TYPE_FLOAT: - case TGSI_TYPE_UNTYPED: + case TGSI_OPCODE_TYPE_FLOAT: + case TGSI_OPCODE_TYPE_UNTYPED: bld_fetch = &bld_base->base; break; - case TGSI_TYPE_UNSIGNED: + case TGSI_OPCODE_TYPE_UNSIGNED: bld_fetch = &bld_base->uint_bld; break; - case TGSI_TYPE_SIGNED: + case TGSI_OPCODE_TYPE_SIGNED: bld_fetch = &bld_base->int_bld; break; - case TGSI_TYPE_VOID: - case TGSI_TYPE_DOUBLE: + case TGSI_OPCODE_TYPE_VOID: + case TGSI_OPCODE_TYPE_DOUBLE: default: assert(0); bld_fetch = NULL; @@ -1275,7 +1275,7 @@ emit_fetch_constant( res = lp_build_broadcast_scalar(&bld_base->base, scalar); } - if (stype == TGSI_TYPE_SIGNED || stype == TGSI_TYPE_UNSIGNED) { + if (stype == TGSI_OPCODE_TYPE_SIGNED || stype == TGSI_OPCODE_TYPE_UNSIGNED) { struct lp_build_context *bld_fetch = stype_to_fetch(bld_base, stype); res = LLVMBuildBitCast(builder, res, bld_fetch->vec_type, ""); } @@ -1336,9 +1336,9 @@ emit_fetch_immediate( res = bld->immediates[reg->Register.Index][swizzle]; } - if (stype == TGSI_TYPE_UNSIGNED) { + if (stype == TGSI_OPCODE_TYPE_UNSIGNED) { res = LLVMBuildBitCast(builder, res, bld_base->uint_bld.vec_type, ""); - } else if (stype == TGSI_TYPE_SIGNED) { + } else if (stype == TGSI_OPCODE_TYPE_SIGNED) { res = LLVMBuildBitCast(builder, res, bld_base->int_bld.vec_type, ""); } return res; @@ -1393,9 +1393,9 @@ emit_fetch_input( assert(res); - if (stype == TGSI_TYPE_UNSIGNED) { + if (stype == TGSI_OPCODE_TYPE_UNSIGNED) { res = LLVMBuildBitCast(builder, res, bld_base->uint_bld.vec_type, ""); - } else if (stype == TGSI_TYPE_SIGNED) { + } else if (stype == TGSI_OPCODE_TYPE_SIGNED) { res = LLVMBuildBitCast(builder, res, bld_base->int_bld.vec_type, ""); } @@ -1445,9 +1445,9 @@ emit_fetch_gs_input( assert(res); - if (stype == TGSI_TYPE_UNSIGNED) { + if (stype == TGSI_OPCODE_TYPE_UNSIGNED) { res = LLVMBuildBitCast(builder, res, bld_base->uint_bld.vec_type, ""); - } else if (stype == TGSI_TYPE_SIGNED) { + } else if (stype == TGSI_OPCODE_TYPE_SIGNED) { res = LLVMBuildBitCast(builder, res, bld_base->int_bld.vec_type, ""); } @@ -1495,7 +1495,7 @@ emit_fetch_temporary( res = LLVMBuildLoad(builder, temp_ptr, ""); } - if (stype == TGSI_TYPE_SIGNED || stype == TGSI_TYPE_UNSIGNED) { + if (stype == TGSI_OPCODE_TYPE_SIGNED || stype == TGSI_OPCODE_TYPE_UNSIGNED) { struct lp_build_context *bld_fetch = stype_to_fetch(bld_base, stype); res = LLVMBuildBitCast(builder, res, bld_fetch->vec_type, ""); } @@ -1522,32 +1522,32 @@ emit_fetch_system_value( switch (info->system_value_semantic_name[reg->Register.Index]) { case TGSI_SEMANTIC_INSTANCEID: res = lp_build_broadcast_scalar(&bld_base->uint_bld, bld->system_values.instance_id); - atype = TGSI_TYPE_UNSIGNED; + atype = TGSI_OPCODE_TYPE_UNSIGNED; break; case TGSI_SEMANTIC_VERTEXID: res = bld->system_values.vertex_id; - atype = TGSI_TYPE_UNSIGNED; + atype = TGSI_OPCODE_TYPE_UNSIGNED; break; case TGSI_SEMANTIC_PRIMID: res = bld->system_values.prim_id; - atype = TGSI_TYPE_UNSIGNED; + atype = TGSI_OPCODE_TYPE_UNSIGNED; break; default: assert(!"unexpected semantic in emit_fetch_system_value"); res = bld_base->base.zero; - atype = TGSI_TYPE_FLOAT; + atype = TGSI_OPCODE_TYPE_FLOAT; break; } if (atype != stype) { - if (stype == TGSI_TYPE_FLOAT) { + if (stype == TGSI_OPCODE_TYPE_FLOAT) { res = LLVMBuildBitCast(builder, res, bld_base->base.vec_type, ""); - } else if (stype == TGSI_TYPE_UNSIGNED) { + } else if (stype == TGSI_OPCODE_TYPE_UNSIGNED) { res = LLVMBuildBitCast(builder, res, bld_base->uint_bld.vec_type, ""); - } else if (stype == TGSI_TYPE_SIGNED) { + } else if (stype == TGSI_OPCODE_TYPE_SIGNED) { res = LLVMBuildBitCast(builder, res, bld_base->int_bld.vec_type, ""); } } @@ -1678,15 +1678,15 @@ emit_store_chan( break; case TGSI_SAT_ZERO_ONE: - assert(dtype == TGSI_TYPE_FLOAT || - dtype == TGSI_TYPE_UNTYPED); + assert(dtype == TGSI_OPCODE_TYPE_FLOAT || + dtype == TGSI_OPCODE_TYPE_UNTYPED); value = LLVMBuildBitCast(builder, value, float_bld->vec_type, ""); value = lp_build_clamp_zero_one_nanzero(float_bld, value); break; case TGSI_SAT_MINUS_PLUS_ONE: - assert(dtype == TGSI_TYPE_FLOAT || - dtype == TGSI_TYPE_UNTYPED); + assert(dtype == TGSI_OPCODE_TYPE_FLOAT || + dtype == TGSI_OPCODE_TYPE_UNTYPED); value = LLVMBuildBitCast(builder, value, float_bld->vec_type, ""); /* This will give -1.0 for NaN which is probably not what we want. */ value = lp_build_max_ext(float_bld, value, @@ -1771,7 +1771,7 @@ emit_store_chan( break; case TGSI_FILE_ADDRESS: - assert(dtype == TGSI_TYPE_SIGNED); + assert(dtype == TGSI_OPCODE_TYPE_SIGNED); assert(LLVMTypeOf(value) == int_bld->vec_type); value = LLVMBuildBitCast(builder, value, int_bld->vec_type, ""); lp_exec_mask_store(&bld->exec_mask, int_bld, pred, value, @@ -2636,7 +2636,7 @@ emit_dump_file(struct lp_build_tgsi_soa_context *bld, reg.Register.SwizzleZ = 2; reg.Register.SwizzleW = 3; - res = bld->bld_base.emit_fetch_funcs[file](&bld->bld_base, ®, TGSI_TYPE_FLOAT, chan); + res = bld->bld_base.emit_fetch_funcs[file](&bld->bld_base, ®, TGSI_OPCODE_TYPE_FLOAT, chan); if (!res) { continue; } diff --git a/src/gallium/auxiliary/tgsi/tgsi_info.c b/src/gallium/auxiliary/tgsi/tgsi_info.c index d03a920..763313d 100644 --- a/src/gallium/auxiliary/tgsi/tgsi_info.c +++ b/src/gallium/auxiliary/tgsi/tgsi_info.c @@ -287,7 +287,7 @@ tgsi_opcode_infer_type( uint opcode ) switch (opcode) { case TGSI_OPCODE_MOV: case TGSI_OPCODE_UCMP: - return TGSI_TYPE_UNTYPED; + return TGSI_OPCODE_TYPE_UNTYPED; case TGSI_OPCODE_NOT: case TGSI_OPCODE_SHL: case TGSI_OPCODE_AND: @@ -310,7 +310,7 @@ tgsi_opcode_infer_type( uint opcode ) case TGSI_OPCODE_USNE: case TGSI_OPCODE_SVIEWINFO: case TGSI_OPCODE_UMUL_HI: - return TGSI_TYPE_UNSIGNED; + return TGSI_OPCODE_TYPE_UNSIGNED; case TGSI_OPCODE_ARL: case TGSI_OPCODE_ARR: case TGSI_OPCODE_MOD: @@ -331,9 +331,9 @@ tgsi_opcode_infer_type( uint opcode ) case TGSI_OPCODE_IABS: case TGSI_OPCODE_ISSG: case TGSI_OPCODE_IMUL_HI: - return TGSI_TYPE_SIGNED; + return TGSI_OPCODE_TYPE_SIGNED; default: - return TGSI_TYPE_FLOAT; + return TGSI_OPCODE_TYPE_FLOAT; } } @@ -354,10 +354,10 @@ tgsi_opcode_infer_src_type( uint opcode ) case TGSI_OPCODE_SAMPLE_I: case TGSI_OPCODE_SAMPLE_I_MS: case TGSI_OPCODE_UMUL_HI: - return TGSI_TYPE_UNSIGNED; + return TGSI_OPCODE_TYPE_UNSIGNED; case TGSI_OPCODE_IMUL_HI: case TGSI_OPCODE_I2F: - return TGSI_TYPE_SIGNED; + return TGSI_OPCODE_TYPE_SIGNED; case TGSI_OPCODE_ARL: case TGSI_OPCODE_ARR: case TGSI_OPCODE_TXQ_LZ: @@ -368,7 +368,7 @@ tgsi_opcode_infer_src_type( uint opcode ) case TGSI_OPCODE_FSLT: case TGSI_OPCODE_FSNE: case TGSI_OPCODE_UCMP: - return TGSI_TYPE_FLOAT; + return TGSI_OPCODE_TYPE_FLOAT; default: return tgsi_opcode_infer_type(opcode); } diff --git a/src/gallium/auxiliary/tgsi/tgsi_info.h b/src/gallium/auxiliary/tgsi/tgsi_info.h index aa7edd1..0ecacad 100644 --- a/src/gallium/auxiliary/tgsi/tgsi_info.h +++ b/src/gallium/auxiliary/tgsi/tgsi_info.h @@ -92,12 +92,12 @@ const char * tgsi_get_processor_name( uint processor ); enum tgsi_opcode_type { - TGSI_TYPE_UNTYPED, /* for MOV */ - TGSI_TYPE_VOID, - TGSI_TYPE_UNSIGNED, - TGSI_TYPE_SIGNED, - TGSI_TYPE_FLOAT, - TGSI_TYPE_DOUBLE + TGSI_OPCODE_TYPE_UNTYPED, /* for MOV */ + TGSI_OPCODE_TYPE_VOID, + TGSI_OPCODE_TYPE_UNSIGNED, + TGSI_OPCODE_TYPE_SIGNED, + TGSI_OPCODE_TYPE_FLOAT, + TGSI_OPCODE_TYPE_DOUBLE }; enum tgsi_opcode_type diff --git a/src/gallium/drivers/ilo/shader/toy_tgsi.c b/src/gallium/drivers/ilo/shader/toy_tgsi.c index e816ab4..1ecf9d0 100644 --- a/src/gallium/drivers/ilo/shader/toy_tgsi.c +++ b/src/gallium/drivers/ilo/shader/toy_tgsi.c @@ -1694,15 +1694,15 @@ ra_infer_opcode_type(int tgsi_opcode, bool is_dst) type = tgsi_opcode_infer_src_type(tgsi_opcode); switch (type) { - case TGSI_TYPE_UNSIGNED: + case TGSI_OPCODE_TYPE_UNSIGNED: return TOY_TYPE_UD; - case TGSI_TYPE_SIGNED: + case TGSI_OPCODE_TYPE_SIGNED: return TOY_TYPE_D; - case TGSI_TYPE_FLOAT: + case TGSI_OPCODE_TYPE_FLOAT: return TOY_TYPE_F; - case TGSI_TYPE_UNTYPED: - case TGSI_TYPE_VOID: - case TGSI_TYPE_DOUBLE: + case TGSI_OPCODE_TYPE_UNTYPED: + case TGSI_OPCODE_TYPE_VOID: + case TGSI_OPCODE_TYPE_DOUBLE: default: assert(!"unsupported TGSI type"); return TOY_TYPE_UD; diff --git a/src/gallium/drivers/radeon/radeon_llvm.h b/src/gallium/drivers/radeon/radeon_llvm.h index 00714fb..e504c24 100644 --- a/src/gallium/drivers/radeon/radeon_llvm.h +++ b/src/gallium/drivers/radeon/radeon_llvm.h @@ -143,11 +143,11 @@ static inline LLVMTypeRef tgsi2llvmtype( LLVMContextRef ctx = bld_base->base.gallivm->context; switch (type) { - case TGSI_TYPE_UNSIGNED: - case TGSI_TYPE_SIGNED: + case TGSI_OPCODE_TYPE_UNSIGNED: + case TGSI_OPCODE_TYPE_SIGNED: return LLVMInt32TypeInContext(ctx); - case TGSI_TYPE_UNTYPED: - case TGSI_TYPE_FLOAT: + case TGSI_OPCODE_TYPE_UNTYPED: + case TGSI_OPCODE_TYPE_FLOAT: return LLVMFloatTypeInContext(ctx); default: break; } diff --git a/src/gallium/drivers/radeon/radeon_setup_tgsi_llvm.c b/src/gallium/drivers/radeon/radeon_setup_tgsi_llvm.c index 60ade78..c764fc6 100644 --- a/src/gallium/drivers/radeon/radeon_setup_tgsi_llvm.c +++ b/src/gallium/drivers/radeon/radeon_setup_tgsi_llvm.c @@ -370,7 +370,7 @@ emit_store( continue; } - value = bitcast(bld_base, TGSI_TYPE_FLOAT, value); + value = bitcast(bld_base, TGSI_OPCODE_TYPE_FLOAT, value); if (reg->Register.Indirect) { struct tgsi_declaration_range range = get_array_range(bld_base, @@ -378,7 +378,7 @@ emit_store( unsigned i, size = range.Last - range.First + 1; LLVMValueRef array = LLVMBuildInsertElement(builder, - emit_array_fetch(bld_base, reg->Register.File, TGSI_TYPE_FLOAT, range, chan_index), + emit_array_fetch(bld_base, reg->Register.File, TGSI_OPCODE_TYPE_FLOAT, range, chan_index), value, emit_array_index(bld, ®->Indirect, reg->Register.Index - range.First), ""); for (i = 0; i < size; ++i) { @@ -601,7 +601,7 @@ static void uif_emit( LLVMValueRef cond; cond = LLVMBuildICmp(gallivm->builder, LLVMIntNE, - bitcast(bld_base, TGSI_TYPE_UNSIGNED, emit_data->args[0]), + bitcast(bld_base, TGSI_OPCODE_TYPE_UNSIGNED, emit_data->args[0]), bld_base->int_bld.zero, ""); if_cond_emit(action, bld_base, emit_data, cond); @@ -937,7 +937,7 @@ static void emit_not( struct lp_build_emit_data * emit_data) { LLVMBuilderRef builder = bld_base->base.gallivm->builder; - LLVMValueRef v = bitcast(bld_base, TGSI_TYPE_UNSIGNED, + LLVMValueRef v = bitcast(bld_base, TGSI_OPCODE_TYPE_UNSIGNED, emit_data->args[0]); emit_data->output[emit_data->chan] = LLVMBuildNot(builder, v, ""); } -- 1.7.10.4 _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev