OUT_RING(ring, 0x00010000 + (0x6 * const_idx));
OUT_RING(ring, sampler->tex0 | view->tex0);
- OUT_RELOC(ring, view->tex_resource->bo, 0, view->fmt, 0);
+ OUT_RELOC(ring, fd_resource(view->base.texture)->bo, 0, view->fmt, 0);
OUT_RING(ring, view->tex2);
OUT_RING(ring, sampler->tex3 | view->tex3);
OUT_RING(ring, sampler->tex4);
so->base.reference.count = 1;
so->base.context = pctx;
- so->tex_resource = rsc;
so->fmt = fd2_pipe2surface(cso->format);
so->tex0 = A2XX_SQ_TEX_0_PITCH(rsc->slices[0].pitch);
struct fd2_pipe_sampler_view {
struct pipe_sampler_view base;
- struct fd_resource *tex_resource;
enum a2xx_sq_surfaceformat fmt;
uint32_t tex0, tex2, tex3;
};
const struct fd3_pipe_sampler_view *view = tex->textures[i] ?
fd3_pipe_sampler_view(tex->textures[i]) :
&dummy_view;
- struct fd_resource *rsc = view->tex_resource;
+ struct fd_resource *rsc = fd_resource(view->base.texture);
unsigned start = view->base.u.tex.first_level;
unsigned end = view->base.u.tex.last_level;
so->base.reference.count = 1;
so->base.context = pctx;
- so->tex_resource = rsc;
-
so->texconst0 =
A3XX_TEX_CONST_0_TYPE(tex_type(prsc->target)) |
A3XX_TEX_CONST_0_FMT(fd3_pipe2tex(cso->format)) |
struct fd3_pipe_sampler_view {
struct pipe_sampler_view base;
- struct fd_resource *tex_resource;
uint32_t texconst0, texconst1, texconst2, texconst3;
};
const struct fd4_pipe_sampler_view *view = tex->textures[i] ?
fd4_pipe_sampler_view(tex->textures[i]) :
&dummy_view;
- struct fd_resource *rsc = view->tex_resource;
+ struct fd_resource *rsc = fd_resource(view->base.texture);
unsigned start = view->base.u.tex.first_level;
uint32_t offset = fd_resource_offset(rsc, start, 0);
so->base.reference.count = 1;
so->base.context = pctx;
- so->tex_resource = rsc;
-
so->texconst0 =
A4XX_TEX_CONST_0_TYPE(tex_type(prsc->target)) |
A4XX_TEX_CONST_0_FMT(fd4_pipe2tex(cso->format)) |
struct fd4_pipe_sampler_view {
struct pipe_sampler_view base;
- struct fd_resource *tex_resource;
uint32_t texconst0, texconst1, texconst2, texconst3, textconst4;
};