[Mesa-dev] [PATCH 06/23] i965/fs: Make patch_discard_jumps_to_fb_writes return bool.
Juha-Pekka Heikkilä
juhapekka.heikkila at gmail.com
Wed May 21 09:45:49 PDT 2014
Reviewed-by: Juha-Pekka Heikkila <juhapekka.heikkila at gmail.com>
On Mon, May 19, 2014 at 9:55 PM, Matt Turner <mattst88 at gmail.com> wrote:
> ... to tell us whether it emitted any code. Will be used to determine
> whether we need to skip an annotation for it.
> ---
> src/mesa/drivers/dri/i965/brw_fs.h | 4 ++--
> src/mesa/drivers/dri/i965/brw_fs_generator.cpp | 5 +++--
> src/mesa/drivers/dri/i965/gen8_fs_generator.cpp | 5 +++--
> 3 files changed, 8 insertions(+), 6 deletions(-)
>
> diff --git a/src/mesa/drivers/dri/i965/brw_fs.h b/src/mesa/drivers/dri/i965/brw_fs.h
> index 8acad2f..111e994 100644
> --- a/src/mesa/drivers/dri/i965/brw_fs.h
> +++ b/src/mesa/drivers/dri/i965/brw_fs.h
> @@ -696,7 +696,7 @@ private:
> struct brw_reg dst,
> struct brw_reg surf_index);
>
> - void patch_discard_jumps_to_fb_writes();
> + bool patch_discard_jumps_to_fb_writes();
>
> struct brw_context *brw;
> struct gl_context *ctx;
> @@ -788,7 +788,7 @@ private:
> struct brw_reg surf_index);
> void generate_discard_jump(fs_inst *ir);
>
> - void patch_discard_jumps_to_fb_writes();
> + bool patch_discard_jumps_to_fb_writes();
>
> const struct brw_wm_prog_key *const key;
> struct brw_wm_prog_data *prog_data;
> diff --git a/src/mesa/drivers/dri/i965/brw_fs_generator.cpp b/src/mesa/drivers/dri/i965/brw_fs_generator.cpp
> index 0fcf527..132d5cd 100644
> --- a/src/mesa/drivers/dri/i965/brw_fs_generator.cpp
> +++ b/src/mesa/drivers/dri/i965/brw_fs_generator.cpp
> @@ -59,11 +59,11 @@ fs_generator::~fs_generator()
> {
> }
>
> -void
> +bool
> fs_generator::patch_discard_jumps_to_fb_writes()
> {
> if (brw->gen < 6 || this->discard_halt_patches.is_empty())
> - return;
> + return false;
>
> /* There is a somewhat strange undocumented requirement of using
> * HALT, according to the simulator. If some channel has HALTed to
> @@ -92,6 +92,7 @@ fs_generator::patch_discard_jumps_to_fb_writes()
> }
>
> this->discard_halt_patches.make_empty();
> + return true;
> }
>
> void
> diff --git a/src/mesa/drivers/dri/i965/gen8_fs_generator.cpp b/src/mesa/drivers/dri/i965/gen8_fs_generator.cpp
> index 294ce46..9df5b73 100644
> --- a/src/mesa/drivers/dri/i965/gen8_fs_generator.cpp
> +++ b/src/mesa/drivers/dri/i965/gen8_fs_generator.cpp
> @@ -639,11 +639,11 @@ gen8_fs_generator::generate_discard_jump(fs_inst *ir)
> HALT();
> }
>
> -void
> +bool
> gen8_fs_generator::patch_discard_jumps_to_fb_writes()
> {
> if (discard_halt_patches.is_empty())
> - return;
> + return false;
>
> /* There is a somewhat strange undocumented requirement of using
> * HALT, according to the simulator. If some channel has HALTed to
> @@ -672,6 +672,7 @@ gen8_fs_generator::patch_discard_jumps_to_fb_writes()
> }
>
> this->discard_halt_patches.make_empty();
> + return true;
> }
>
> /**
> --
> 1.8.3.2
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
More information about the mesa-dev
mailing list