mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-23 04:40:09 +01:00
radv: Expose VK_SAMPLE_COUNT_1_BIT for sample position on GFX10+
This works on GFX10+. Signed-off-by: Autumn Ashton <misyl@froggi.es> Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28237>
This commit is contained in:
parent
693e3b47f7
commit
ae6d24c4ef
2 changed files with 7 additions and 1 deletions
|
|
@ -1226,6 +1226,7 @@ radv_emit_sample_locations(struct radv_cmd_buffer *cmd_buffer)
|
|||
|
||||
/* Emit the specified user sample locations. */
|
||||
switch (num_samples) {
|
||||
case 1:
|
||||
case 2:
|
||||
case 4:
|
||||
radeon_set_context_reg(R_028BF8_PA_SC_AA_SAMPLE_LOCS_PIXEL_X0Y0_0, sample_locs_pixel[0][0]);
|
||||
|
|
|
|||
|
|
@ -1721,7 +1721,8 @@ radv_get_physical_device_properties(struct radv_physical_device *pdev)
|
|||
.transformFeedbackDraw = true,
|
||||
|
||||
/* VK_EXT_sample_locations */
|
||||
.sampleLocationSampleCounts = VK_SAMPLE_COUNT_2_BIT | VK_SAMPLE_COUNT_4_BIT | VK_SAMPLE_COUNT_8_BIT,
|
||||
.sampleLocationSampleCounts = (pdev->info.gfx_level >= GFX10 ? VK_SAMPLE_COUNT_1_BIT : 0) |
|
||||
VK_SAMPLE_COUNT_2_BIT | VK_SAMPLE_COUNT_4_BIT | VK_SAMPLE_COUNT_8_BIT,
|
||||
.maxSampleLocationGridSize = (VkExtent2D){2, 2},
|
||||
.sampleLocationCoordinateRange = {0.0f, 0.9375f},
|
||||
.sampleLocationSubPixelBits = 4,
|
||||
|
|
@ -2695,7 +2696,11 @@ VKAPI_ATTR void VKAPI_CALL
|
|||
radv_GetPhysicalDeviceMultisamplePropertiesEXT(VkPhysicalDevice physicalDevice, VkSampleCountFlagBits samples,
|
||||
VkMultisamplePropertiesEXT *pMultisampleProperties)
|
||||
{
|
||||
VK_FROM_HANDLE(radv_physical_device, pdev, physicalDevice);
|
||||
|
||||
VkSampleCountFlagBits supported_samples = VK_SAMPLE_COUNT_2_BIT | VK_SAMPLE_COUNT_4_BIT | VK_SAMPLE_COUNT_8_BIT;
|
||||
if (pdev->info.gfx_level >= GFX10)
|
||||
supported_samples |= VK_SAMPLE_COUNT_1_BIT;
|
||||
|
||||
if (samples & supported_samples) {
|
||||
pMultisampleProperties->maxSampleLocationGridSize = (VkExtent2D){2, 2};
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue