History log of /external/mesa3d/src/intel/vulkan/anv_formats.c
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
3551a2d3ad2661477ba3b0a36a13eeb68e28fe85 15-Nov-2016 Samuel Iglesias Gonsálvez <siglesias@igalia.com> isl: fix VA64 support for double and dvecN vertex attributes

We use *64*_PASSTHRU formats to upload vertex attributes of 64 bits
to avoid conversions. From the BDW PRM, Volume 2d, page 586
(VERTEX_ELEMENT_STATE):

"When SourceElementFormat is set to one of the *64*_PASSTHRU
formats, 64-bit components are stored in the URB without any
conversion. In this case, vertex elements must be written as 128
or 256 bits, with VFCOMP_STORE_0 being used to pad the output
as required. E.g., if R64_PASSTHRU is used to copy a 64-bit Red
component into the URB, Component 1 must be specified as
VFCOMP_STORE_0 (with Components 2,3 set to VFCOMP_NOSTORE)
in order to output a 128-bit vertex element, or Components 1-3 must
be specified as VFCOMP_STORE_0 in order to output a 256-bit vertex
element. Likewise, use of R64G64B64_PASSTHRU requires Component 3
to be specified as VFCOMP_STORE_0 in order to output a 256-bit vertex
element."

v2,v3 (Jason):
- Don't delete unused formats.

Signed-off-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
/external/mesa3d/src/intel/vulkan/anv_formats.c
2d7bed6158a1f119411d4e9f34beb7846065ae93 06-Jan-2017 Jason Ekstrand <jason.ekstrand@intel.com> anv/formats: Use the real format for B4G4R4A4_UNORM_PACK16 on gen8

Because border color is handled pre-swizzle, when we move the alpha
channel around in the format, the OPAQUE_BLACK border colors don't work
correctly on B4G4R4A4_UNORM_PACK16 with the hack. This fixes the
following Vulkan CTS tests on Broadwell:

dEQP-VK.pipeline.sampler.view_type.2d_array.format.b4g4r4a4_unorm_pack16.address_modes.all_mode_clamp_to_border_opaque_black
dEQP-VK.pipeline.sampler.view_type.1d_array.format.b4g4r4a4_unorm_pack16.address_modes.all_mode_clamp_to_border_opaque_black
dEQP-VK.pipeline.sampler.view_type.2d.format.b4g4r4a4_unorm_pack16.address_modes.all_mode_clamp_to_border_opaque_black
dEQP-VK.pipeline.sampler.view_type.1d.format.b4g4r4a4_unorm_pack16.address_modes.all_mode_clamp_to_border_opaque_black
dEQP-VK.pipeline.sampler.view_type.3d.format.b4g4r4a4_unorm_pack16.address_modes.all_mode_clamp_to_border_opaque_black

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Cc: "13.0" <mesa-stable@lists.freedesktop.org>
/external/mesa3d/src/intel/vulkan/anv_formats.c
277f868e6682b9ee398ed326425274c3d1898417 15-Nov-2016 Iago Toral Quiroga <itoral@igalia.com> anv/format: handle unsupported formats earlier

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
/external/mesa3d/src/intel/vulkan/anv_formats.c
9730f2734be7769fa9cef75efa74bfdce27fbc2d 14-Nov-2016 Iago Toral Quiroga <itoral@igalia.com> anv/format: support VK_FORMAT_R8G8B8_SRGB

Fixes dEQP-VK.api.image_clearing.clear_color_image.1d_r8g8b8_srgb

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
/external/mesa3d/src/intel/vulkan/anv_formats.c
35deeda66f5fcbccb24f8eda42c8a4f67bb106c9 14-Nov-2016 Iago Toral Quiroga <itoral@igalia.com> anv/format: handle unsupported formats properly

According to the spec for vkGetPhysicalDeviceImageFormatProperties:

"If format is not a supported image format, or if the combination of format,
type, tiling, usage, and flags is not supported for images, then
vkGetPhysicalDeviceImageFormatProperties returns VK_ERROR_FORMAT_NOT_SUPPORTED."

Makes the following Vulkan CTS tests report 'Not Supported' instead of crashing:

dEQP-VK.api.image_clearing.clear_color_image.1d_b8g8r8_unorm
dEQP-VK.api.image_clearing.clear_color_image.1d_b8g8r8_snorm
dEQP-VK.api.image_clearing.clear_color_image.1d_b8g8r8_uscaled
dEQP-VK.api.image_clearing.clear_color_image.1d_b8g8r8_sscaled
dEQP-VK.api.image_clearing.clear_color_image.1d_b8g8r8_uint
dEQP-VK.api.image_clearing.clear_color_image.1d_b8g8r8_sint
dEQP-VK.api.image_clearing.clear_color_image.1d_b8g8r8_srgb
dEQP-VK.api.image_clearing.clear_color_image.1d_b8g8r8a8_unorm
dEQP-VK.api.image_clearing.clear_color_image.1d_b8g8r8a8_snorm
dEQP-VK.api.image_clearing.clear_color_image.1d_b8g8r8a8_uscaled
dEQP-VK.api.image_clearing.clear_color_image.1d_b8g8r8a8_sscaled
dEQP-VK.api.image_clearing.clear_color_image.1d_b8g8r8a8_uint
dEQP-VK.api.image_clearing.clear_color_image.1d_b8g8r8a8_sint
dEQP-VK.api.image_clearing.clear_color_image.1d_b8g8r8a8_srgb
dEQP-VK.api.image_clearing.clear_color_image.1d_r4g4_unorm_pack8
dEQP-VK.api.image_clearing.clear_color_image.1d_r8_srgb
dEQP-VK.api.image_clearing.clear_color_image.1d_r8g8_srgb
dEQP-VK.api.image_clearing.clear_color_image.1d_r8g8b8_srgb
dEQP-VK.api.image_clearing.clear_color_image.1d_b5g5r5a1_unorm_pack16

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
/external/mesa3d/src/intel/vulkan/anv_formats.c
bb550e297774bd1fdd274a98738e6353d1cda73e 23-Sep-2016 Nanley Chery <nanley.g.chery@intel.com> anv/formats: Disallow linear ASTC textures

Signed-off-by: Nanley Chery <nanley.g.chery@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
/external/mesa3d/src/intel/vulkan/anv_formats.c
80de528c7e75d9a01811d48c82af170da9dc2364 23-Sep-2016 Nanley Chery <nanley.g.chery@intel.com> anv/formats: Disallow 1D compressed textures

Signed-off-by: Nanley Chery <nanley.g.chery@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
/external/mesa3d/src/intel/vulkan/anv_formats.c
2fef0d108aa52e5e7e7c2b394d18131952a829a6 30-Sep-2016 Ville Syrjälä <ville.syrjala@linux.intel.com> anv/formats: Fix build on gcc-4 and earlier

gcc-4 and earlier don't allow compound literals where a constant
is required in -std=c99/gnu99 mode, so we can't use ISL_SWIZZLE()
when populating the anv_formats[] array. There are a few ways around
it: First one would be -std=c89/gnu89, but the rest of the code
depends on c99 so it's not really an option. The second option
would be to upgrade to gcc-5+ where the compiler behaviour was relaxed
a bit [1]. And the third option is just to avoid using compound
literals. I chose the last option since it keeps gcc-4 and earlier
working.

[1] https://gcc.gnu.org/gcc-5/porting_to.html

Cc: Jason Ekstrand <jason@jlekstrand.net>
Cc: Topi Pohjolainen <topi.pohjolainen@intel.com>
Fixes: 7ddb21708c80 ("intel/isl: Add an isl_swizzle structure and use it for isl_view swizzles")
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
/external/mesa3d/src/intel/vulkan/anv_formats.c
bc24590f0c579a2528fd94eb8d40dd4ce12eba29 22-Sep-2016 Lionel Landwerlin <lionel.g.landwerlin@intel.com> intel/i965: make gen_device_info mutable

Make gen_device_info a mutable structure so we can update the fields that
can be refined by querying the kernel (like subslices and EU numbers).

This patch does not make any functional change, it just makes
gen_get_device_info() fill a structure rather than returning a const
pointer.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
/external/mesa3d/src/intel/vulkan/anv_formats.c
7ddb21708c800dfbe3cea2df6aaaf7aed852761b 28-Aug-2016 Jason Ekstrand <jason.ekstrand@intel.com> intel/isl: Add an isl_swizzle structure and use it for isl_view swizzles

This should be more compact than the enum isl_channel_select[4] that we
were using before. It's also very convenient because we already had such a
structure in the Vulkan driver we just needed to pull it over.

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
/external/mesa3d/src/intel/vulkan/anv_formats.c
527f37199929932300acc1688d8160e1f3b1d753 23-Aug-2016 Jason Ekstrand <jason.ekstrand@intel.com> intel: s/brw_device_info/gen_device_info/

Generated by:

sed -i -e 's/brw_device_info/gen_device_info/g' src/intel/**/*.c
sed -i -e 's/brw_device_info/gen_device_info/g' src/intel/**/*.h
sed -i -e 's/brw_device_info/gen_device_info/g' **/i965/*.c
sed -i -e 's/brw_device_info/gen_device_info/g' **/i965/*.cpp
sed -i -e 's/brw_device_info/gen_device_info/g' **/i965/*.h

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
/external/mesa3d/src/intel/vulkan/anv_formats.c
fb90291dd5a734de3eb2ab59d883df3d2f9db0c7 26-Jul-2016 Jason Ekstrand <jason.ekstrand@intel.com> anv/formats: Don't use an RGBX format if it isn't renderable

The whole point of using RGBX is so that we can render to it so if it isn't
renderable, that kind-of defeats the purpose. Some formats (one example is
R32G32B32X32_SFLOAT) exist in the format table but aren't actually
renderable. Eventually, we'd like to get away from RGBX entirely, but this
fixes hangs on BDW today.

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
/external/mesa3d/src/intel/vulkan/anv_formats.c
475ce61d1aa0fb06202511b4ea8ad9bd1fab64d0 13-Aug-2016 Lionel Landwerlin <llandwerlin@gmail.com> anv: GetDeviceImageFormatProperties: fix TRANSFER formats

We let the user believe we support some transfer formats which we don't.
This can lead to crashes when actually trying to use those formats for
example on dEQP-VK.api.copy_and_blit.image_to_image.* tests.

Let all formats we can render to or sample from as meta implements transfers
using attachments.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
/external/mesa3d/src/intel/vulkan/anv_formats.c
01855d7331cd34633b8accc343ddf0a86a860c94 09-Jul-2016 Jason Ekstrand <jason.ekstrand@intel.com> isl: Use bpb in a few places where it's more natural than bs

Reviewed-by: Chad Versace <chad.versace@intel.com>
/external/mesa3d/src/intel/vulkan/anv_formats.c
9048dee32837d281fe7aee5fe34c438fa95ac9d2 28-May-2016 Jason Ekstrand <jason.ekstrand@intel.com> anv/formats: Exit early for unsupported formats
/external/mesa3d/src/intel/vulkan/anv_formats.c
10bc9f7024f7a15ffbccaa49eca9447aaad86ce3 28-May-2016 Jason Ekstrand <jason.ekstrand@intel.com> anv/formats: Map VK_FORMAT_UNDEFINED to ISL_FORMAT_UNSUPPORTED

At one point in time, we may have used the mapping to ISL_FORMAT_RAW for
certain buffer surfaces but that time has long since passed. This fixes a
bug where doing format queries on VK_FORMAT_UNDEFINED would assert-fail.
/external/mesa3d/src/intel/vulkan/anv_formats.c
d68acde1cb4825589849f512047a8cb31b3b5a35 21-May-2016 Jason Ekstrand <jason.ekstrand@intel.com> anv/formats: Use isl_format_supports* for format introspection
/external/mesa3d/src/intel/vulkan/anv_formats.c
2ae493d68647af26c64ae59f0127349d75817b91 03-May-2016 Nanley Chery <nanley.g.chery@intel.com> anv/formats: Make alpha blending a property of render targets

In agreement with the SNB PRM, alpha blending is a property that render
targets may or may not support.

Signed-off-by: Nanley Chery <nanley.g.chery@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
/external/mesa3d/src/intel/vulkan/anv_formats.c
9b8c4000d0e92a1e52e2ca52f05dec5254d2a358 18-May-2016 Nanley Chery <nanley.g.chery@intel.com> anv: Enable textureCompressionASTC_LDR on Gen9+

Signed-off-by: Nanley Chery <nanley.g.chery@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
/external/mesa3d/src/intel/vulkan/anv_formats.c
0d2847e1773a1460d6a6a7cde87f488369879c99 18-May-2016 Nanley Chery <nanley.g.chery@intel.com> anv/format: Reorder ASTC mappings to match ISL enum ordering

Keep the lists consistent for ease of use.

Signed-off-by: Nanley Chery <nanley.g.chery@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
/external/mesa3d/src/intel/vulkan/anv_formats.c
b6c4d46a580df5e1c9c21adae70fc0879190d53a 16-May-2016 Jason Ekstrand <jason.ekstrand@intel.com> anv/formats: Add support for VK_FORMAT_B4G4R4A4_UNORM pre-gen8
/external/mesa3d/src/intel/vulkan/anv_formats.c
45c93384e519aefba1d28388955b2638f4d26ea3 16-May-2016 Jason Ekstrand <jason.ekstrand@intel.com> anv: Add a devinfo argument to the get_format functions
/external/mesa3d/src/intel/vulkan/anv_formats.c
100db3d31c1fd9284fc96132dccde1fa289a88c3 16-May-2016 Jason Ekstrand <jason.ekstrand@intel.com> anv/formats: Set the swizzle to RGB1 when using an RGBA format to fake RGB

This way we get correct sampling from RGB formats that are faked as RGBA.
This should also cause it to disable rendering and blending on those
formats. We should be able to render to them and, on Broadwell and above,
we can blend on them with work-arounds. However, we'll add support for
that more properly later when it's deemed useful. For now, disabling
rendering and blending should be safe.
/external/mesa3d/src/intel/vulkan/anv_formats.c
ce375fba413a803f264335c7dd6e72b0003021f9 16-May-2016 Jason Ekstrand <jason.ekstrand@intel.com> anv/formats: Refactor anv_get_format

The new code removes the switch statement and instead handles depth/stencil
as up-front special cases. This allows for potentially more complicated
color format handling in the future.
/external/mesa3d/src/intel/vulkan/anv_formats.c
7cae59012d98959a997ef96c217adba0dc8b3ed7 16-May-2016 Jason Ekstrand <jason.ekstrand@intel.com> anv/formats: Use the isl_channel_select enum for the swizzle
/external/mesa3d/src/intel/vulkan/anv_formats.c
8ed429a4f0d58eafe3e3212552af6fb0cb78feeb 16-May-2016 Jason Ekstrand <jason.ekstrand@intel.com> anv/formats: Add an anv_get_format helper

This commit removes anv_format_for_vk_format and adds an anv_get_format
helper. The anv_get_format helper returns the anv_format by-value. Unlike
anv_format_for_vk_format the format returned by anv_get_format is 100%
accurate and includes any tweaks needed for tiled vs. linear.
anv_get_isl_format is now just a wrapper around anv_get_format that picks
off just the isl_format.
/external/mesa3d/src/intel/vulkan/anv_formats.c
13f5cee663f693bc2cafeda9c3d6fc3537334dde 14-May-2016 Jason Ekstrand <jason.ekstrand@intel.com> anv/format: Simplify anv_format

Now that we have VkFormat introspection and we've removed everything that
tried to use anv_format for introspection, we no longer need most of what
was in anv_format.
/external/mesa3d/src/intel/vulkan/anv_formats.c
c1c004e5b2b3fc64b1d2525b6148389d2148f8f4 14-May-2016 Jason Ekstrand <jason.ekstrand@intel.com> anv/formats: Delete validate_GetPhysicalDeviceFormatProperties

All it ever did was some extra logging that was useful when initially
bringing up Dota2. We don't need it anymore.
/external/mesa3d/src/intel/vulkan/anv_formats.c
28d0bc72fbce26fd986b0e3f3a1f346a9d6eba00 15-Apr-2016 Nanley Chery <nanley.g.chery@intel.com> anv/formats: Return proper error code for unsupported formats

Fixes some failures in dEQP-VK.api.info.image_format_properties.* and
enables the test group to execute without assert failing.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=94896
Signed-off-by: Nanley Chery <nanley.g.chery@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
/external/mesa3d/src/intel/vulkan/anv_formats.c
c226e72a399199a71579f22e5b088f50b1a10ac1 31-Mar-2016 Jason Ekstrand <jason.ekstrand@intel.com> anv/formats: Advertise blit support for stencil

Thanks to advances in the blit code, we can do this now.

Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
/external/mesa3d/src/intel/vulkan/anv_formats.c
7c1660aa14094e40fba9f39ce194cb6238311b65 05-Mar-2016 Jason Ekstrand <jason.ekstrand@intel.com> anv: Don't allow D16_UNORM to be combined with stencil

Among other things, this can cause the depth or stencil test to spurriously
fail when the fragment shader uses discard.
/external/mesa3d/src/intel/vulkan/anv_formats.c
8c23392c26916711b7b02337fd342ee9765b6fd4 18-Feb-2016 Jason Ekstrand <jason.ekstrand@intel.com> anv/formats: Don't use a compound literal to initialize a const array

Doing so makes older versions of GCC rather grumpy. Newere GCC fixes this,
but using a compound literal isn't really gaining us anything anyway.
/external/mesa3d/src/intel/vulkan/anv_formats.c
9851c8285f7bf70a6cb4bede2ee94110c14acc19 18-Feb-2016 Jason Ekstrand <jason.ekstrand@intel.com> Move the intel vulkan driver to src/intel/vulkan
/external/mesa3d/src/intel/vulkan/anv_formats.c