Mesa (master): radv: Fix SRGB compute copies.
Module: Mesa Branch: master Commit: a63a0960e3ebf049e593f51ce1e02dc84254f9c4 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=a63a0960e3ebf049e593f51ce1e02dc84254f9c4 Author: Bas Nieuwenhuizen Date: Mon May 21 01:26:46 2018 +0200 radv: Fix SRGB compute copies. SRGB stores are broken. We had compensation code in the resolve path but none in the copy path. Since we don't want any conversion and it does not matter for DCC, just make everything UNORM instead. This happened to cause wrong colors for the PRIME path, as that uses image->buffer copies which always use the compute path. CC: 18.0 18.1 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=106587 Reviewed-by: Dave Airlie --- src/amd/vulkan/radv_meta_copy.c | 2 ++ src/amd/vulkan/vk_format.h | 40 2 files changed, 42 insertions(+) diff --git a/src/amd/vulkan/radv_meta_copy.c b/src/amd/vulkan/radv_meta_copy.c index 1f18886d2c..a4d3598266 100644 --- a/src/amd/vulkan/radv_meta_copy.c +++ b/src/amd/vulkan/radv_meta_copy.c @@ -94,6 +94,8 @@ blit_surf_for_image_level_layer(struct radv_image *image, !(radv_image_is_tc_compat_htile(image))) format = vk_format_for_size(vk_format_get_blocksize(format)); + format = vk_format_no_srgb(format); + return (struct radv_meta_blit2d_surf) { .format = format, .bs = vk_format_get_blocksize(format), diff --git a/src/amd/vulkan/vk_format.h b/src/amd/vulkan/vk_format.h index b8cb4f4ed3..933db4d961 100644 --- a/src/amd/vulkan/vk_format.h +++ b/src/amd/vulkan/vk_format.h @@ -417,6 +417,46 @@ vk_format_is_srgb(VkFormat format) } static inline VkFormat +vk_format_no_srgb(VkFormat format) +{ + switch(format) { + case VK_FORMAT_R8_SRGB: + return VK_FORMAT_R8_UNORM; + case VK_FORMAT_R8G8_SRGB: + return VK_FORMAT_R8G8_UNORM; + case VK_FORMAT_R8G8B8_SRGB: + return VK_FORMAT_R8G8B8_UNORM; + case VK_FORMAT_B8G8R8_SRGB: + return VK_FORMAT_B8G8R8_UNORM; + case VK_FORMAT_R8G8B8A8_SRGB: + return VK_FORMAT_R8G8B8A8_UNORM; + case VK_FORMAT_B8G8R8A8_SRGB: + return VK_FORMAT_B8G8R8A8_UNORM; + case VK_FORMAT_A8B8G8R8_SRGB_PACK32: + return VK_FORMAT_A8B8G8R8_UNORM_PACK32; + case VK_FORMAT_BC1_RGB_SRGB_BLOCK: + return VK_FORMAT_BC1_RGB_UNORM_BLOCK; + case VK_FORMAT_BC1_RGBA_SRGB_BLOCK: + return VK_FORMAT_BC1_RGBA_UNORM_BLOCK; + case VK_FORMAT_BC2_SRGB_BLOCK: + return VK_FORMAT_BC2_UNORM_BLOCK; + case VK_FORMAT_BC3_SRGB_BLOCK: + return VK_FORMAT_BC3_UNORM_BLOCK; + case VK_FORMAT_BC7_SRGB_BLOCK: + return VK_FORMAT_BC7_UNORM_BLOCK; + case VK_FORMAT_ETC2_R8G8B8_SRGB_BLOCK: + return VK_FORMAT_ETC2_R8G8B8_UNORM_BLOCK; + case VK_FORMAT_ETC2_R8G8B8A1_SRGB_BLOCK: + return VK_FORMAT_ETC2_R8G8B8A1_UNORM_BLOCK; + case VK_FORMAT_ETC2_R8G8B8A8_SRGB_BLOCK: + return VK_FORMAT_ETC2_R8G8B8A8_UNORM_BLOCK; + default: + assert(!vk_format_is_srgb(format)); + return format; + } +} + +static inline VkFormat vk_format_stencil_only(VkFormat format) { return VK_FORMAT_S8_UINT; ___ mesa-commit mailing list mesa-commit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-commit
Mesa (master): radv: Cleanup unused prime blit path.
Module: Mesa Branch: master Commit: f26b008e283ee11cfeeb4efb61ce435a04b04b2f URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=f26b008e283ee11cfeeb4efb61ce435a04b04b2f Author: Bas Nieuwenhuizen Date: Mon May 21 01:31:49 2018 +0200 radv: Cleanup unused prime blit path. Since we have the common WSI code, we use vkCmdCopyImageToBuffer instead. Reviewed-by: Dave Airlie Reviewed-by: Jason Ekstrand --- src/amd/vulkan/radv_meta.h | 4 src/amd/vulkan/radv_meta_copy.c | 21 - 2 files changed, 25 deletions(-) diff --git a/src/amd/vulkan/radv_meta.h b/src/amd/vulkan/radv_meta.h index 4a9abae30a..35067f6712 100644 --- a/src/amd/vulkan/radv_meta.h +++ b/src/amd/vulkan/radv_meta.h @@ -199,10 +199,6 @@ void radv_decompress_resolve_src(struct radv_cmd_buffer *cmd_buffer, uint32_t region_count, const VkImageResolve *regions); -void radv_blit_to_prime_linear(struct radv_cmd_buffer *cmd_buffer, - struct radv_image *image, - struct radv_image *linear_image); - uint32_t radv_clear_cmask(struct radv_cmd_buffer *cmd_buffer, struct radv_image *image, uint32_t value); uint32_t radv_clear_dcc(struct radv_cmd_buffer *cmd_buffer, diff --git a/src/amd/vulkan/radv_meta_copy.c b/src/amd/vulkan/radv_meta_copy.c index a4d3598266..3442b49fb9 100644 --- a/src/amd/vulkan/radv_meta_copy.c +++ b/src/amd/vulkan/radv_meta_copy.c @@ -486,24 +486,3 @@ void radv_CmdCopyImage( dest_image, destImageLayout, regionCount, pRegions); } - -void radv_blit_to_prime_linear(struct radv_cmd_buffer *cmd_buffer, - struct radv_image *image, - struct radv_image *linear_image) -{ - struct VkImageCopy image_copy = { 0 }; - - image_copy.srcSubresource.aspectMask = VK_IMAGE_ASPECT_COLOR_BIT; - image_copy.srcSubresource.layerCount = 1; - - image_copy.dstSubresource.aspectMask = VK_IMAGE_ASPECT_COLOR_BIT; - image_copy.dstSubresource.layerCount = 1; - - image_copy.extent.width = image->info.width; - image_copy.extent.height = image->info.height; - image_copy.extent.depth = 1; - - meta_copy_image(cmd_buffer, image, VK_IMAGE_LAYOUT_GENERAL, linear_image, - VK_IMAGE_LAYOUT_GENERAL, - 1, &image_copy); -} ___ mesa-commit mailing list mesa-commit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-commit
Mesa (master): radv: fix centroid interpolation
Module: Mesa Branch: master Commit: 73df16dcee79e2281c8d8a830dbbe6655359c82d URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=73df16dcee79e2281c8d8a830dbbe6655359c82d Author: Samuel Pitoiset Date: Mon May 21 11:15:51 2018 +0200 radv: fix centroid interpolation It's legal to set the centroid and sample interpolation modes when MSAA disabled. So, we have to initialize the centroid inputs because the hardware doesn't. This fixes rendering issues with DXVK and The Witness, World of Warcraft, Trackmania and probably more games. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=106315 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=102390 CC: 18.0 18.1 Signed-off-by: Samuel Pitoiset Reviewed-by: Bas Nieuwenhuizen --- src/amd/vulkan/radv_nir_to_llvm.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/amd/vulkan/radv_nir_to_llvm.c b/src/amd/vulkan/radv_nir_to_llvm.c index 9b9619b877..2d91ded7fe 100644 --- a/src/amd/vulkan/radv_nir_to_llvm.c +++ b/src/amd/vulkan/radv_nir_to_llvm.c @@ -2075,9 +2075,6 @@ static void prepare_interp_optimize(struct radv_shader_context *ctx, struct nir_shader *nir) { - if (!ctx->options->key.fs.multisample) - return; - bool uses_center = false; bool uses_centroid = false; nir_foreach_variable(variable, &nir->inputs) { ___ mesa-commit mailing list mesa-commit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-commit
Mesa (master): v3d: Include v3d_drm.h path.
Module: Mesa Branch: master Commit: 85f61197df49c3384f9f6c8cf0e642249e42e8fd URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=85f61197df49c3384f9f6c8cf0e642249e42e8fd Author: Vinson Lee Date: Thu May 17 22:39:50 2018 + v3d: Include v3d_drm.h path. Fix build error. CC v3d_blit.lo In file included from v3d_blit.c:27:0: v3d_context.h:39:10: fatal error: v3d_drm.h: No such file or directory #include "v3d_drm.h" ^~~ Fixes: 8a793d42f1cc ("v3d: Switch the vc5 driver to using the finalized V3D UABI.") Signed-off-by: Vinson Lee Reviewed-by: Eric Anholt --- src/gallium/drivers/v3d/Makefile.am | 1 + 1 file changed, 1 insertion(+) diff --git a/src/gallium/drivers/v3d/Makefile.am b/src/gallium/drivers/v3d/Makefile.am index 2b4c364c24..ff0334a239 100644 --- a/src/gallium/drivers/v3d/Makefile.am +++ b/src/gallium/drivers/v3d/Makefile.am @@ -24,6 +24,7 @@ include $(top_srcdir)/src/gallium/Automake.inc AM_CFLAGS = \ -I$(top_builddir)/src/compiler/nir \ + -I$(top_srcdir)/include/drm-uapi \ -I$(top_builddir)/src/broadcom \ $(LIBDRM_CFLAGS) \ $(V3D_SIMULATOR_CFLAGS) \ ___ mesa-commit mailing list mesa-commit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-commit
Mesa (master): i965/glk: Add l3 banks count for 2x6 configuration
Module: Mesa Branch: master Commit: 0748383a6014886ef0bf7bda16fd0efef39c405d URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=0748383a6014886ef0bf7bda16fd0efef39c405d Author: Anuj Phogat Date: Mon May 21 15:21:56 2018 -0700 i965/glk: Add l3 banks count for 2x6 configuration 2x6 configuration with pci-id 0x3185 has same number of banks (2) as 3x6 configuration (pci-id 0x3184). Reported-by: Clayton Craft Signed-off-by: Anuj Phogat Tested-by: Clayton Craft Reviewed-by: Lionel Landwerlin Fixes: eb23be1d97da "i965: Add and initialize l3_banks field for gen7+" Cc: Francisco Jerez --- src/intel/dev/gen_device_info.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/intel/dev/gen_device_info.c b/src/intel/dev/gen_device_info.c index 653cece6d7..8e97132989 100644 --- a/src/intel/dev/gen_device_info.c +++ b/src/intel/dev/gen_device_info.c @@ -732,10 +732,10 @@ static const struct gen_device_info gen_device_info_glk = { .l3_banks = 2, }; -/*TODO: Initialize l3_banks when we know the number. */ static const struct gen_device_info gen_device_info_glk_2x6 = { GEN9_LP_FEATURES_2X6, .is_geminilake = true, + .l3_banks = 2, }; static const struct gen_device_info gen_device_info_cfl_gt1 = { ___ mesa-commit mailing list mesa-commit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-commit