view->resource is redundant with view->base.texture, so get rid of it.
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
if (view) {
struct si_sampler_view *rview =
(struct si_sampler_view*)view;
- struct r600_texture *rtex = (struct r600_texture*)view->texture;
+ struct r600_texture *rtex = (struct r600_texture *)view->texture;
si_sampler_view_add_buffer(sctx, view->texture);
struct si_sampler_view {
struct pipe_sampler_view base;
struct list_head list;
- struct r600_resource *resource;
/* [0..7] = image descriptor
* [4..7] = buffer descriptor */
uint32_t state[8];
}
pipe_resource_reference(&view->base.texture, texture);
- view->resource = &tmp->resource;
if (state->format == PIPE_FORMAT_X24S8_UINT ||
state->format == PIPE_FORMAT_S8X24_UINT ||
{
struct si_sampler_view *view = (struct si_sampler_view *)state;
- if (view->resource && view->resource->b.b.target == PIPE_BUFFER)
+ if (state->texture && state->texture->target == PIPE_BUFFER)
LIST_DELINIT(&view->list);
pipe_resource_reference(&state->texture, NULL);