summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2017-11-07anv/TODO: Updates for VK_EXT_image_drm_format_modifierchadv/review/anv-dma-buf-v01Chad Versace1-0/+16
2017-11-07RFC: anv: Kill vkCreateDmaBufImageINTEL()Chad Versace9-197/+0
Replaced by VK_EXT_external_memory_dma_buf and VK_EXT_image_drm_format_modifier.
2017-11-07RFC: anv: Enable VK_EXT_image_drm_format_modifierChad Versace2-0/+11
The draft spec lives at http://kiwitree.net/~chadv/vulkan/#1.0-VK_EXT_image_drm_format_modifier. This extension spec has a complete, working API. I'm happy with the API, and believe it's good enough. But the spec language has some outstanding issues that prevent it from being submitted as-is to Khronos: the spec language needs more polish, and the appendix chaper has a list of incomplete TODOs.
2017-11-07RFC: anv: Support VkImageExplicitDrmFormatModifierCreateInfoEXTChad Versace1-9/+75
Incremental implementation of VK_EXT_image_drm_format_modifier.
2017-11-07RFC: anv: Support vkGetImageSubresourceLayout with modifiersChad Versace1-2/+15
Incremental implementation of VK_EXT_image_drm_format_modifier.
2017-11-07RFC: anv: Support VkImageDrmFormatModifierListCreateInfoEXTChad Versace2-6/+72
Incremental implementation of VK_EXT_image_drm_format_modifier.
2017-11-07RFC: anv: Support VkPhysicalDeviceImageDrmFormatModifierInfoEXTChad Versace1-5/+40
Incremental implementation of VK_EXT_image_drm_format_modifier.
2017-11-07RFC: anv: Support VkDrmFormatModifierPropertiesListEXTChad Versace1-12/+132
Incremental implementation of VK_EXT_image_drm_format_modifier.
2017-11-07RFC: anv: Implement VK_EXT_queue_family_foreignChad Versace1-0/+1
The draft spec lives at http://kiwitree.net/~chadv/vulkan/#1.0-VK_EXT_queue_family_foreign. I plan to ask Khronos to merge the spec this week. By itself, this extension does nothing. It's only useful in its interaction with other external memory extensions. In the short term, at least, anvil will do nothing on transitions to/from the foreign queue. There does exist, though, some possibility to eventually distinguish between transitions on VK_QUEUE_FAMILY_EXTERNAL_KHR and VK_QUEUE_FAMILY_FOREIGN_EXT for ccs_e images.
2017-11-07RFC: anv: Implement VK_EXT_external_memory_dma_bufChad Versace3-10/+27
The draft spec lives at http://kiwitree.net/~chadv/vulkan/#1.0-VK_EXT_external_memory_dma_buf. I plan to ask Khronos to merge the spec this week.
2017-11-07HACK: vulkan: Install Vulkan headersChad Versace1-0/+12
This allows me to build apps against new extensions without installing an updated loader.
2017-11-07HACK: vulkan: Update headers and registry to chadv/1.0-dma-buf@a79a0abChad Versace2-11/+136
2017-11-07anv: Refactor anv_GetImageSubresourceLayout()Chad Versace1-21/+11
Its helper function, anv_surface_get_subresource_layout(), was not very helpful. So fold it into the main function.
2017-11-07anv/image: Refactor choice of isl_tiling_flags_tChad Versace1-13/+31
Instead of choosing the tiling flags inside make_surface(), which is called once per aspect in a loop, and which chooses the same tiling for each aspect, choose the tiling flags exactly once before entering the aspect loop.
2017-11-07anv: Refactor anv_get_format_plane() - explicit unsupportedChad Versace1-4/+4
The same local variable, 'plane_format', was returned on success *and* failure. Be more explicit in distinguishing the two cases: return 'plane_format' on success and return 'unsupported' on failure. This simplifies the diff in upcoming patches for VK_EXT_image_drm_format_modifier.
2017-11-07anv: Remove anv_physical_device_get_format_properties()Chad Versace1-23/+13
Fold its body into its sole caller, anv_GetPhysicalDeviceFormatProperties().
2017-11-07anv: Simplify anv_physical_device_get_format_properties()Chad Versace1-16/+9
Now that get_image_format_properties() returns the correct VkFormatFeatureFlags, we can remove the unneeded if-branch and some local variables.
2017-11-07anv: Simplify anv_get_image_format_properties()Chad Versace1-14/+3
Now that get_image_format_features() has a VkImageTiling parameter, we can bypass anv_physical_device_get_format_properties() and call get_image_format_features() directly.
2017-11-07anv: Rename get_image_format_properties()Chad Versace1-12/+12
The name is misleading. It looks like vkGetPhysicalDeviceImageFormatProperties(), but it actually implement vkGetPhysicalDeviceFormatProperties. Let's rename it to what it actually does, get_image_format_features(), because it returns VkFormatFeatureFlags. For consistency, also rename get_buffer_format_properties() to get_buffer_format_features().
2017-11-07anv: Fix get_image_format_properties() - YCbCrChad Versace1-46/+40
Teach it to calculate the format features for YCbCr. The goal (which is completed in this patch) is to incrementally fix get_image_format_properties() to return a correct result. Previously, it returned incorrect VkFormatFeatureFlags which the caller needed clean up.
2017-11-07anv: Fix get_image_format_properties() - 3-channel formatsChad Versace1-19/+15
Teach it to calculate the format features for 3-channel formats. The goal is to incrementally fix get_image_format_properties() to return a correct result. Currently, it returns incorrect VkFormatFeatureFlags which the caller must clean up.
2017-11-07anv: Refactor get_image_format_properties() - Reduce paramsChad Versace1-11/+21
Replace parameters 'enum isl_format' and 'struct anv_format_plane' with new parameter 'const struct anv_format *'. The goal is to incrementally fix get_image_format_properties() to return a correct result. Currently, it returns incorrect VkFormatFeatureFlags which the caller must clean up.
2017-11-07anv: Refactor get_image_format_properties() - base_isl_formatChad Versace1-3/+4
Rename parameter 'base' to 'base_isl_format'.
2017-11-07anv: Refactor get_image_format_properties() - plane_formatChad Versace1-8/+8
Rename parameter 'format' to 'plane_format'. Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
2017-11-07anv: Fix get_image_format_properties() - ASTCChad Versace1-4/+5
Teach it to calculate the format features for ASTC. The goal is to incrementally fix get_image_format_properties() to return a correct result. Currently, it returns incorrect VkFormatFeatureFlags which the caller must clean up. v2: New commit message Reviewed-by: Jason Ekstrand <jason@jlekstrand.net> (v1)
2017-11-07anv: Fix get_image_format_properties() - depthstencil (v2)Chad Versace1-16/+31
Teach it to calculate the features of depthstencil formats. The goal is to incrementally fix get_image_format_properties() to return a correct result. Currently, it returns incorrect VkFormatFeatureFlags which the caller must clean up. v2: New commit message Reviewed-by: Jason Ekstrand <jason@jlekstrand.net> (v1)
2017-11-07anv: Better types for 'aspect' function paramsChad Versace3-13/+5
Some functions have a comment that says "Exactly one bit must be in 'aspect'". So change the type of their 'aspect' parameter from VkImageAspectFlags to VkImageAspectFlagBits.
2017-11-07anv: Refactor get_buffer_format_properties()Chad Versace1-15/+29
Make it a stand-alone function. Pre-patch, for some formats the function returned incorrect VkFormatFeatureFlags which were cleaned up by the caller. This prepares for a cleaner implementation of VK_EXT_image_drm_format_modifier. Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
2017-11-07anv: Suffix anv-private 'VK' tokens with 'ANV'Chad Versace5-31/+31
I saw VK_IMAGE_ASPECT_ANY_COLOR_BIT while hacking anv_formats.c and got confused. "Huh? What extension added that?". No extension defines it; anv_private.h defines it. To remove confusion, rename the anv-private VK tokens as if they were extension tokens with the ANV vendor suffix. I found only two such tokens: VK_IMAGE_ASPECT_ANY_COLOR_BIT VK_IMAGE_ASPECT_PLANES_BITS Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
2017-11-07anv: Remove unused variable 'gen'Chad Versace1-4/+0
In anv_physical_device_get_format_properties(). Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
2017-11-06nir: fix a typoGwan-gyeong Mun1-1/+1
Signed-off-by: Mun Gwan-gyeong <elongbug@gmail.com> Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
2017-11-06glsl: Allow precision mismatch on dead data with GLSL ES 1.00Tomasz Figa1-4/+10
Commit 259fc505454ea6a67aeacf6cdebf1398d9947759 added linker error for mismatching uniform precision, as required by GLES 3.0 specification and conformance test-suite. Several Android applications, including Forge of Empires, have shaders which violate this rule, on a dead varying that will be eliminated. The problem affects a big number of applications using Cocos2D engine and other GLES implementations accept this, this poses a serious application compatibility issue. Starting from GLSL ES 3.0, declarations with conflicting precision qualifiers are explicitly prohibited. However GLSL ES 1.00 does not clearly specify the behavior, except that "Uniforms are defined to behave as if they are using the same storage in the vertex and fragment processors and may be implemented this way. If uniforms are used in both the vertex and fragment shaders, developers should be warned if the precisions are different. Conversion of precision should never be implicit." The word "used" is not clear in this context and might refer to 1) declared (same as GLES 3.x) 2) referred after post-processing, or 3) linked after all optimizations are done. Looking at existing applications, 2) or 3) seems to be widely adopted. To avoid compatibility issues, turn the error into a warning if GLSL ES version is lower than 3.0 and the data is dead in at least one of the shaders. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=97532 Signed-off-by: Tomasz Figa <tfiga@chromium.org> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2017-11-07i965: disable NIR linking on HSW and belowTimothy Arceri1-1/+4
Fixes: 379b24a40d3d "i965: make use of nir linking" Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=103537 Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
2017-11-06radv: move is_local up to the winsys level.Dave Airlie4-3/+6
We can avoid adding the buffer in the non-local case, this will avoid all the overhead of the indirect call. Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2017-11-06radv: wrap cs_add_buffer in an inline. (v2)Dave Airlie6-41/+49
The next patch will try and avoid calling the indirect function. v2: add a missing conversion. Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2017-11-06radv: when loading regs no need to add bufferDave Airlie1-2/+0
The function that calls us has just added the buffer to the list already, no need to try and add it again. Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2017-11-06radv: pre-calculate user_data_0 registers and store in pipelineDave Airlie5-52/+55
There's no point recalculating these the whole time on descriptor emission, just store them at pipeline creation. Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2017-11-06docs: Mark GLX_ARB_context_flush_control doneAdam Jackson1-1/+1
Requires an unreleased X server, but from the client GLX side this is as done as it gets. Signed-off-by: Adam Jackson <ajax@redhat.com>
2017-11-06i965: Enable flush controlNeil Roberts2-1/+21
Reviewed-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com> Reviewed-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Signed-off-by: Neil Roberts <neil@linux.intel.com>
2017-11-06drisw: Enable flush control for llvmpipe and softpipeAdam Jackson1-0/+1
Hilariously this is a fairly big win. Neil's multi-context-test improves from ~24 to ~36 fps with llvmpipe on a Core i5-3317U. softpipe also improves, from about 2.25 to 3.09 fps (when it's that slow, you're allowed to be that precise). I'd have added it to swrast classic, but the testcase wants GL 3.0 and shaders, and that's not a thing classic has, so I figured making it work on softpipe was crime enough. Reviewed-by: Marek Olšák <marek.olsak@amd.com> Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com> Reviewed-by: Emil Velikov <emil.velikov@collabora.com> Signed-off-by: Adam Jackson <ajax@redhat.com>
2017-11-06gallium: Wire up flush controlAdam Jackson3-1/+9
Reviewed-by: Marek Olšák <marek.olsak@amd.com> Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com> Reviewed-by: Emil Velikov <emil.velikov@collabora.com> Signed-off-by: Adam Jackson <ajax@redhat.com>
2017-11-06egl: Implement EGL_KHR_context_flush_controlAdam Jackson6-1/+24
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com> Reviewed-by: Emil Velikov <emil.velikov@collabora.com> Signed-off-by: Adam Jackson <ajax@redhat.com>
2017-11-06glx: Implement GLX_ARB_context_flush_controlNeil Roberts7-9/+62
Reviewed-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com> Reviewed-by: Emil Velikov <emil.velikov@collabora.com> Signed-off-by: Neil Roberts <neil@linux.intel.com>
2017-11-06dri: Add a flush control extensionNeil Roberts3-2/+46
This advertises that the driver can accept a new context attribute __DRI_CTX_ATTRIB_RELEASE_BEHAVIOR. Reviewed-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com> Reviewed-by: Emil Velikov <emil.velikov@collabora.com> Signed-off-by: Neil Roberts <neil@linux.intel.com>
2017-11-06dri: Change __DriverApiRec::CreateContext to take a struct for attribsNeil Roberts14-131/+152
Previously the CreateContext method of __DriverApiRec took a set of arguments to describe the attribute values from the window system API's CreateContextAttribs function. As more attributes get added this could quickly get unworkable and every new attribute needs a modification for every driver. To fix that, pass the attribute values in a struct instead. The struct has a bitmask to specify which members are used. The first three members (two for the GL version and one for the flags) are always set. If the bit is not set in the attribute mask then it can be assumed the attribute has the default value. Drivers will error if unknown bits in the mask are set. Reviewed-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com> Reviewed-by: Emil Velikov <emil.velikov@collabora.com> Signed-off-by: Neil Roberts <neil@linux.intel.com>
2017-11-06intel: Don't flush the old context in intelMakeCurrentNeil Roberts2-18/+0
It shouldn't be necessary to flush the context within the driver implementation because the old context is explicitly flushed in _mesa_make_current which is called a little further on. It is useful to only have a single place that flushes when switching contexts to make it easier to later implement the GL_KHR_context_flush_control extension. The flush in intelMakeCurrent was added in commit 5505865 to implement the GLX semantics that the context should be flushed when it is released. When the commit was made there was no flush in _mesa_make_current because it was only added later in 93102b4c. I think that later commit effectively makes the first commit redundant. Reviewed-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Signed-off-by: Neil Roberts <neil@linux.intel.com>
2017-11-06egl/dri2: Factor out context attribute initializationAdam Jackson1-24/+7
Signed-off-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com> Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
2017-11-06etnaviv: Don't over-pad compressed texturesWladimir J. van der Laan1-9/+15
HALIGN_FOUR/SIXTEEN has no meaning for compressed textures, and we can't render to them anyway. So use the tightest possible packing. This avoids bugs with non-power-of-two block sizes. Signed-off-by: Wladimir J. van der Laan <laanwj@gmail.com> Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
2017-11-06etnaviv: ASTC texture supportWladimir J. van der Laan7-2/+57
Add ASTC texture support for hardware that supports this (currently only GC3000 on i.MX6qp is known to have this). Signed-off-by: Wladimir J. van der Laan <laanwj@gmail.com> Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
2017-11-06etnaviv: Update from rnndbWladimir J. van der Laan13-320/+1015
Updated as of etnav_viv commit 3b4a8ec. Signed-off-by: Wladimir J. van der Laan <laanwj@gmail.com> Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>