[Mesa-dev] [PATCH] st/glsl_to_tgsi: remove unrequired tgsi_get_opcode_info() call

Samuel Pitoiset samuel.pitoiset at gmail.com
Wed May 3 07:41:06 UTC 2017


Reviewed-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>

On 05/03/2017 02:48 AM, Timothy Arceri wrote:
> This is already set for the instruction at initialisation.
> ---
>   src/mesa/state_tracker/st_glsl_to_tgsi.cpp | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
> index ce4a2cb..1e606d5 100644
> --- a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
> +++ b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
> @@ -4652,21 +4652,21 @@ glsl_to_tgsi_visitor::simplify_cmp(void)
>      unsigned outputWrites[VARYING_SLOT_TESS_MAX];
>   
>      memset(outputWrites, 0, sizeof(outputWrites));
>   
>      foreach_in_list(glsl_to_tgsi_instruction, inst, &this->instructions) {
>         unsigned prevWriteMask = 0;
>   
>         /* Give up if we encounter relative addressing or flow control. */
>         if (inst->dst[0].reladdr || inst->dst[0].reladdr2 ||
>             inst->dst[1].reladdr || inst->dst[1].reladdr2 ||
> -          tgsi_get_opcode_info(inst->op)->is_branch ||
> +          inst->info->is_branch ||
>             inst->op == TGSI_OPCODE_CONT ||
>             inst->op == TGSI_OPCODE_END ||
>             inst->op == TGSI_OPCODE_RET) {
>            break;
>         }
>   
>         if (inst->dst[0].file == PROGRAM_OUTPUT) {
>            assert(inst->dst[0].index < (signed)ARRAY_SIZE(outputWrites));
>            prevWriteMask = outputWrites[inst->dst[0].index];
>            outputWrites[inst->dst[0].index] |= inst->dst[0].writemask;
> 


More information about the mesa-dev mailing list