projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3f7876d
)
evergreeng: protect against null constant buffers
author
Keith Whitwell
<keithw@vmware.com>
Wed, 3 Nov 2010 10:24:28 +0000
(10:24 +0000)
committer
Keith Whitwell
<keithw@vmware.com>
Wed, 3 Nov 2010 10:55:22 +0000
(10:55 +0000)
Should do better than this and actually unbind the buffer, but haven't
yet gotten it to work.
src/gallium/drivers/r600/evergreen_state.c
patch
|
blob
|
history
diff --git
a/src/gallium/drivers/r600/evergreen_state.c
b/src/gallium/drivers/r600/evergreen_state.c
index 722234850676ac6464670eedf101a8ad1a830b43..ce8e93a1d2555ef68e9ff19cce36da9867846698 100644
(file)
--- a/
src/gallium/drivers/r600/evergreen_state.c
+++ b/
src/gallium/drivers/r600/evergreen_state.c
@@
-826,6
+826,13
@@
static void evergreen_set_constant_buffer(struct pipe_context *ctx, uint shader,
struct r600_pipe_context *rctx = (struct r600_pipe_context *)ctx;
struct r600_resource *rbuffer = (struct r600_resource*)buffer;
+ /* Note that the state tracker can unbind constant buffers by
+ * passing NULL here.
+ */
+ if (buffer == NULL) {
+ return;
+ }
+
switch (shader) {
case PIPE_SHADER_VERTEX:
rctx->vs_const_buffer.nregs = 0;