mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-16 05:00:19 +01:00
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@alum.mit.edu>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Cc: "10.4 10.5" <mesa-stable@lists.freedesktop.org>
(cherry picked from commit 80d373ed5b)
This commit is contained in:
parent
dbf82d753b
commit
89289934fc
1 changed files with 1 additions and 1 deletions
|
|
@ -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 ||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue