summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/r600/r600_pipe.h
diff options
context:
space:
mode:
authorAlexandre Demers <[email protected]>2015-02-25 01:50:49 -0500
committerMarek Olšák <[email protected]>2015-03-09 23:02:05 +0100
commit7a37d5c3a48c4adec5b5db589b0cb99dc9296f0c (patch)
tree5fc262b93870f00bffa1891849d0173ff6f88c38 /src/gallium/drivers/r600/r600_pipe.h
parent85df48b45a3bdc8c25b37b243a9f2a2398fc9e24 (diff)
r600g: Use R600_MAX_VIEWPORTS instead of 16
Lets define R600_MAX_VIEWPORTS instead of using 16 here and there in the code when looping through viewports and scissors. It is easier to understand what this number represents. v2: Missed a case where R600_MAX_VIEWPORTS should have been used. Signed-off-by: Alexandre Demers <[email protected]> Signed-off-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/gallium/drivers/r600/r600_pipe.h')
-rw-r--r--src/gallium/drivers/r600/r600_pipe.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/gallium/drivers/r600/r600_pipe.h b/src/gallium/drivers/r600/r600_pipe.h
index 72378548733..ac698950434 100644
--- a/src/gallium/drivers/r600/r600_pipe.h
+++ b/src/gallium/drivers/r600/r600_pipe.h
@@ -38,6 +38,8 @@
#define R600_NUM_ATOMS 73
+#define R600_MAX_VIEWPORTS 16
+
/* read caches */
#define R600_CONTEXT_INV_VERTEX_CACHE (R600_CONTEXT_PRIVATE_FLAG << 0)
#define R600_CONTEXT_INV_TEX_CACHE (R600_CONTEXT_PRIVATE_FLAG << 1)
@@ -443,12 +445,12 @@ struct r600_context {
struct r600_poly_offset_state poly_offset_state;
struct r600_cso_state rasterizer_state;
struct r600_sample_mask sample_mask;
- struct r600_scissor_state scissor[16];
+ struct r600_scissor_state scissor[R600_MAX_VIEWPORTS];
struct r600_seamless_cube_map seamless_cube_map;
struct r600_config_state config_state;
struct r600_stencil_ref_state stencil_ref;
struct r600_vgt_state vgt_state;
- struct r600_viewport_state viewport[16];
+ struct r600_viewport_state viewport[R600_MAX_VIEWPORTS];
/* Shaders and shader resources. */
struct r600_cso_state vertex_fetch_shader;
struct r600_shader_state vertex_shader;