On Wed 04 Nov 2015, Jason Ekstrand wrote:
> This little data structure and associated array contains all of the image
> format metadata needed for doing image_load_store work-arounds.  This way
> we can pull metadata from within the i965 driver without having to go out
> to core mesa for it.  It is a bit of duplication with what we have in core
> mesa but it's limited enough that it's easily verified and not a big deal.
> ---
>  src/mesa/drivers/dri/i965/brw_image_load_store.c | 45 
> ++++++++++++++++++++++++
>  src/mesa/drivers/dri/i965/brw_image_load_store.h | 20 +++++++++++
>  2 files changed, 65 insertions(+)
> 
> diff --git a/src/mesa/drivers/dri/i965/brw_image_load_store.c 
> b/src/mesa/drivers/dri/i965/brw_image_load_store.c
> index 4876041..b78d6b2 100644
> --- a/src/mesa/drivers/dri/i965/brw_image_load_store.c
> +++ b/src/mesa/drivers/dri/i965/brw_image_load_store.c
> @@ -26,6 +26,51 @@
>  #include "brw_defines.h"
>  #include "brw_image_load_store.h"
>  
> +#define IF(r, g, b, a, dt, f) \
> +   [BRW_SURFACEFORMAT_##f] = { true, r, g, b, a, BRW_IMAGE_FORMAT_##dt },
> +const struct brw_image_format_info brw_image_format_info[] = {
> +   IF( 8,  0,  0,  0, UNORM, R8_UNORM)
> +   IF( 8,  0,  0,  0, SNORM, R8_SNORM)
> +   IF( 8,  0,  0,  0,  UINT, R8_UINT)
> +   IF( 8,  0,  0,  0,  SINT, R8_SINT)
> +   IF( 8,  8,  0,  0, UNORM, R8G8_UNORM)

Reviewed-by: Chad Versace <chad.vers...@intel.com>

One small nit... Place the table's key in the rightmost column looks
very wrong to me. My eyes strongly desire the key in the leftmost
column.

Anyway, leftmost or rightmost, my rb still stands.
_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to