Re: [Mesa-dev] [PATCH] i965/fs: Strip trailing contant zeroes in sample messages

2015-04-24 Thread Neil Roberts
Kenneth Graunke writes: > I like this idea! > > We definitely need to skip this optimization on Gen4, since the Gen4/G45 > sampler infers the texturing opcode based on the message length. But > for Gen5+, it should be no problem. Ah ok, yes, I will add this. > Matt mentioned that we have to em

Re: [Mesa-dev] [PATCH] i965/fs: Strip trailing contant zeroes in sample messages

2015-04-24 Thread Matt Turner
On Fri, Apr 24, 2015 at 5:15 PM, Neil Roberts wrote: > Matt Turner writes: > >>> + foreach_block_and_inst(block, fs_inst, inst, cfg) { >>> + if ((inst->opcode == SHADER_OPCODE_TEX || >>> + inst->opcode == SHADER_OPCODE_TXF) && >>> + !inst->shadow_compare) { >>> +

Re: [Mesa-dev] [PATCH] i965/fs: Strip trailing contant zeroes in sample messages

2015-04-24 Thread Neil Roberts
Matt Turner writes: >> + foreach_block_and_inst(block, fs_inst, inst, cfg) { >> + if ((inst->opcode == SHADER_OPCODE_TEX || >> + inst->opcode == SHADER_OPCODE_TXF) && >> + !inst->shadow_compare) { >> + fs_inst *load_payload = (fs_inst *) inst->prev; >> + >> +

Re: [Mesa-dev] [PATCH] i965/fs: Strip trailing contant zeroes in sample messages

2015-04-24 Thread Kenneth Graunke
On Friday, April 24, 2015 08:02:58 AM Neil Roberts wrote: > If a send message is emitted with a message length that is less than > required for the message then the remaining parameters default to > zero. We can take advantage of this to save a register when a shader > passes constant zeroes as the

Re: [Mesa-dev] [PATCH] i965/fs: Strip trailing contant zeroes in sample messages

2015-04-24 Thread Pohjolainen, Topi
In the title s/contant/constant/. ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] [PATCH] i965/fs: Strip trailing contant zeroes in sample messages

2015-04-24 Thread Matt Turner
On Fri, Apr 24, 2015 at 8:02 AM, Neil Roberts wrote: > If a send message is emitted with a message length that is less than > required for the message then the remaining parameters default to > zero. We can take advantage of this to save a register when a shader > passes constant zeroes as the fin

[Mesa-dev] [PATCH] i965/fs: Strip trailing contant zeroes in sample messages

2015-04-24 Thread Neil Roberts
If a send message is emitted with a message length that is less than required for the message then the remaining parameters default to zero. We can take advantage of this to save a register when a shader passes constant zeroes as the final coordinates to the sample function. I think this might be