ib->user_buffer, &ib->offset, &ib->buffer);
}
-void r600_upload_const_buffer(struct si_context *rctx, struct r600_resource **rbuffer,
+void si_upload_const_buffer(struct si_context *rctx, struct r600_resource **rbuffer,
const uint8_t *ptr, unsigned size,
uint32_t *const_offset)
{
memcpy(kernel_args + (num_work_size_bytes / 4), input, program->input_size);
- r600_upload_const_buffer(rctx, &kernel_args_buffer, (uint8_t*)kernel_args,
+ si_upload_const_buffer(rctx, &kernel_args_buffer, (uint8_t*)kernel_args,
kernel_args_size, &kernel_args_offset);
kernel_args_va = r600_resource_va(ctx->screen,
(struct pipe_resource*)kernel_args_buffer);
if (input->user_buffer) {
unsigned buffer_offset;
- r600_upload_const_buffer(rctx,
- (struct r600_resource**)&buffer, input->user_buffer,
- input->buffer_size, &buffer_offset);
+ si_upload_const_buffer(rctx,
+ (struct r600_resource**)&buffer, input->user_buffer,
+ input->buffer_size, &buffer_offset);
va = r600_resource_va(ctx->screen, buffer) + buffer_offset;
} else {
pipe_resource_reference(&buffer, input->buffer);
/* otherwise backup path for older kernels */
/* create buffer for event data */
- buffer = r600_resource_create_custom(&ctx->screen->b.b,
+ buffer = si_resource_create_custom(&ctx->screen->b.b,
PIPE_USAGE_STAGING,
ctx->max_db*16);
if (!buffer)
* being written by the gpu, hence staging is probably a good
* usage pattern.
*/
- query->buffer = r600_resource_create_custom(&ctx->screen->b.b,
+ query->buffer = si_resource_create_custom(&ctx->screen->b.b,
PIPE_USAGE_STAGING,
buffer_size);
if (!query->buffer) {
rscreen->b.b.get_video_param = r600_get_video_param;
rscreen->b.b.is_video_format_supported = vl_video_buffer_is_format_supported;
}
- r600_init_screen_resource_functions(&rscreen->b.b);
+ si_init_screen_resource_functions(&rscreen->b.b);
if (!r600_common_screen_init(&rscreen->b, ws)) {
FREE(rscreen);
}
}
-void r600_init_screen_resource_functions(struct pipe_screen *screen)
+void si_init_screen_resource_functions(struct pipe_screen *screen)
{
screen->resource_create = r600_resource_create;
screen->resource_from_handle = r600_resource_from_handle;
#include "util/u_inlines.h"
static INLINE struct r600_resource *
-r600_resource_create_custom(struct pipe_screen *screen,
- unsigned usage, unsigned size)
+si_resource_create_custom(struct pipe_screen *screen,
+ unsigned usage, unsigned size)
{
assert(size);
return r600_resource(pipe_buffer_create(screen,
struct pipe_surface base;
};
-void r600_init_screen_resource_functions(struct pipe_screen *screen);
+void si_init_screen_resource_functions(struct pipe_screen *screen);
struct si_context;
-void r600_upload_const_buffer(struct si_context *rctx, struct r600_resource **rbuffer,
- const uint8_t *ptr, unsigned size,
- uint32_t *const_offset);
+void si_upload_const_buffer(struct si_context *rctx, struct r600_resource **rbuffer,
+ const uint8_t *ptr, unsigned size,
+ uint32_t *const_offset);
#endif
/* copy new shader */
r600_resource_reference(&shader->bo, NULL);
- shader->bo = r600_resource_create_custom(rctx->b.b.screen, PIPE_USAGE_IMMUTABLE,
+ shader->bo = si_resource_create_custom(rctx->b.b.screen, PIPE_USAGE_IMMUTABLE,
binary.code_size);
if (shader->bo == NULL) {
return -ENOMEM;
rctx->border_color_offset = 0;
rctx->border_color_table =
- r600_resource_create_custom(&rctx->screen->b.b,
+ si_resource_create_custom(&rctx->screen->b.b,
PIPE_USAGE_STAGING,
4096 * 4 * 4);
}