if (scratch_bo_size < scratch_needed) {
r600_resource_reference(&sctx->compute_scratch_buffer, NULL);
- sctx->compute_scratch_buffer =
- si_resource_create_custom(&sctx->screen->b.b,
- PIPE_USAGE_DEFAULT, scratch_needed);
+ sctx->compute_scratch_buffer = (struct r600_resource*)
+ pipe_buffer_create(&sctx->screen->b.b, 0,
+ PIPE_USAGE_DEFAULT, scratch_needed);
if (!sctx->compute_scratch_buffer)
return false;
if (!sctx->scratch_buffer ||
sctx->scratch_buffer->b.b.width0 < scratch_size) {
r600_resource_reference(&sctx->scratch_buffer, NULL);
- sctx->scratch_buffer =
- si_resource_create_custom(&sctx->screen->b.b,
- PIPE_USAGE_DEFAULT,
- scratch_size);
+ sctx->scratch_buffer = (struct r600_resource*)
+ pipe_buffer_create(&sctx->screen->b.b, 0,
+ PIPE_USAGE_DEFAULT, scratch_size);
if (!sctx->scratch_buffer)
return;
sctx->emit_scratch_reloc = true;
* common helpers
*/
-static inline struct r600_resource *
-si_resource_create_custom(struct pipe_screen *screen,
- unsigned usage, unsigned size)
-{
- assert(size);
- return r600_resource(pipe_buffer_create(screen, 0, usage, size));
-}
-
static inline void
si_invalidate_draw_sh_constants(struct si_context *sctx)
{
assert(!epilog || !epilog->rodata_size);
r600_resource_reference(&shader->bo, NULL);
- shader->bo = si_resource_create_custom(&sscreen->b.b,
- PIPE_USAGE_IMMUTABLE,
- bo_size);
+ shader->bo = (struct r600_resource*)
+ pipe_buffer_create(&sscreen->b.b, 0,
+ PIPE_USAGE_IMMUTABLE, bo_size);
if (!shader->bo)
return -ENOMEM;
/* Create a bigger scratch buffer */
r600_resource_reference(&sctx->scratch_buffer, NULL);
- sctx->scratch_buffer =
- si_resource_create_custom(&sctx->screen->b.b,
+ sctx->scratch_buffer = (struct r600_resource*)
+ pipe_buffer_create(&sctx->screen->b.b, 0,
PIPE_USAGE_DEFAULT, scratch_needed_size);
if (!sctx->scratch_buffer)
return false;