summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/freedreno/a4xx
diff options
context:
space:
mode:
authorIlia Mirkin <[email protected]>2015-04-02 22:26:03 -0400
committerRob Clark <[email protected]>2015-04-05 16:36:34 -0400
commitbfb0a8eb6967065be92e40ba620fc6fededde51a (patch)
treea0b019be5e1ea93c37474d160cb15189144b279f /src/gallium/drivers/freedreno/a4xx
parent6cd9c94ce49a2c1a8826c1b1bf2fb73dc595131d (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/freedreno/a4xx')
-rw-r--r--src/gallium/drivers/freedreno/a4xx/fd4_emit.c2
-rw-r--r--src/gallium/drivers/freedreno/a4xx/fd4_texture.c2
-rw-r--r--src/gallium/drivers/freedreno/a4xx/fd4_texture.h1
3 files changed, 1 insertions, 4 deletions
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;
};