summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBas Nieuwenhuizen <bas@basnieuwenhuizen.nl>2020-04-07 22:23:09 +0200
committerDylan Baker <dylan@pnwbakers.com>2020-04-09 14:23:54 -0700
commitabdb320af446226e23ccb1f0b6a271d19596e2a9 (patch)
tree7d9d3fe5ae13469e47eb72790b3e1b63ada3e5fe
parent26dfb62c25185c1f397aef6bbc71b1105642139e (diff)
radv: Consider maximum sample distances for entire grid.
The other pixels in the grid might have samples with a larger distance than the (0,0) pixel. Fixes dEQP-VK.pipeline.multisample.sample_locations_ext.verify_location.samples_8_packed when CTS is compiled with clang. CC: <mesa-stable@lists.freedesktop.org> Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4480> (cherry picked from commit a3682670c821d34a6c6ffdcb0c68d4ed42916f98)
-rw-r--r--.pick_status.json2
-rw-r--r--src/amd/vulkan/radv_cmd_buffer.c10
2 files changed, 7 insertions, 5 deletions
diff --git a/.pick_status.json b/.pick_status.json
index 6a4e77b260a..6475bc50e23 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -454,7 +454,7 @@
"description": "radv: Consider maximum sample distances for entire grid.",
"nominated": true,
"nomination_type": 0,
- "resolution": 0,
+ "resolution": 1,
"master_sha": null,
"because_sha": null
},
diff --git a/src/amd/vulkan/radv_cmd_buffer.c b/src/amd/vulkan/radv_cmd_buffer.c
index c0d5c44dadf..f0067b6ed1d 100644
--- a/src/amd/vulkan/radv_cmd_buffer.c
+++ b/src/amd/vulkan/radv_cmd_buffer.c
@@ -793,10 +793,12 @@ radv_emit_sample_locations(struct radv_cmd_buffer *cmd_buffer)
num_samples);
/* Compute the maximum sample distance from the specified locations. */
- for (uint32_t i = 0; i < num_samples; i++) {
- VkOffset2D offset = sample_locs[0][i];
- max_sample_dist = MAX2(max_sample_dist,
- MAX2(abs(offset.x), abs(offset.y)));
+ for (unsigned i = 0; i < 4; ++i) {
+ for (uint32_t j = 0; j < num_samples; j++) {
+ VkOffset2D offset = sample_locs[i][j];
+ max_sample_dist = MAX2(max_sample_dist,
+ MAX2(abs(offset.x), abs(offset.y)));
+ }
}
/* Emit the specified user sample locations. */