diff options
author | Ilia Mirkin <[email protected]> | 2015-04-02 22:26:03 -0400 |
---|---|---|
committer | Rob Clark <[email protected]> | 2015-04-05 16:36:34 -0400 |
commit | bfb0a8eb6967065be92e40ba620fc6fededde51a (patch) | |
tree | a0b019be5e1ea93c37474d160cb15189144b279f /src/gallium/drivers | |
parent | 6cd9c94ce49a2c1a8826c1b1bf2fb73dc595131d (diff) |
freedreno: remove tex_resource
pipe_sampler_view already contains a texture, remove the redundant
tex_resource member which pointed at the same thing.
Signed-off-by: Ilia Mirkin <[email protected]>
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r-- | src/gallium/drivers/freedreno/a2xx/fd2_emit.c | 2 | ||||
-rw-r--r-- | src/gallium/drivers/freedreno/a2xx/fd2_texture.c | 1 | ||||
-rw-r--r-- | src/gallium/drivers/freedreno/a2xx/fd2_texture.h | 1 | ||||
-rw-r--r-- | src/gallium/drivers/freedreno/a3xx/fd3_emit.c | 2 | ||||
-rw-r--r-- | src/gallium/drivers/freedreno/a3xx/fd3_texture.c | 2 | ||||
-rw-r--r-- | src/gallium/drivers/freedreno/a3xx/fd3_texture.h | 1 | ||||
-rw-r--r-- | src/gallium/drivers/freedreno/a4xx/fd4_emit.c | 2 | ||||
-rw-r--r-- | src/gallium/drivers/freedreno/a4xx/fd4_texture.c | 2 | ||||
-rw-r--r-- | src/gallium/drivers/freedreno/a4xx/fd4_texture.h | 1 |
9 files changed, 3 insertions, 11 deletions
diff --git a/src/gallium/drivers/freedreno/a2xx/fd2_emit.c b/src/gallium/drivers/freedreno/a2xx/fd2_emit.c index a533c298115..cc0ed59f300 100644 --- a/src/gallium/drivers/freedreno/a2xx/fd2_emit.c +++ b/src/gallium/drivers/freedreno/a2xx/fd2_emit.c @@ -140,7 +140,7 @@ emit_texture(struct fd_ringbuffer *ring, struct fd_context *ctx, 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); diff --git a/src/gallium/drivers/freedreno/a2xx/fd2_texture.c b/src/gallium/drivers/freedreno/a2xx/fd2_texture.c index b70eaa69898..90013e260ce 100644 --- a/src/gallium/drivers/freedreno/a2xx/fd2_texture.c +++ b/src/gallium/drivers/freedreno/a2xx/fd2_texture.c @@ -136,7 +136,6 @@ fd2_sampler_view_create(struct pipe_context *pctx, struct pipe_resource *prsc, 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); diff --git a/src/gallium/drivers/freedreno/a2xx/fd2_texture.h b/src/gallium/drivers/freedreno/a2xx/fd2_texture.h index b337acd40ae..4fffa08b3c3 100644 --- a/src/gallium/drivers/freedreno/a2xx/fd2_texture.h +++ b/src/gallium/drivers/freedreno/a2xx/fd2_texture.h @@ -50,7 +50,6 @@ fd2_sampler_stateobj(struct pipe_sampler_state *samp) 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; }; diff --git a/src/gallium/drivers/freedreno/a3xx/fd3_emit.c b/src/gallium/drivers/freedreno/a3xx/fd3_emit.c index 1b656b77464..5fd31f50daf 100644 --- a/src/gallium/drivers/freedreno/a3xx/fd3_emit.c +++ b/src/gallium/drivers/freedreno/a3xx/fd3_emit.c @@ -262,7 +262,7 @@ emit_textures(struct fd_context *ctx, struct fd_ringbuffer *ring, 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; diff --git a/src/gallium/drivers/freedreno/a3xx/fd3_texture.c b/src/gallium/drivers/freedreno/a3xx/fd3_texture.c index 69e2d587c93..6f44ee3c08e 100644 --- a/src/gallium/drivers/freedreno/a3xx/fd3_texture.c +++ b/src/gallium/drivers/freedreno/a3xx/fd3_texture.c @@ -223,8 +223,6 @@ fd3_sampler_view_create(struct pipe_context *pctx, struct pipe_resource *prsc, 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)) | diff --git a/src/gallium/drivers/freedreno/a3xx/fd3_texture.h b/src/gallium/drivers/freedreno/a3xx/fd3_texture.h index f3cb12022f0..c38fd847f27 100644 --- a/src/gallium/drivers/freedreno/a3xx/fd3_texture.h +++ b/src/gallium/drivers/freedreno/a3xx/fd3_texture.h @@ -51,7 +51,6 @@ fd3_sampler_stateobj(struct pipe_sampler_state *samp) struct fd3_pipe_sampler_view { struct pipe_sampler_view base; - struct fd_resource *tex_resource; uint32_t texconst0, texconst1, texconst2, texconst3; }; diff --git a/src/gallium/drivers/freedreno/a4xx/fd4_emit.c b/src/gallium/drivers/freedreno/a4xx/fd4_emit.c index 37552cf3c06..bf51847706e 100644 --- a/src/gallium/drivers/freedreno/a4xx/fd4_emit.c +++ b/src/gallium/drivers/freedreno/a4xx/fd4_emit.c @@ -207,7 +207,7 @@ emit_textures(struct fd_context *ctx, struct fd_ringbuffer *ring, 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); diff --git a/src/gallium/drivers/freedreno/a4xx/fd4_texture.c b/src/gallium/drivers/freedreno/a4xx/fd4_texture.c index 40aca0e4d05..f2cc33b1a63 100644 --- a/src/gallium/drivers/freedreno/a4xx/fd4_texture.c +++ b/src/gallium/drivers/freedreno/a4xx/fd4_texture.c @@ -162,8 +162,6 @@ fd4_sampler_view_create(struct pipe_context *pctx, struct pipe_resource *prsc, 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)) | diff --git a/src/gallium/drivers/freedreno/a4xx/fd4_texture.h b/src/gallium/drivers/freedreno/a4xx/fd4_texture.h index 975dfe5157d..579ed87f14b 100644 --- a/src/gallium/drivers/freedreno/a4xx/fd4_texture.h +++ b/src/gallium/drivers/freedreno/a4xx/fd4_texture.h @@ -50,7 +50,6 @@ fd4_sampler_stateobj(struct pipe_sampler_state *samp) struct fd4_pipe_sampler_view { struct pipe_sampler_view base; - struct fd_resource *tex_resource; uint32_t texconst0, texconst1, texconst2, texconst3, textconst4; }; |