[Mesa-dev] [PATCH 51/53] intel/fs: Remove support push constants in repclear shaders
Jason Ekstrand
jason at jlekstrand.net
Thu May 31 18:28:17 UTC 2018
On Thu, May 31, 2018 at 10:43 AM, Matt Turner <mattst88 at gmail.com> wrote:
> On Thu, May 24, 2018 at 2:56 PM, Jason Ekstrand <jason at jlekstrand.net>
> wrote:
> > ---
> > src/intel/compiler/brw_fs.cpp | 25 ++++++-------------------
> > 1 file changed, 6 insertions(+), 19 deletions(-)
> >
> > diff --git a/src/intel/compiler/brw_fs.cpp b/src/intel/compiler/brw_fs.
> cpp
> > index 1f87f06..7e532af 100644
> > --- a/src/intel/compiler/brw_fs.cpp
> > +++ b/src/intel/compiler/brw_fs.cpp
> > @@ -3220,21 +3220,14 @@ fs_visitor::emit_repclear_shader()
> > brw_wm_prog_key *key = (brw_wm_prog_key*) this->key;
> > int base_mrf = 0;
> > int color_mrf = base_mrf + 2;
> > - fs_inst *mov;
> >
> > - if (uniforms > 0) {
> > - mov = bld.exec_all().group(4, 0)
> > - .MOV(brw_message_reg(color_mrf),
> > - fs_reg(UNIFORM, 0, BRW_REGISTER_TYPE_F));
> > - } else {
> > - struct brw_reg reg =
> > - brw_reg(BRW_GENERAL_REGISTER_FILE, 2, 3, 0, 0,
> BRW_REGISTER_TYPE_F,
> > - BRW_VERTICAL_STRIDE_8, BRW_WIDTH_2,
> BRW_HORIZONTAL_STRIDE_4,
> > - BRW_SWIZZLE_XYZW, WRITEMASK_XYZW);
> > + const struct brw_reg color_in_reg =
> > + brw_reg(BRW_GENERAL_REGISTER_FILE, 2, 3, 0, 0,
> BRW_REGISTER_TYPE_F,
> > + BRW_VERTICAL_STRIDE_8, BRW_WIDTH_2,
> BRW_HORIZONTAL_STRIDE_4,
> > + BRW_SWIZZLE_XYZW, WRITEMASK_XYZW);
> >
> > - mov = bld.exec_all().group(4, 0)
> > - .MOV(vec4(brw_message_reg(color_mrf)), fs_reg(reg));
> > - }
> > + bld.exec_all().group(4, 0)
> > + .MOV(vec4(brw_message_reg(color_mrf)), fs_reg(color_in_reg));
> >
> > fs_inst *write = NULL;
> > if (key->nr_color_regions == 1) {
> > @@ -3273,12 +3266,6 @@ fs_visitor::emit_repclear_shader()
> >
> > assign_constant_locations();
> > assign_curb_setup();
> > -
> > - /* Now that we have the uniform assigned, go ahead and force it to a
> vec4. */
> > - if (uniforms > 0) {
> > - assert(mov->src[0].file == FIXED_GRF);
> > - mov->src[0] = brw_vec4_grf(mov->src[0].nr, 0);
> > - }
> > }
> >
> > /**
> > --
>
> Some explanation required: why are we making this change, how is it
> safe (i.e., did something earlier in the series make this possible?).
>
It hasn't been used since
commit 46e1132b80f01f4670dac4e393d36b0e9266b02f
Author: Topi Pohjolainen <topi.pohjolainen at intel.com>
Date: Sun May 15 07:43:39 2016 +0300
i965/blorp: Use flat inputs instead of uniforms
v2 (Jason): Use LOAD_INPUT() macro
Signed-off-by: Topi Pohjolainen <topi.pohjolainen at intel.com>
Reviewed-by: Jason Ekstrand <jason at jlekstrand.net>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20180531/9693ab28/attachment-0001.html>
More information about the mesa-dev
mailing list