crocus: support rebinding streamout target buffers
Reviewed-by: Zoltán Böszörményi <zboszor@pr.hu> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11710>
This commit is contained in:
@@ -1113,10 +1113,6 @@ crocus_invalidate_resource(struct pipe_context *ctx,
|
||||
if (res->bo->userptr)
|
||||
return;
|
||||
|
||||
// XXX: We should support this.
|
||||
if (res->bind_history & PIPE_BIND_STREAM_OUTPUT)
|
||||
return;
|
||||
|
||||
struct crocus_bo *old_bo = res->bo;
|
||||
struct crocus_bo *new_bo =
|
||||
crocus_bo_alloc(screen->bufmgr, res->bo->name, resource->width0);
|
||||
|
@@ -8289,7 +8289,16 @@ crocus_rebind_buffer(struct crocus_context *ice,
|
||||
|
||||
if (res->bind_history & PIPE_BIND_STREAM_OUTPUT) {
|
||||
/* XXX: be careful about resetting vs appending... */
|
||||
assert(false);
|
||||
for (int i = 0; i < 4; i++) {
|
||||
if (ice->state.so_target[i] &&
|
||||
(ice->state.so_target[i]->buffer == &res->base.b)) {
|
||||
#if GFX_VER == 6
|
||||
ice->state.stage_dirty |= CROCUS_STAGE_DIRTY_BINDINGS_GS;
|
||||
#else
|
||||
ice->state.dirty |= CROCUS_DIRTY_GEN7_SO_BUFFERS;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (int s = MESA_SHADER_VERTEX; s < MESA_SHADER_STAGES; s++) {
|
||||
|
Reference in New Issue
Block a user