[Mesa-dev] [PATCH 1/7] i965: Add all surface types to the batch decode
Matt Turner
mattst88 at gmail.com
Thu Apr 23 21:29:14 PDT 2015
On Thu, Apr 23, 2015 at 4:49 PM, Ben Widawsky
<benjamin.widawsky at intel.com> wrote:
> It's true that not all surfaces apply for every gen, but for the most part this
> is what we want. (The unfortunate case is when we use an valid surface, but not
> for the specific GEN).
>
> This was automated with a vim macro.
>
> v2: Shortened common forms such as R8G8B8A8->RGBA8. Note that this makes some of
> the sample output in subsequent commits slightly incorrect.
>
> Signed-off-by: Ben Widawsky <ben at bwidawsk.net>
> ---
> src/mesa/drivers/dri/i965/brw_state_dump.c | 226 ++++++++++++++++++++++++++++-
> 1 file changed, 219 insertions(+), 7 deletions(-)
>
> diff --git a/src/mesa/drivers/dri/i965/brw_state_dump.c b/src/mesa/drivers/dri/i965/brw_state_dump.c
> index 5cf70eb..a688ba3 100644
> --- a/src/mesa/drivers/dri/i965/brw_state_dump.c
> +++ b/src/mesa/drivers/dri/i965/brw_state_dump.c
> @@ -67,13 +67,225 @@ get_965_surfacetype(unsigned int surfacetype)
> static const char *
> get_965_surface_format(unsigned int surface_format)
> {
> - switch (surface_format) {
> - case 0x000: return "r32g32b32a32_float";
> - case 0x0c1: return "b8g8r8a8_unorm";
> - case 0x100: return "b5g6r5_unorm";
> - case 0x102: return "b5g5r5a1_unorm";
> - case 0x104: return "b4g4r4a4_unorm";
> - default: return "unknown";
> + switch (surface_format) {
> + case BRW_SURFACEFORMAT_R32G32B32A32_FLOAT: return "RGBA32_FLOAT";
We don't indent case.
(Would this work better as a table?)
More information about the mesa-dev
mailing list