Module: Mesa
Branch: staging/22.3
Commit: d45e128fb605d77a9c645629a0407c5c59f99f6b
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=d45e128fb605d77a9c645629a0407c5c59f99f6b

Author: Maíra Canal <[email protected]>
Date:   Tue Jan 17 10:20:45 2023 -0300

v3dv: remove unused clamp_to_transparent_black_border property

Commit e07c5467 ("v3dv/format: use XYZ1 swizzle for three-component formats")
removes the only code that handled the clamp_to_transparent_black_border
variable. Therefore, the variable can be deleted, as it is not currently
being used.

Fixes: e07c5467 ("v3dv/format: use XYZ1 swizzle for three-component formats")
Signed-off-by: Maíra Canal <[email protected]>
Reviewed-by: Alejandro Piñeiro <[email protected]>
Reviewed-by: Iago Toral Quiroga <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20746>
(cherry picked from commit 86c9bdcd9adc952654f58329d4d482b7a509f5c7)

---

 .pick_status.json                  |  2 +-
 src/broadcom/vulkan/v3dv_private.h |  1 -
 src/broadcom/vulkan/v3dvx_device.c | 15 ---------------
 3 files changed, 1 insertion(+), 17 deletions(-)

diff --git a/.pick_status.json b/.pick_status.json
index 785e71eb85c..167c146e15b 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -364,7 +364,7 @@
         "description": "v3dv: remove unused clamp_to_transparent_black_border 
property",
         "nominated": true,
         "nomination_type": 1,
-        "resolution": 0,
+        "resolution": 1,
         "main_sha": null,
         "because_sha": "e07c5467633431377ce4c9890f96d58cc7a77fdc"
     },
diff --git a/src/broadcom/vulkan/v3dv_private.h 
b/src/broadcom/vulkan/v3dv_private.h
index 1374fa53fec..27b0646d30e 100644
--- a/src/broadcom/vulkan/v3dv_private.h
+++ b/src/broadcom/vulkan/v3dv_private.h
@@ -1971,7 +1971,6 @@ struct v3dv_sampler {
 
    bool compare_enable;
    bool unnormalized_coordinates;
-   bool clamp_to_transparent_black_border;
 
    /* Prepacked SAMPLER_STATE, that is referenced as part of the tmu
     * configuration. If needed it will be copied to the descriptor info during
diff --git a/src/broadcom/vulkan/v3dvx_device.c 
b/src/broadcom/vulkan/v3dvx_device.c
index 9fdb47c1d48..25ecac3496d 100644
--- a/src/broadcom/vulkan/v3dvx_device.c
+++ b/src/broadcom/vulkan/v3dvx_device.c
@@ -194,21 +194,6 @@ v3dX(pack_sampler_state)(struct v3dv_sampler *sampler,
       break;
    }
 
-   /* For some texture formats, when clamping to transparent black border the
-    * CTS expects alpha to be set to 1 instead of 0, but the border color mode
-    * will take priority over the texture state swizzle, so the only way to
-    * fix that is to apply a swizzle in the shader. Here we keep track of
-    * whether we are activating that mode and we will decide if we need to
-    * activate the texture swizzle lowering in the shader key at compile time
-    * depending on the actual texture format.
-    */
-   if ((pCreateInfo->addressModeU == VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_BORDER ||
-        pCreateInfo->addressModeV == VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_BORDER ||
-        pCreateInfo->addressModeW == VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_BORDER) 
&&
-       border_color_mode == V3D_BORDER_COLOR_0000) {
-      sampler->clamp_to_transparent_black_border = true;
-   }
-
    v3dvx_pack(sampler->sampler_state, SAMPLER_STATE, s) {
       if (pCreateInfo->anisotropyEnable) {
          s.anisotropy_enable = true;

Reply via email to