mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 07:28:11 +02:00
r600: clean up and refactor texture_buffer_sampler_view()
The parameters width0 and height0 are not used anymore and the function is prepared for the clamp update. Signed-off-by: Patrick Lerda <patrick9876@free.fr> Reviewed-by: Gert Wollny <gert.wollny@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35159>
This commit is contained in:
parent
af1465c36b
commit
1d03751801
2 changed files with 6 additions and 8 deletions
|
|
@ -693,8 +693,7 @@ static void evergreen_fill_buffer_resource_words(struct r600_context *rctx,
|
|||
|
||||
static struct pipe_sampler_view *
|
||||
texture_buffer_sampler_view(struct r600_context *rctx,
|
||||
struct r600_pipe_sampler_view *view,
|
||||
unsigned width0, unsigned height0)
|
||||
struct r600_pipe_sampler_view *view)
|
||||
{
|
||||
struct r600_texture *tmp = (struct r600_texture*)view->base.texture;
|
||||
struct eg_buf_res_params params;
|
||||
|
|
@ -944,7 +943,7 @@ evergreen_create_sampler_view_custom(struct pipe_context *ctx,
|
|||
view->base.context = ctx;
|
||||
|
||||
if (state->target == PIPE_BUFFER)
|
||||
return texture_buffer_sampler_view(rctx, view, width0, height0);
|
||||
return texture_buffer_sampler_view(rctx, view);
|
||||
|
||||
memset(¶ms, 0, sizeof(params));
|
||||
params.pipe_format = state->format;
|
||||
|
|
|
|||
|
|
@ -615,12 +615,11 @@ static void *r600_create_sampler_state(struct pipe_context *ctx,
|
|||
}
|
||||
|
||||
static struct pipe_sampler_view *
|
||||
texture_buffer_sampler_view(struct r600_pipe_sampler_view *view,
|
||||
unsigned width0, unsigned height0)
|
||||
|
||||
texture_buffer_sampler_view(struct pipe_context *ctx,
|
||||
struct r600_pipe_sampler_view *view)
|
||||
{
|
||||
struct r600_texture *tmp = (struct r600_texture*)view->base.texture;
|
||||
int stride = util_format_get_blocksize(view->base.format);
|
||||
const unsigned stride = util_format_get_blocksize(view->base.format);
|
||||
unsigned format, num_format, format_comp, endian;
|
||||
uint64_t offset = view->base.u.buf.offset;
|
||||
unsigned size = view->base.u.buf.size;
|
||||
|
|
@ -678,7 +677,7 @@ r600_create_sampler_view_custom(struct pipe_context *ctx,
|
|||
view->base.context = ctx;
|
||||
|
||||
if (texture->target == PIPE_BUFFER)
|
||||
return texture_buffer_sampler_view(view, texture->width0, 1);
|
||||
return texture_buffer_sampler_view(ctx, view);
|
||||
|
||||
swizzle[0] = state->swizzle_r;
|
||||
swizzle[1] = state->swizzle_g;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue