summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers
diff options
context:
space:
mode:
authorRob Clark <[email protected]>2019-03-06 09:44:14 -0500
committerRob Clark <[email protected]>2019-03-07 15:33:42 -0500
commit8dc47490c8384ebab1be3d582e8e4ba93187f6fa (patch)
tree3a19717f9a7703af0abdcbf8650ef4f526e401d6 /src/gallium/drivers
parent45271702ec9b69f8e420940e4584e4b162188ccb (diff)
freedreno/a6xx: remove astc_srgb workaround
Not used on a6xx, so remove some of the related plumbing that was copied over from older gens. Signed-off-by: Rob Clark <[email protected]>
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r--src/gallium/drivers/freedreno/a6xx/fd6_context.h3
-rw-r--r--src/gallium/drivers/freedreno/a6xx/fd6_draw.c5
-rw-r--r--src/gallium/drivers/freedreno/a6xx/fd6_texture.c38
-rw-r--r--src/gallium/drivers/freedreno/a6xx/fd6_texture.h1
4 files changed, 2 insertions, 45 deletions
diff --git a/src/gallium/drivers/freedreno/a6xx/fd6_context.h b/src/gallium/drivers/freedreno/a6xx/fd6_context.h
index 9c957322a53..e033a73f3be 100644
--- a/src/gallium/drivers/freedreno/a6xx/fd6_context.h
+++ b/src/gallium/drivers/freedreno/a6xx/fd6_context.h
@@ -78,9 +78,6 @@ struct fd6_context {
*/
uint16_t fsaturate_s, fsaturate_t, fsaturate_r;
- /* bitmask of samplers which need astc srgb workaround: */
- uint16_t vastc_srgb, fastc_srgb;
-
/* some state changes require a different shader variant. Keep
* track of this so we know when we need to re-emit shader state
* due to variant change. See fixup_shader_state()
diff --git a/src/gallium/drivers/freedreno/a6xx/fd6_draw.c b/src/gallium/drivers/freedreno/a6xx/fd6_draw.c
index c278d09d9d6..c049488db0f 100644
--- a/src/gallium/drivers/freedreno/a6xx/fd6_draw.c
+++ b/src/gallium/drivers/freedreno/a6xx/fd6_draw.c
@@ -158,16 +158,13 @@ fd6_draw_vbo(struct fd_context *ctx, const struct pipe_draw_info *info,
.fclamp_color = ctx->rasterizer->clamp_fragment_color,
.rasterflat = ctx->rasterizer->flatshade,
.ucp_enables = ctx->rasterizer->clip_plane_enable,
- .has_per_samp = (fd6_ctx->fsaturate || fd6_ctx->vsaturate ||
- fd6_ctx->fastc_srgb || fd6_ctx->vastc_srgb),
+ .has_per_samp = (fd6_ctx->fsaturate || fd6_ctx->vsaturate),
.vsaturate_s = fd6_ctx->vsaturate_s,
.vsaturate_t = fd6_ctx->vsaturate_t,
.vsaturate_r = fd6_ctx->vsaturate_r,
.fsaturate_s = fd6_ctx->fsaturate_s,
.fsaturate_t = fd6_ctx->fsaturate_t,
.fsaturate_r = fd6_ctx->fsaturate_r,
- .vastc_srgb = fd6_ctx->vastc_srgb,
- .fastc_srgb = fd6_ctx->fastc_srgb,
.vsamples = ctx->tex[PIPE_SHADER_VERTEX].samples,
.fsamples = ctx->tex[PIPE_SHADER_FRAGMENT].samples,
}
diff --git a/src/gallium/drivers/freedreno/a6xx/fd6_texture.c b/src/gallium/drivers/freedreno/a6xx/fd6_texture.c
index 6f61f4ed3da..f2f7276aaa8 100644
--- a/src/gallium/drivers/freedreno/a6xx/fd6_texture.c
+++ b/src/gallium/drivers/freedreno/a6xx/fd6_texture.c
@@ -213,12 +213,6 @@ fd6_sampler_states_bind(struct pipe_context *pctx,
}
}
-static bool
-use_astc_srgb_workaround(struct pipe_context *pctx, enum pipe_format format)
-{
- return false; // TODO check if this is still needed on a5xx
-}
-
static struct pipe_sampler_view *
fd6_sampler_view_create(struct pipe_context *pctx, struct pipe_resource *prsc,
const struct pipe_sampler_view *cso)
@@ -250,8 +244,6 @@ fd6_sampler_view_create(struct pipe_context *pctx, struct pipe_resource *prsc,
cso->swizzle_b, cso->swizzle_a);
if (util_format_is_srgb(format)) {
- if (use_astc_srgb_workaround(pctx, format))
- so->astc_srgb = true;
so->texconst0 |= A6XX_TEX_CONST_0_SRGB;
}
@@ -360,34 +352,6 @@ fd6_sampler_view_destroy(struct pipe_context *pctx,
free(view);
}
-static void
-fd6_set_sampler_views(struct pipe_context *pctx, enum pipe_shader_type shader,
- unsigned start, unsigned nr,
- struct pipe_sampler_view **views)
-{
- struct fd_context *ctx = fd_context(pctx);
- struct fd6_context *fd6_ctx = fd6_context(ctx);
- uint16_t astc_srgb = 0;
- unsigned i;
-
- for (i = 0; i < nr; i++) {
- if (views[i]) {
- struct fd6_pipe_sampler_view *view =
- fd6_pipe_sampler_view(views[i]);
- if (view->astc_srgb)
- astc_srgb |= (1 << i);
- }
- }
-
- fd_set_sampler_views(pctx, shader, start, nr, views);
-
- if (shader == PIPE_SHADER_FRAGMENT) {
- fd6_ctx->fastc_srgb = astc_srgb;
- } else if (shader == PIPE_SHADER_VERTEX) {
- fd6_ctx->vastc_srgb = astc_srgb;
- }
-}
-
static uint32_t
key_hash(const void *_key)
@@ -485,7 +449,7 @@ fd6_texture_init(struct pipe_context *pctx)
pctx->create_sampler_view = fd6_sampler_view_create;
pctx->sampler_view_destroy = fd6_sampler_view_destroy;
- pctx->set_sampler_views = fd6_set_sampler_views;
+ pctx->set_sampler_views = fd_set_sampler_views;
fd6_ctx->tex_cache = _mesa_hash_table_create(NULL, key_hash, key_equals);
}
diff --git a/src/gallium/drivers/freedreno/a6xx/fd6_texture.h b/src/gallium/drivers/freedreno/a6xx/fd6_texture.h
index 122f60bba27..9ca4cfbdf89 100644
--- a/src/gallium/drivers/freedreno/a6xx/fd6_texture.h
+++ b/src/gallium/drivers/freedreno/a6xx/fd6_texture.h
@@ -55,7 +55,6 @@ struct fd6_pipe_sampler_view {
uint32_t texconst0, texconst1, texconst2, texconst3, texconst5;
uint32_t texconst6, texconst7, texconst8, texconst9, texconst10, texconst11;
uint32_t offset;
- bool astc_srgb;
uint16_t seqno;
bool ubwc_enabled;
};