summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/svga/svga_context.h
diff options
context:
space:
mode:
authorJosé Fonseca <[email protected]>2011-10-31 19:26:53 +0000
committerJosé Fonseca <[email protected]>2011-10-31 21:33:04 +0000
commite33447aac62da5e7fe8f6a262cacaa97ce212ef5 (patch)
tree1e39581a2b9be2a57c530612591f95807c95abb5 /src/gallium/drivers/svga/svga_context.h
parent0f26c6ae3f9bd6b8c97e9e8a461d55b30e429239 (diff)
svga: Fix potential buffer overflow in rs draw state.
Reviewed-by: Brian Paul <[email protected]>
Diffstat (limited to 'src/gallium/drivers/svga/svga_context.h')
-rw-r--r--src/gallium/drivers/svga/svga_context.h12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/gallium/drivers/svga/svga_context.h b/src/gallium/drivers/svga/svga_context.h
index 07d3c5f2c25..47e08ba68e1 100644
--- a/src/gallium/drivers/svga/svga_context.h
+++ b/src/gallium/drivers/svga/svga_context.h
@@ -36,6 +36,8 @@
#include "tgsi/tgsi_scan.h"
#include "svga_state.h"
+#include "svga_hw_reg.h"
+#include "svga3d_shaderdefs.h"
#define SVGA_TEX_UNITS 8
@@ -236,10 +238,6 @@ struct svga_state
float zero_stride_constants[PIPE_MAX_ATTRIBS*4];
};
-#define RS_MAX 97
-#define TS_MAX 30
-#define CB_MAX 256
-
struct svga_prescale {
float translate[4];
float scale[4];
@@ -276,9 +274,9 @@ struct svga_hw_view_state
*/
struct svga_hw_draw_state
{
- unsigned rs[RS_MAX];
- unsigned ts[16][TS_MAX];
- float cb[PIPE_SHADER_TYPES][CB_MAX][4];
+ unsigned rs[SVGA3D_RS_MAX];
+ unsigned ts[SVGA3D_PIXEL_SAMPLERREG_MAX][SVGA3D_TS_MAX];
+ float cb[PIPE_SHADER_TYPES][SVGA3D_CONSTREG_MAX][4];
struct svga_shader_result *fs;
struct svga_shader_result *vs;