[Mesa-dev] [PATCH 1/2] i965: Refactor SIMD16-to-2xSIMD8 checks.
Matt Turner
mattst88 at gmail.com
Wed Mar 4 13:02:59 PST 2015
On Wed, Mar 4, 2015 at 12:53 PM, Kenneth Graunke <kenneth at whitecape.org> wrote:
> Gathering all the checks into a single place makes it easier to add new
> workarounds.
>
> Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>
> Cc: Neil Roberts <neil at linux.intel.com>
> Cc: Matt Turner <mattst88 at gmail.com>
> ---
> src/mesa/drivers/dri/i965/brw_fs_generator.cpp | 28 +++++----------
> src/mesa/drivers/dri/i965/brw_shader.cpp | 48 ++++++++++++++++++++++++++
> src/mesa/drivers/dri/i965/brw_shader.h | 1 +
> 3 files changed, 58 insertions(+), 19 deletions(-)
>
> diff --git a/src/mesa/drivers/dri/i965/brw_fs_generator.cpp b/src/mesa/drivers/dri/i965/brw_fs_generator.cpp
> index cbe6191..8a5ad9b 100644
> --- a/src/mesa/drivers/dri/i965/brw_fs_generator.cpp
> +++ b/src/mesa/drivers/dri/i965/brw_fs_generator.cpp
> @@ -1613,6 +1613,9 @@ fs_generator::generate_code(const cfg_t *cfg, int dispatch_width)
> unreachable(!"Invalid instruction width");
> }
>
> + bool must_break_down_simd16_to_simd8 = dispatch_width == 16 &&
> + !brw_instruction_supports_simd16(brw, inst->opcode);
Instead of calling this for every instruction we emit, can we just put
it in the existing if-statements we're modifying below?
With that,
Reviewed-by: Matt Turner <mattst88 at gmail.com>
More information about the mesa-dev
mailing list