v3d: use V3D_MAX_DRAW_BUFFERS instead of hardcoded constant

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13775>
This commit is contained in:
Iago Toral Quiroga
2021-11-12 10:35:04 +01:00
committed by Marge Bot
parent fc106d86a5
commit 0cb58f80d2
2 changed files with 4 additions and 4 deletions

View File

@@ -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;

View File

@@ -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;