Mesa (master): st/mesa: treat resource-less xfb buffers as if they weren' t there
Ilia Mirkin
imirkin at kemper.freedesktop.org
Sat Feb 14 22:37:48 UTC 2015
Module: Mesa
Branch: master
Commit: 80d373ed5b1d90a5e71747ee5b8951baac62f750
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=80d373ed5b1d90a5e71747ee5b8951baac62f750
Author: Ilia Mirkin <imirkin at alum.mit.edu>
Date: Sat Feb 14 01:27:19 2015 -0500
st/mesa: treat resource-less xfb buffers as if they weren't there
If a transform feedback buffer's size is 0, st_bufferobj_data doesn't
end up creating a buffer for it. There's no point in trying to write to
such a buffer, so just pretend as if it's not really there.
This fixes arb_gpu_shader5-xfb-streams-without-invocations on nvc0.
Signed-off-by: Ilia Mirkin <imirkin at alum.mit.edu>
Reviewed-by: Marek Olšák <marek.olsak at amd.com>
Cc: "10.4 10.5" <mesa-stable at lists.freedesktop.org>
---
src/mesa/state_tracker/st_cb_xformfb.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/mesa/state_tracker/st_cb_xformfb.c b/src/mesa/state_tracker/st_cb_xformfb.c
index 8f75eda..a2bd86a 100644
--- a/src/mesa/state_tracker/st_cb_xformfb.c
+++ b/src/mesa/state_tracker/st_cb_xformfb.c
@@ -122,7 +122,7 @@ st_begin_transform_feedback(struct gl_context *ctx, GLenum mode,
for (i = 0; i < max_num_targets; i++) {
struct st_buffer_object *bo = st_buffer_object(sobj->base.Buffers[i]);
- if (bo) {
+ if (bo && bo->buffer) {
/* Check whether we need to recreate the target. */
if (!sobj->targets[i] ||
sobj->targets[i] == sobj->draw_count ||
More information about the mesa-commit
mailing list