summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/freedreno/a4xx/fd4_texture.c
diff options
context:
space:
mode:
authorRob Clark <[email protected]>2015-04-22 13:00:03 -0400
committerRob Clark <[email protected]>2015-04-22 13:20:28 -0400
commit48a651e98ce764a9dae3d4dfd6e18044414be18b (patch)
tree659c114c34294c3d8b0af62f980be883144359f0 /src/gallium/drivers/freedreno/a4xx/fd4_texture.c
parent21ceedfd8bd1b9e45ee12be24b328876bd7fa4eb (diff)
freedreno/a4xx: formats updates/fixes
Update formats table with new formats that Ilia has figured out, and fix sampling from srgb texture and integer vbo's. Signed-off-by: Rob Clark <[email protected]>
Diffstat (limited to 'src/gallium/drivers/freedreno/a4xx/fd4_texture.c')
-rw-r--r--src/gallium/drivers/freedreno/a4xx/fd4_texture.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gallium/drivers/freedreno/a4xx/fd4_texture.c b/src/gallium/drivers/freedreno/a4xx/fd4_texture.c
index f2cc33b1a63..6ba25d0816d 100644
--- a/src/gallium/drivers/freedreno/a4xx/fd4_texture.c
+++ b/src/gallium/drivers/freedreno/a4xx/fd4_texture.c
@@ -169,6 +169,9 @@ fd4_sampler_view_create(struct pipe_context *pctx, struct pipe_resource *prsc,
fd4_tex_swiz(cso->format, cso->swizzle_r, cso->swizzle_g,
cso->swizzle_b, cso->swizzle_a);
+ if (util_format_is_srgb(cso->format))
+ so->texconst0 |= A4XX_TEX_CONST_0_SRGB;
+
so->texconst1 =
A4XX_TEX_CONST_1_WIDTH(u_minify(prsc->width0, lvl)) |
A4XX_TEX_CONST_1_HEIGHT(u_minify(prsc->height0, lvl));