summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCorentin Noël <corentin.noel@collabora.com>2023-06-06 12:22:03 +0200
committerMarge Bot <emma+marge@anholt.net>2023-06-09 09:50:52 +0000
commitc234d6cb4ecbe201a521a78a042bc437f799c74f (patch)
treeb995ffed95ac209238a087f539745ffe46d156d0
parentb1d5f24b9525e14ef4dfd32d6fbd41989152fd70 (diff)
shader: Specify the size of the front_back_color_emitted_flags array
Allows to always have the size of the array in mind and get some more guarantees from the compiler. Signed-off-by: Corentin Noël <corentin.noel@collabora.com> Part-of: <https://gitlab.freedesktop.org/virgl/virglrenderer/-/merge_requests/1143>
-rw-r--r--src/vrend_shader.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/vrend_shader.c b/src/vrend_shader.c
index 8261ffd..e5ce7e9 100644
--- a/src/vrend_shader.c
+++ b/src/vrend_shader.c
@@ -6877,7 +6877,7 @@ emit_ios_generic_outputs(const struct dump_ctx *ctx,
struct vrend_glsl_strbufs *glsl_strbufs,
struct vrend_generic_ios *generic_ios,
struct vrend_texcoord_ios *texcoord_ios,
- uint8_t front_back_color_emitted_flags[],
+ uint8_t front_back_color_emitted_flags[64],
bool *force_color_two_side,
const can_emit_generic_callback can_emit_generic)
{
@@ -6963,7 +6963,7 @@ static void emit_ios_vs(const struct dump_ctx *ctx,
struct vrend_glsl_strbufs *glsl_strbufs,
struct vrend_generic_ios *generic_ios,
struct vrend_texcoord_ios *texcoord_ios,
- uint8_t front_back_color_emitted_flags[],
+ uint8_t front_back_color_emitted_flags[64],
bool *force_color_two_side)
{
uint32_t i;
@@ -7291,7 +7291,7 @@ static void emit_ios_geom(const struct dump_ctx *ctx,
struct vrend_glsl_strbufs *glsl_strbufs,
struct vrend_generic_ios *generic_ios,
struct vrend_texcoord_ios *texcoord_ios,
- uint8_t front_back_color_emitted_flags[],
+ uint8_t front_back_color_emitted_flags[64],
uint64_t *interp_input_mask,
bool *has_pervertex,
bool *force_color_two_side)
@@ -7426,7 +7426,7 @@ static void emit_ios_tes(const struct dump_ctx *ctx,
struct vrend_glsl_strbufs *glsl_strbufs,
struct vrend_generic_ios *generic_ios,
struct vrend_texcoord_ios *texcoord_ios,
- uint8_t front_back_color_emitted_flags[],
+ uint8_t front_back_color_emitted_flags[64],
bool *has_pervertex,
bool *force_color_two_side)
{
@@ -7535,7 +7535,7 @@ static int emit_ios(const struct dump_ctx *ctx,
struct vrend_generic_ios *generic_ios,
struct vrend_texcoord_ios *texcoord_ios,
uint64_t *patches_emitted_mask,
- uint8_t front_back_color_emitted_flags[],
+ uint8_t front_back_color_emitted_flags[64],
uint64_t *interp_input_mask,
bool *has_pervertex,
bool *force_color_two_side,