[Mesa-dev] [PATCH] i965/fs: Remove force_sechalf stack.
Paul Berry
stereotype441 at gmail.com
Wed Jan 2 10:00:53 PST 2013
On 1 January 2013 15:12, Kenneth Graunke <kenneth at whitecape.org> wrote:
> Only Gen4 color write setup uses the force_sechalf flag, and it only
> sets it on a single instruction. It also already has to get a pointer
> to the instruction and manually set the saturate flag, so we may as well
> just set force_sechalf the same way and avoid the complexity of a stack.
>
Reviewed-by: Paul Berry <stereotype441 at gmail.com>
> ---
> src/mesa/drivers/dri/i965/brw_fs.cpp | 14 --------------
> src/mesa/drivers/dri/i965/brw_fs.h | 3 ---
> src/mesa/drivers/dri/i965/brw_fs_visitor.cpp | 6 +-----
> 3 files changed, 1 insertion(+), 22 deletions(-)
>
> diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp
> b/src/mesa/drivers/dri/i965/brw_fs.cpp
> index ae26d07..30f7286 100644
> --- a/src/mesa/drivers/dri/i965/brw_fs.cpp
> +++ b/src/mesa/drivers/dri/i965/brw_fs.cpp
> @@ -649,19 +649,6 @@ fs_visitor::pop_force_uncompressed()
> assert(force_uncompressed_stack >= 0);
> }
>
> -void
> -fs_visitor::push_force_sechalf()
> -{
> - force_sechalf_stack++;
> -}
> -
> -void
> -fs_visitor::pop_force_sechalf()
> -{
> - force_sechalf_stack--;
> - assert(force_sechalf_stack >= 0);
> -}
> -
> /**
> * Returns how many MRFs an FS opcode will write over.
> *
> @@ -2511,7 +2498,6 @@ fs_visitor::run()
> }
> }
> assert(force_uncompressed_stack == 0);
> - assert(force_sechalf_stack == 0);
>
> if (failed)
> return false;
> diff --git a/src/mesa/drivers/dri/i965/brw_fs.h
> b/src/mesa/drivers/dri/i965/brw_fs.h
> index bcf38f3..7af8d1f 100644
> --- a/src/mesa/drivers/dri/i965/brw_fs.h
> +++ b/src/mesa/drivers/dri/i965/brw_fs.h
> @@ -332,8 +332,6 @@ public:
>
> void push_force_uncompressed();
> void pop_force_uncompressed();
> - void push_force_sechalf();
> - void pop_force_sechalf();
>
> void emit_dummy_fs();
> fs_reg *emit_fragcoord_interpolation(ir_variable *ir);
> @@ -471,7 +469,6 @@ public:
> const unsigned dispatch_width; /**< 8 or 16 */
>
> int force_uncompressed_stack;
> - int force_sechalf_stack;
> };
>
> /**
> diff --git a/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp
> b/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp
> index e70d6bf..815e421 100644
> --- a/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp
> +++ b/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp
> @@ -1872,8 +1872,6 @@ fs_visitor::emit(fs_inst *inst)
> {
> if (force_uncompressed_stack > 0)
> inst->force_uncompressed = true;
> - else if (force_sechalf_stack > 0)
> - inst->force_sechalf = true;
>
> inst->annotation = this->current_annotation;
> inst->ir = this->base_ir;
> @@ -2078,12 +2076,11 @@ fs_visitor::emit_color_write(int target, int
> index, int first_color_mrf)
> inst->saturate = c->key.clamp_fragment_color;
> pop_force_uncompressed();
>
> - push_force_sechalf();
> color.sechalf = true;
> inst = emit(MOV(fs_reg(MRF, first_color_mrf + index + 4,
> color.type),
> color));
> + inst->force_sechalf = true;
> inst->saturate = c->key.clamp_fragment_color;
> - pop_force_sechalf();
> color.sechalf = false;
> }
> }
> @@ -2320,7 +2317,6 @@ fs_visitor::fs_visitor(struct brw_context *brw,
> this->live_intervals_valid = false;
>
> this->force_uncompressed_stack = 0;
> - this->force_sechalf_stack = 0;
>
> memset(&this->param_size, 0, sizeof(this->param_size));
> }
> --
> 1.8.0.3
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20130102/d3eaeb2b/attachment.html>
More information about the mesa-dev
mailing list