freedreno: Use enum for primtypes table
authorRob Clark <robdclark@chromium.org>
Sun, 17 Jul 2022 19:20:36 +0000 (12:20 -0700)
committerMarge Bot <emma+marge@anholt.net>
Tue, 2 Aug 2022 23:46:15 +0000 (23:46 +0000)
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17817>

src/gallium/drivers/freedreno/a2xx/fd2_screen.c
src/gallium/drivers/freedreno/a3xx/fd3_screen.c
src/gallium/drivers/freedreno/a4xx/fd4_screen.c
src/gallium/drivers/freedreno/a5xx/fd5_screen.c
src/gallium/drivers/freedreno/a6xx/fd6_screen.c
src/gallium/drivers/freedreno/freedreno_screen.h

index c55aa6b..a761c64 100644 (file)
@@ -94,7 +94,7 @@ fd2_screen_is_format_supported(struct pipe_screen *pscreen,
 }
 
 /* clang-format off */
-static const uint8_t a22x_primtypes[PIPE_PRIM_MAX] = {
+static const enum pc_di_primtype a22x_primtypes[PIPE_PRIM_MAX] = {
    [PIPE_PRIM_POINTS]         = DI_PT_POINTLIST_PSIZE,
    [PIPE_PRIM_LINES]          = DI_PT_LINELIST,
    [PIPE_PRIM_LINE_STRIP]     = DI_PT_LINESTRIP,
@@ -104,7 +104,7 @@ static const uint8_t a22x_primtypes[PIPE_PRIM_MAX] = {
    [PIPE_PRIM_TRIANGLE_FAN]   = DI_PT_TRIFAN,
 };
 
-static const uint8_t a20x_primtypes[PIPE_PRIM_MAX] = {
+static const enum pc_di_primtype a20x_primtypes[PIPE_PRIM_MAX] = {
    [PIPE_PRIM_POINTS]         = DI_PT_POINTLIST_PSIZE,
    [PIPE_PRIM_LINES]          = DI_PT_LINELIST,
    [PIPE_PRIM_LINE_STRIP]     = DI_PT_LINESTRIP,
index f9fe811..8f6f641 100644 (file)
@@ -95,7 +95,7 @@ fd3_screen_is_format_supported(struct pipe_screen *pscreen,
 }
 
 /* clang-format off */
-static const uint8_t primtypes[] = {
+static const enum pc_di_primtype primtypes[] = {
    [PIPE_PRIM_POINTS]         = DI_PT_POINTLIST,
    [PIPE_PRIM_LINES]          = DI_PT_LINELIST,
    [PIPE_PRIM_LINE_STRIP]     = DI_PT_LINESTRIP,
index 8d42677..ae8b75a 100644 (file)
@@ -99,7 +99,7 @@ fd4_screen_is_format_supported(struct pipe_screen *pscreen,
 }
 
 /* clang-format off */
-static const uint8_t primtypes[] = {
+static const enum pc_di_primtype primtypes[] = {
    [PIPE_PRIM_POINTS]         = DI_PT_POINTLIST,
    [PIPE_PRIM_LINES]          = DI_PT_LINELIST,
    [PIPE_PRIM_LINE_STRIP]     = DI_PT_LINESTRIP,
index c8e38e8..1faf272 100644 (file)
@@ -121,7 +121,7 @@ fd5_screen_is_format_supported(struct pipe_screen *pscreen,
 }
 
 /* clang-format off */
-static const uint8_t primtypes[] = {
+static const enum pc_di_primtype primtypes[] = {
    [PIPE_PRIM_POINTS]         = DI_PT_POINTLIST,
    [PIPE_PRIM_LINES]          = DI_PT_LINELIST,
    [PIPE_PRIM_LINE_STRIP]     = DI_PT_LINESTRIP,
index 2a339da..86f9ad4 100644 (file)
@@ -128,7 +128,7 @@ fd6_screen_is_format_supported(struct pipe_screen *pscreen,
 }
 
 /* clang-format off */
-static const uint8_t primtypes[] = {
+static const enum pc_di_primtype primtypes[] = {
    [PIPE_PRIM_POINTS]                      = DI_PT_POINTLIST,
    [PIPE_PRIM_LINES]                       = DI_PT_LINELIST,
    [PIPE_PRIM_LINE_STRIP]                  = DI_PT_LINESTRIP,
index 1063620..a97f256 100644 (file)
@@ -163,7 +163,7 @@ struct fd_screen {
     * internal RECTLIST primtype, if available, used for blits/
     * clears.
     */
-   const uint8_t *primtypes;
+   const enum pc_di_primtype *primtypes;
    uint32_t primtypes_mask;
 };