summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/softpipe/sp_context.c
diff options
context:
space:
mode:
authorMichal Krol <[email protected]>2010-01-19 13:20:15 +0100
committerMichal Krol <[email protected]>2010-01-28 14:07:29 +0100
commit835bab0143e11ab98551a061043f944fd6eab456 (patch)
treeb9990efa6c4efe19c1cddec85ea57d5ecaab1d97 /src/gallium/drivers/softpipe/sp_context.c
parent4367de152cc5bd7240d75a33e75c1b1671b5cc16 (diff)
gallium: Implement 2D constant buffers for fragment shader in softpipe.
Diffstat (limited to 'src/gallium/drivers/softpipe/sp_context.c')
-rw-r--r--src/gallium/drivers/softpipe/sp_context.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/gallium/drivers/softpipe/sp_context.c b/src/gallium/drivers/softpipe/sp_context.c
index 73e075f0d88..a3a7825aa18 100644
--- a/src/gallium/drivers/softpipe/sp_context.c
+++ b/src/gallium/drivers/softpipe/sp_context.c
@@ -111,9 +111,13 @@ softpipe_destroy( struct pipe_context *pipe )
pipe_texture_reference(&softpipe->vertex_textures[i], NULL);
}
- for (i = 0; i < Elements(softpipe->constants); i++) {
- if (softpipe->constants[i]) {
- pipe_buffer_reference(&softpipe->constants[i], NULL);
+ for (i = 0; i < PIPE_SHADER_TYPES; i++) {
+ uint j;
+
+ for (j = 0; j < PIPE_MAX_CONSTANT; j++) {
+ if (softpipe->constants[i][j]) {
+ pipe_buffer_reference(&softpipe->constants[i][j], NULL);
+ }
}
}