projects
/
mesa.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
gallium: move ddebug, noop, rbug, trace to auxiliary to improve build times
[mesa.git]
/
src
/
gallium
/
drivers
/
freedreno
/
freedreno_draw.c
diff --git
a/src/gallium/drivers/freedreno/freedreno_draw.c
b/src/gallium/drivers/freedreno/freedreno_draw.c
index fc24776e4a9f54a59be7f2a4a1e8badb1c3120a2..eb36a930751432a86827ad980c0e7bc2459c8255 100644
(file)
--- a/
src/gallium/drivers/freedreno/freedreno_draw.c
+++ b/
src/gallium/drivers/freedreno/freedreno_draw.c
@@
-55,7
+55,6
@@
resource_written(struct fd_batch *batch, struct pipe_resource *prsc)
{
if (!prsc)
return;
{
if (!prsc)
return;
- fd_resource(prsc)->valid = true;
fd_batch_resource_used(batch, fd_resource(prsc), true);
}
fd_batch_resource_used(batch, fd_resource(prsc), true);
}
@@
-147,7
+146,7
@@
fd_draw_vbo(struct pipe_context *pctx, const struct pipe_draw_info *info)
if (fd_stencil_enabled(ctx)) {
if (fd_resource(pfb->zsbuf->texture)->valid)
if (fd_stencil_enabled(ctx)) {
if (fd_resource(pfb->zsbuf->texture)->valid)
- restore_buffers |= FD_BUFFER_
DEPTH
;
+ restore_buffers |= FD_BUFFER_
STENCIL
;
buffers |= FD_BUFFER_STENCIL;
resource_written(batch, pfb->zsbuf->texture);
batch->gmem_reason |= FD_GMEM_STENCIL_ENABLED;
buffers |= FD_BUFFER_STENCIL;
resource_written(batch, pfb->zsbuf->texture);
batch->gmem_reason |= FD_GMEM_STENCIL_ENABLED;
@@
-460,7
+459,7
@@
fd_launch_grid(struct pipe_context *pctx, const struct pipe_grid_info *info)
struct fd_batch *batch, *save_batch = NULL;
unsigned i;
struct fd_batch *batch, *save_batch = NULL;
unsigned i;
- batch = fd_batch_create(ctx);
+ batch = fd_batch_create(ctx
, true
);
fd_batch_reference(&save_batch, ctx->batch);
fd_batch_reference(&ctx->batch, batch);
fd_batch_reference(&save_batch, ctx->batch);
fd_batch_reference(&ctx->batch, batch);
@@
-489,14
+488,21
@@
fd_launch_grid(struct pipe_context *pctx, const struct pipe_grid_info *info)
foreach_bit(i, ctx->tex[PIPE_SHADER_COMPUTE].valid_textures)
resource_read(batch, ctx->tex[PIPE_SHADER_COMPUTE].textures[i]->texture);
foreach_bit(i, ctx->tex[PIPE_SHADER_COMPUTE].valid_textures)
resource_read(batch, ctx->tex[PIPE_SHADER_COMPUTE].textures[i]->texture);
+ /* For global buffers, we don't really know if read or written, so assume
+ * the worst:
+ */
+ foreach_bit(i, ctx->global_bindings.enabled_mask)
+ resource_written(batch, ctx->global_bindings.buf[i]);
+
if (info->indirect)
resource_read(batch, info->indirect);
mtx_unlock(&ctx->screen->lock);
if (info->indirect)
resource_read(batch, info->indirect);
mtx_unlock(&ctx->screen->lock);
+ batch->needs_flush = true;
ctx->launch_grid(ctx, info);
ctx->launch_grid(ctx, info);
- fd_
gmem_flush_compute(batch
);
+ fd_
batch_flush(batch, false, false
);
fd_batch_reference(&ctx->batch, save_batch);
fd_batch_reference(&save_batch, NULL);
fd_batch_reference(&ctx->batch, save_batch);
fd_batch_reference(&save_batch, NULL);