From fd7be16bd361fcb9fcf8e8e3e6eed5a086936d06 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Wed, 20 Jan 2021 12:33:49 -0800 Subject: [PATCH] v3d: Clean up vestiges of alpha test lowering. We had an unnecessary case in our uniforms upload switch statement, since we no longer advertise the cap. Fixes: 8ad931808e2d ("v3d: do not report alpha-test as supported") Reviewed-by: Iago Toral Quiroga Part-of: (cherry picked from commit 5ddc2f916fbe32af2443af59727dbbc543e04b88) --- .pick_status.json | 2 +- src/broadcom/compiler/v3d_compiler.h | 4 ---- src/broadcom/compiler/vir_dump.c | 1 - src/broadcom/vulkan/v3dv_pipeline.c | 4 ---- src/gallium/drivers/v3d/v3d_program.c | 5 ----- src/gallium/drivers/v3d/v3d_uniforms.c | 9 --------- 6 files changed, 1 insertion(+), 24 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index c96e9a69a3c..e0ade1df6be 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -499,7 +499,7 @@ "description": "v3d: Clean up vestiges of alpha test lowering.", "nominated": true, "nomination_type": 1, - "resolution": 0, + "resolution": 1, "master_sha": null, "because_sha": "8ad931808e2d3f54b4bf2ddbbaa632be1018801a" }, diff --git a/src/broadcom/compiler/v3d_compiler.h b/src/broadcom/compiler/v3d_compiler.h index d0bfa1f6470..12c2951415a 100644 --- a/src/broadcom/compiler/v3d_compiler.h +++ b/src/broadcom/compiler/v3d_compiler.h @@ -261,8 +261,6 @@ enum quniform_contents { QUNIFORM_IMAGE_DEPTH, QUNIFORM_IMAGE_ARRAY_SIZE, - QUNIFORM_ALPHA_REF, - QUNIFORM_LINE_WIDTH, /* The line width sent to hardware. This includes the expanded width @@ -367,7 +365,6 @@ struct v3d_fs_key { bool is_points; bool is_lines; bool line_smoothing; - bool alpha_test; bool point_coord_upper_left; bool light_twoside; bool msaa; @@ -395,7 +392,6 @@ struct v3d_fs_key { const uint8_t *swizzle; } color_fmt[V3D_MAX_DRAW_BUFFERS]; - uint8_t alpha_test_func; uint8_t logicop_func; uint32_t point_sprite_mask; diff --git a/src/broadcom/compiler/vir_dump.c b/src/broadcom/compiler/vir_dump.c index 98cb226a59c..576b0d7263e 100644 --- a/src/broadcom/compiler/vir_dump.c +++ b/src/broadcom/compiler/vir_dump.c @@ -30,7 +30,6 @@ vir_dump_uniform(enum quniform_contents contents, uint32_t data) { static const char *quniform_names[] = { - [QUNIFORM_ALPHA_REF] = "alpha_ref", [QUNIFORM_LINE_WIDTH] = "line_width", [QUNIFORM_AA_LINE_WIDTH] = "aa_line_width", [QUNIFORM_VIEWPORT_X_SCALE] = "vp_x_scale", diff --git a/src/broadcom/vulkan/v3dv_pipeline.c b/src/broadcom/vulkan/v3dv_pipeline.c index 0274c4a5bb6..47a94be7051 100644 --- a/src/broadcom/vulkan/v3dv_pipeline.c +++ b/src/broadcom/vulkan/v3dv_pipeline.c @@ -1134,10 +1134,6 @@ pipeline_populate_v3d_fs_key(struct v3d_fs_key *key, } } - /* Vulkan doesn't support alpha test */ - key->alpha_test = false; - key->alpha_test_func = COMPARE_FUNC_NEVER; - /* This is intended for V3D versions before 4.1, otherwise we just use the * tile buffer load/store swap R/B bit. */ diff --git a/src/gallium/drivers/v3d/v3d_program.c b/src/gallium/drivers/v3d/v3d_program.c index a17078da093..bf148ee3aba 100644 --- a/src/gallium/drivers/v3d/v3d_program.c +++ b/src/gallium/drivers/v3d/v3d_program.c @@ -566,11 +566,6 @@ v3d_update_compiled_fs(struct v3d_context *v3d, uint8_t prim_mode) key->sample_alpha_to_one = v3d->blend->base.alpha_to_one; } - if (v3d->zsa->base.alpha_enabled) { - key->alpha_test = true; - key->alpha_test_func = v3d->zsa->base.alpha_func; - } - key->swap_color_rb = v3d->swap_color_rb; for (int i = 0; i < v3d->framebuffer.nr_cbufs; i++) { diff --git a/src/gallium/drivers/v3d/v3d_uniforms.c b/src/gallium/drivers/v3d/v3d_uniforms.c index dfd65c9ed43..5b035fd7760 100644 --- a/src/gallium/drivers/v3d/v3d_uniforms.c +++ b/src/gallium/drivers/v3d/v3d_uniforms.c @@ -307,11 +307,6 @@ v3d_write_uniforms(struct v3d_context *v3d, struct v3d_job *job, data)); break; - case QUNIFORM_ALPHA_REF: - cl_aligned_f(&uniforms, - v3d->zsa->base.alpha_ref_value); - break; - case QUNIFORM_LINE_WIDTH: cl_aligned_f(&uniforms, v3d->rasterizer->base.line_width); @@ -469,10 +464,6 @@ v3d_set_shader_uniform_dirty_flags(struct v3d_compiled_shader *shader) dirty |= VC5_DIRTY_SHADER_IMAGE; break; - case QUNIFORM_ALPHA_REF: - dirty |= VC5_DIRTY_ZSA; - break; - case QUNIFORM_LINE_WIDTH: case QUNIFORM_AA_LINE_WIDTH: dirty |= VC5_DIRTY_RASTERIZER;