evergreeng: protect against null constant buffers

Should do better than this and actually unbind the buffer, but haven't
yet gotten it to work.
This commit is contained in:
Keith Whitwell
2010-11-03 10:24:28 +00:00
parent 3f7876d76f
commit b3462601cb
@@ -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;