Module: Mesa Branch: main Commit: 0cb58f80d27b2386accc8454eb10dc8fd0d1a1c5 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=0cb58f80d27b2386accc8454eb10dc8fd0d1a1c5
Author: Iago Toral Quiroga <[email protected]> Date: Fri Nov 12 10:35:04 2021 +0100 v3d: use V3D_MAX_DRAW_BUFFERS instead of hardcoded constant Reviewed-by: Alejandro PiƱeiro <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13775> --- src/broadcom/compiler/v3d_compiler.h | 2 +- src/gallium/drivers/v3d/v3d_context.h | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/broadcom/compiler/v3d_compiler.h b/src/broadcom/compiler/v3d_compiler.h index 751e9d868b8..a4f4d5dae01 100644 --- a/src/broadcom/compiler/v3d_compiler.h +++ b/src/broadcom/compiler/v3d_compiler.h @@ -799,7 +799,7 @@ struct v3d_compile { uint32_t uniform_array_size; uint32_t num_uniforms; uint32_t output_position_index; - nir_variable *output_color_var[4]; + nir_variable *output_color_var[V3D_MAX_DRAW_BUFFERS]; uint32_t output_sample_mask_index; struct qreg undef; diff --git a/src/gallium/drivers/v3d/v3d_context.h b/src/gallium/drivers/v3d/v3d_context.h index 7b3daf4df54..b283929e38b 100644 --- a/src/gallium/drivers/v3d/v3d_context.h +++ b/src/gallium/drivers/v3d/v3d_context.h @@ -280,7 +280,7 @@ struct v3d_ssbo_stateobj { /* Hash table key for v3d->jobs */ struct v3d_job_key { - struct pipe_surface *cbufs[4]; + struct pipe_surface *cbufs[V3D_MAX_DRAW_BUFFERS]; struct pipe_surface *zsbuf; struct pipe_surface *bbuf; }; @@ -358,7 +358,7 @@ struct v3d_job { * the destination surface. */ uint32_t nr_cbufs; - struct pipe_surface *cbufs[4]; + struct pipe_surface *cbufs[V3D_MAX_DRAW_BUFFERS]; struct pipe_surface *zsbuf; struct pipe_surface *bbuf; /** @} */ @@ -426,7 +426,7 @@ struct v3d_job { * (either clears or draws) and should be stored. */ uint32_t store; - uint32_t clear_color[4][4]; + uint32_t clear_color[V3D_MAX_DRAW_BUFFERS][4]; float clear_z; uint8_t clear_s;
