so that it can be used in parallel IBs.
This also removes the SO_FILLED_SIZE hack.
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
res->gpu_address, res->gpu_address + res->buf->size,
res->buf->size);
}
+
+ if (res->b.b.flags & SI_RESOURCE_FLAG_CLEAR)
+ si_screen_clear_buffer(sscreen, &res->b.b, 0, res->bo_size, 0);
+
return true;
}
const void *clear_value,
int clear_value_size)
{
- enum si_coherency coher;
-
- if (dst->flags & SI_RESOURCE_FLAG_SO_FILLED_SIZE)
- coher = SI_COHERENCY_CP;
- else
- coher = SI_COHERENCY_SHADER;
-
si_clear_buffer((struct si_context*)ctx, dst, offset, size, (uint32_t*)clear_value,
- clear_value_size, coher);
+ clear_value_size, SI_COHERENCY_SHADER);
}
void si_copy_buffer(struct si_context *sctx,
}
sctx->allocator_zeroed_memory =
- u_suballocator_create(&sctx->b, sscreen->info.gart_page_size,
- 0, PIPE_USAGE_DEFAULT,
- SI_RESOURCE_FLAG_SO_FILLED_SIZE, true);
+ u_suballocator_create(&sctx->b, sscreen->info.gart_page_size,
+ 0, PIPE_USAGE_DEFAULT,
+ SI_RESOURCE_FLAG_CLEAR, false);
if (!sctx->allocator_zeroed_memory)
goto fail;
#define SI_RESOURCE_FLAG_UNMAPPABLE (PIPE_RESOURCE_FLAG_DRV_PRIV << 4)
#define SI_RESOURCE_FLAG_READ_ONLY (PIPE_RESOURCE_FLAG_DRV_PRIV << 5)
#define SI_RESOURCE_FLAG_32BIT (PIPE_RESOURCE_FLAG_DRV_PRIV << 6)
-#define SI_RESOURCE_FLAG_SO_FILLED_SIZE (PIPE_RESOURCE_FLAG_DRV_PRIV << 7)
+#define SI_RESOURCE_FLAG_CLEAR (PIPE_RESOURCE_FLAG_DRV_PRIV << 7)
enum si_clear_code
{