summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrancisco Jerez <[email protected]>2014-02-19 15:36:48 +0100
committerFrancisco Jerez <[email protected]>2014-02-19 19:03:56 +0100
commit8928d7860a6b14ec57c3a600bc429e4563990ead (patch)
tree9e6ed7385d5b70c7ff1eea0a2fc7d8703c6c1691
parenteef710fc53113a5b3d6bbf7d9a20f63d7add7911 (diff)
i965/fs: Allocate the param_size array dynamically.
Useful because the total number of uniform components might exceed MAX_UNIFORMS * 4 in some cases because of the image metadata we'll be passing as push constants. Reviewed-by: Paul Berry <[email protected]>
-rw-r--r--src/mesa/drivers/dri/i965/brw_fs.h2
-rw-r--r--src/mesa/drivers/dri/i965/brw_fs_visitor.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_fs.h b/src/mesa/drivers/dri/i965/brw_fs.h
index 0362c5d3cd7..eb9e1bf06a3 100644
--- a/src/mesa/drivers/dri/i965/brw_fs.h
+++ b/src/mesa/drivers/dri/i965/brw_fs.h
@@ -491,7 +491,7 @@ public:
struct brw_wm_compile *c;
unsigned int sanity_param_count;
- int param_size[MAX_UNIFORMS * 4];
+ int *param_size;
int *virtual_grf_sizes;
int virtual_grf_count;
diff --git a/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp b/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp
index b0fed9eecda..aea3360a33f 100644
--- a/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp
@@ -2992,7 +2992,7 @@ fs_visitor::fs_visitor(struct brw_context *brw,
this->spilled_any_registers = false;
- memset(&this->param_size, 0, sizeof(this->param_size));
+ this->param_size = rzalloc_array(mem_ctx, int, stage_prog_data->nr_params);
}
fs_visitor::~fs_visitor()