freedreno/ir3: Remove unused half precision shader key flag.
authorEric Anholt <eric@anholt.net>
Wed, 15 Apr 2020 18:34:16 +0000 (11:34 -0700)
committerMarge Bot <eric+marge@anholt.net>
Fri, 1 May 2020 16:26:32 +0000 (16:26 +0000)
The code using it was removed in 4af86bd0b933 ("freedreno/ir3: remove
half-precision output")

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4562>

src/freedreno/ir3/ir3_shader.h
src/gallium/drivers/freedreno/a3xx/fd3_draw.c
src/gallium/drivers/freedreno/a3xx/fd3_gmem.c
src/gallium/drivers/freedreno/a4xx/fd4_draw.c
src/gallium/drivers/freedreno/a4xx/fd4_gmem.c
src/gallium/drivers/freedreno/ir3/ir3_cmdline.c

index 0896bd1b185fb2aa9c658e40f3cb82a5a89c2c95..14f579baf415ba7e36d6cbe04c9484d9f850b1b6 100644 (file)
@@ -248,7 +248,6 @@ struct ir3_shader_key {
                        unsigned sample_shading : 1;
                        unsigned msaa           : 1;
                        unsigned color_two_side : 1;
-                       unsigned half_precision : 1;
                        /* used when shader needs to handle flat varyings (a4xx)
                         * for front/back color inputs to frag shader:
                         */
@@ -331,9 +330,6 @@ ir3_shader_key_changes_fs(struct ir3_shader_key *key, struct ir3_shader_key *las
        if (last_key->color_two_side != key->color_two_side)
                return true;
 
-       if (last_key->half_precision != key->half_precision)
-               return true;
-
        if (last_key->rasterflat != key->rasterflat)
                return true;
 
@@ -386,7 +382,6 @@ ir3_normalize_key(struct ir3_shader_key *key, gl_shader_stage type)
        case MESA_SHADER_VERTEX:
        case MESA_SHADER_GEOMETRY:
                key->color_two_side = false;
-               key->half_precision = false;
                key->rasterflat = false;
                if (key->has_per_samp) {
                        key->fsaturate_s = 0;
@@ -402,7 +397,6 @@ ir3_normalize_key(struct ir3_shader_key *key, gl_shader_stage type)
        case MESA_SHADER_TESS_CTRL:
        case MESA_SHADER_TESS_EVAL:
                key->color_two_side = false;
-               key->half_precision = false;
                key->rasterflat = false;
                if (key->has_per_samp) {
                        key->fsaturate_s = 0;
index 99e44db374c3c721c09e08ebe07f67675a09c502..e5485a0a01185379c690161d94fe961cbf2d9311 100644 (file)
@@ -126,8 +126,6 @@ fd3_draw_vbo(struct fd_context *ctx, const struct pipe_draw_info *info,
                        .color_two_side = ctx->rasterizer->light_twoside,
                        .vclamp_color = ctx->rasterizer->clamp_vertex_color,
                        .fclamp_color = ctx->rasterizer->clamp_fragment_color,
-                       .half_precision = ctx->in_discard_blit &&
-                                       fd_half_precision(&ctx->batch->framebuffer),
                        .has_per_samp = (fd3_ctx->fsaturate || fd3_ctx->vsaturate),
                        .vsaturate_s = fd3_ctx->vsaturate_s,
                        .vsaturate_t = fd3_ctx->vsaturate_t,
index a0fc1d3f96e78a80beaa4f9d8748389488a8bb07..af4c27373897ed651c0451f94ec97ec274da3839 100644 (file)
@@ -169,9 +169,6 @@ emit_binning_workaround(struct fd_batch *batch)
                        .debug = &ctx->debug,
                        .vtx = &ctx->solid_vbuf_state,
                        .prog = &ctx->solid_prog,
-                       .key = {
-                               .half_precision = true,
-                       },
        };
 
        OUT_PKT0(ring, REG_A3XX_RB_MODE_CONTROL, 2);
@@ -367,9 +364,6 @@ fd3_emit_tile_gmem2mem(struct fd_batch *batch, const struct fd_tile *tile)
                        .debug = &ctx->debug,
                        .vtx = &ctx->solid_vbuf_state,
                        .prog = &ctx->solid_prog,
-                       .key = {
-                               .half_precision = true,
-                       },
        };
        int i;
 
@@ -551,9 +545,6 @@ fd3_emit_tile_mem2gmem(struct fd_batch *batch, const struct fd_tile *tile)
                        .sprite_coord_enable = 1,
                        /* NOTE: They all use the same VP, this is for vtx bufs. */
                        .prog = &ctx->blit_prog[0],
-                       .key = {
-                               .half_precision = fd_half_precision(pfb),
-                       },
        };
        float x0, y0, x1, y1;
        unsigned bin_w = tile->bin_w;
@@ -680,14 +671,12 @@ fd3_emit_tile_mem2gmem(struct fd_batch *batch, const struct fd_tile *tile)
                         * components, so half precision is always sufficient.
                         */
                        emit.prog = &ctx->blit_prog[0];
-                       emit.key.half_precision = true;
                } else {
                        /* Float depth needs special blit shader that writes depth */
                        if (pfb->zsbuf->format == PIPE_FORMAT_Z32_FLOAT)
                                emit.prog = &ctx->blit_z;
                        else
                                emit.prog = &ctx->blit_zs;
-                       emit.key.half_precision = false;
                }
                emit.fs = NULL;      /* frag shader changed so clear cache */
                fd3_program_emit(ring, &emit, 1, &pfb->zsbuf);
index 9c8ef830051cf57abe46047cb32faf3dd3162962..fadc1511e628a1dc3d4f8a8a54b535c305fe5e12 100644 (file)
@@ -111,8 +111,6 @@ fd4_draw_vbo(struct fd_context *ctx, const struct pipe_draw_info *info,
                        .vclamp_color = ctx->rasterizer->clamp_vertex_color,
                        .fclamp_color = ctx->rasterizer->clamp_fragment_color,
                        .rasterflat = ctx->rasterizer->flatshade,
-                       .half_precision = ctx->in_discard_blit &&
-                                       fd_half_precision(&ctx->batch->framebuffer),
                        .ucp_enables = ctx->rasterizer->clip_plane_enable,
                        .has_per_samp = (fd4_ctx->fsaturate || fd4_ctx->vsaturate ||
                                        fd4_ctx->fastc_srgb || fd4_ctx->vastc_srgb),
index 57f23a8304f35d5d71c67c4cb67c004e838c9e75..05915dbb90d4f33403df4f4d4e6a9ecbafa5cf28 100644 (file)
@@ -197,9 +197,6 @@ fd4_emit_tile_gmem2mem(struct fd_batch *batch, const struct fd_tile *tile)
                        .debug = &ctx->debug,
                        .vtx = &ctx->solid_vbuf_state,
                        .prog = &ctx->solid_prog,
-                       .key = {
-                               .half_precision = true,
-                       },
        };
 
        OUT_PKT0(ring, REG_A4XX_RB_DEPTH_CONTROL, 1);
@@ -337,9 +334,6 @@ fd4_emit_tile_mem2gmem(struct fd_batch *batch, const struct fd_tile *tile)
                        .sprite_coord_enable = 1,
                        /* NOTE: They all use the same VP, this is for vtx bufs. */
                        .prog = &ctx->blit_prog[0],
-                       .key = {
-                               .half_precision = fd_half_precision(pfb),
-                       },
                        .no_decode_srgb = true,
        };
        unsigned char mrt_comp[A4XX_MAX_RENDER_TARGETS] = {0};
@@ -470,7 +464,6 @@ fd4_emit_tile_mem2gmem(struct fd_batch *batch, const struct fd_tile *tile)
                case PIPE_FORMAT_Z32_FLOAT:
                        emit.prog = (pfb->zsbuf->format == PIPE_FORMAT_Z32_FLOAT) ?
                                        &ctx->blit_z : &ctx->blit_zs;
-                       emit.key.half_precision = false;
 
                        OUT_PKT0(ring, REG_A4XX_RB_DEPTH_CONTROL, 1);
                        OUT_RING(ring, A4XX_RB_DEPTH_CONTROL_Z_ENABLE |
@@ -490,7 +483,6 @@ fd4_emit_tile_mem2gmem(struct fd_batch *batch, const struct fd_tile *tile)
                         * components, so half precision is always sufficient.
                         */
                        emit.prog = &ctx->blit_prog[0];
-                       emit.key.half_precision = true;
                        break;
                }
                emit.fs = NULL;      /* frag shader changed so clear cache */
index 6eecee3a68bf0749b9cb4debb3e80e10dba75ec0..7edee3086bfdd7426f2f109283728369325e6162 100644 (file)
@@ -326,7 +326,6 @@ int main(int argc, char **argv)
 
                if (!strcmp(argv[n], "--half-precision")) {
                        debug_printf(" %s", argv[n]);
-                       key.half_precision = true;
                        n++;
                        continue;
                }