It will only be emitted when the driver supports integer operations. The I2F+ARL combination is currently what is emitted when integer support is enabled (float targets only need ARL) but I can make that more clear in the commit message.
On 09/10/2011 12:07 PM, Brian Paul wrote: > I guess my question is: do the drivers need to be updated for > TGSI_OPCODE_UARL? Or will this only be emitted when the driver > supports integer operations? If that's the case, please say so in the > commit message or code. > > Otherwise: Reviewed-by: Brian Paul <bri...@vmware.com> > > > On 09/10/2011 10:48 AM, Bryan Cain wrote: >> Disregard this, I meant to send this for patch 1/2 and not 2/2. This >> patch doesn't contain any Gallium interface changes. >> >> Bryan >> >> On 09/10/2011 11:43 AM, Bryan Cain wrote: >>> Can one of the Gallium interface maintainers please review this >>> patch so >>> I can push it? >>> >>> Bryan >>> >>> On 09/02/2011 11:09 AM, Bryan Cain wrote: >>>> --- >>>> src/mesa/state_tracker/st_glsl_to_tgsi.cpp | 18 +++++++----------- >>>> 1 files changed, 7 insertions(+), 11 deletions(-) >>>> >>>> diff --git a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp >>>> b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp >>>> index e2857ed..05d4d33 100644 >>>> --- a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp >>>> +++ b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp >>>> @@ -512,7 +512,7 @@ glsl_to_tgsi_visitor::emit(ir_instruction *ir, >>>> unsigned op, >>>> >>>> inst->function = NULL; >>>> >>>> - if (op == TGSI_OPCODE_ARL) >>>> + if (op == TGSI_OPCODE_ARL || op == TGSI_OPCODE_UARL) >>>> this->num_address_regs = 1; >>>> >>>> /* Update indirect addressing status used by TGSI */ >>>> @@ -724,16 +724,12 @@ void >>>> glsl_to_tgsi_visitor::emit_arl(ir_instruction *ir, >>>> st_dst_reg dst, st_src_reg src0) >>>> { >>>> - st_src_reg tmp = get_temp(glsl_type::float_type); >>>> + int op = TGSI_OPCODE_ARL; >>>> >>>> - if (src0.type == GLSL_TYPE_INT) >>>> - emit(NULL, TGSI_OPCODE_I2F, st_dst_reg(tmp), src0); >>>> - else if (src0.type == GLSL_TYPE_UINT) >>>> - emit(NULL, TGSI_OPCODE_U2F, st_dst_reg(tmp), src0); >>>> - else >>>> - tmp = src0; >>>> - >>>> - emit(NULL, TGSI_OPCODE_ARL, dst, tmp); >>>> + if (src0.type == GLSL_TYPE_INT || src0.type == GLSL_TYPE_UINT) >>>> + op = TGSI_OPCODE_UARL; >>>> + >>>> + emit(NULL, op, dst, src0); >>>> } >>>> >>>> /** >>> _______________________________________________ >>> mesa-dev mailing list >>> mesa-dev@lists.freedesktop.org >>> http://lists.freedesktop.org/mailman/listinfo/mesa-dev >>> >> >> _______________________________________________ >> mesa-dev mailing list >> mesa-dev@lists.freedesktop.org >> http://lists.freedesktop.org/mailman/listinfo/mesa-dev > > _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev