src/libANGLE/renderer/vulkan/vk_caps_utils.h


Log

Author Commit Date CI Message
Amirali Abdolrashidi ddd93740 2024-05-16T15:49:47 Vulkan: Extend GLES 3.2 extension requirements * Added CanSupportGLES32() to extend the extension requirements for GLES 3.2. * The following function returns the extension list: * GetRequiredGLES32ExtensionList() * If any required feature is not supported, we must fall back to GLES 3.1 (unless exposeNonConformantExtensionsAndVersions is enabled). * Added LogMissingExtensionsForGLES32() to log any missing extension that is required for GLES 3.2. * (Currently, if xfb extension is not supported and cannot be emulated, we fall back to GLES 2.0.) * (KHR_debug by default is marked as a supported extension in the frontend. Therefore it is not added to the check.) * In generateSupportedExtensions() * CanSupportGPUShader5EXT() is now private to vk_cap_utils.cpp. * Before checking if the max GLES version should be capped, we make sure that the caps are initialized. Bug: angleproject:42263905 Bug: b/336860504 Change-Id: Ib5d85df310c6ec7df6258d3ea430f9c365153fb1 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5544455 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi ffb32380 2023-10-02T16:01:37 Vulkan: Fix device creation on multi-queue devices When multiple eligible queue families are exposed by the device, ANGLE defers devices creation until a surface is made current, at which point it selects a queue family that supports presentation to that surface. This path was largely untested and was broken: - Some post-device-creation initialization was not deferred until the device was actually created - Some cap calculation depended on the chosen queue family index - Query of device capabilities was done too late, such that ANGLE could not correctly determine the level of support for ES versions. Bug: angleproject:8300 Change-Id: I2a35396d1fd08ed26d217dff07d10e9a9c1ac55f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4907895 Reviewed-by: Charlie Lao <cclao@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Roman Lavrov <romanl@google.com>
Antonio Maiorano 13816d2d 2020-06-16T14:27:04 Move vulkan_headers/entry_points to common/vulkan This will allow us to move common headers, such as extension headers, to common/vulkan. Bug: b/159027603 Bug: b/154620295 Change-Id: I1ff73dc5b7ee8f7dfb3ac0c5f30bd4b3a8183aeb Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2248205 Commit-Queue: Jamie Madill <jmadill@chromium.org> Commit-Queue: Antonio Maiorano <amaiorano@google.com> Reviewed-by: Tim Van Patten <timvp@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jonah Ryan-Davis 3cb9c4be 2020-03-13T13:56:47 Statically link vulkan-loader on Mac Disable angle_shared_libvulkan on Mac since we are the only client. Re-add codepaths to support this. Bug: angleproject:4477 Change-Id: Ie128c83adaae741636541bbfd6105d160d874a8d Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2102954 Commit-Queue: Jonah Ryan-Davis <jonahr@google.com> Reviewed-by: Tobin Ehlis <tobine@google.com>
Mohan Maiya 942d9152 2019-12-23T15:31:52 EGL: Add support for EGL_KHR_gl_colorspace extension If the Vulkan backend supports VK_EXT_swapchain_colorspace extension, enable the option for applications to create surfaces with non-linear formats. Not all formats have non-linear versions and is platform specific. Tests: dEQP-EGL.functional.wide_color.* angle_deqp_egl_tests --use-angle=vulkan --deqp-gl-context-type=egl --deqp-case=dEQP-EGL.functional.wide_color.* Bug: angleproject:2514 Change-Id: I441ee797cceef92c84473bfa18605c4fd8180de1 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1951963 Commit-Queue: Mohan Maiya <m.maiya@samsung.com> Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com>
Tobin Ehlis 5fd73782 2019-08-09T11:46:46 Vulkan: Use volk to load vk* func ptrs Thanks to Jamie Madill for some fixes to get all CI test passing w/ volk. This change updates all ANGLE targets that use Vulkan to dyanmically link all of the VK entrypoints using the volk OSS library from https://github.com/zeux/volk. It's only two source files so baking them directly into ANGLE repo. Also it's used in both the tests and libANGLE trees so added to src/common/third_party/volk dir. Updated volk and the renderer to track latest instance and device that were loaded and renderer will refresh vk* function pointers if the current and previous device and/or instance don't match. This prevents errors in the test framework as we transition between backends, especially between VK HW & SwiftShader ICDs. This change rolls the Vulkan Loader forward to use the latest loader version which no longer allows static linking but requires dynamic linking. Bug: angleproject:3740 Bug: angleproject:4092 Bug: angleproject:4162 Bug: angleproject:4210 Bug: angleproject:4225 Change-Id: I8a0b7d24c9545bbfdfaa4b9357a9bfe6793e0140 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1965640 Commit-Queue: Tobin Ehlis <tobine@google.com> Reviewed-by: Tobin Ehlis <tobine@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Shahbaz Youssefi 795a3559 2019-12-03T11:31:18 Vulkan: EXT_gpu_shader5 support: precise The precise keyword is used in tessellation shaders but introduced in this extension. EXT_gpu_shader5 introduces a handful of features to shaders. This change only implements the `precise` keyword. Bug: angleproject:3569 Change-Id: I2252b79098eb8ba2d2faa040d7eaed7548b7051e Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1939851 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Shahbaz Youssefi b16d69c3 2019-05-13T16:28:27 Vulkan: Add support for surface multisampling A multisample image is created for the surface if multisampling is enabled. Prior to present, this multisample image is resolved into the swapchain image. FramebufferVk::readPixelsImpl similarly has got the ability to resolve the region of interest into a temporary image prior to readback. Tests are added to render a point, line and a triangle on a 4x multisampled surface. Bug: angleproject:3204 Change-Id: I34aca502fa1918b5cbf000ff11521c350372e051 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1610188 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Frank Henigman 52047de4 2018-11-13T17:22:36 Vulkan: support instanced draws. (reland) Enable instanced draws with the Vulkan backend. So far it only works when Vulkan has VK_EXT_vertex_attribute_divisor. BUG=angleproject:2672 Change-Id: Ib6655625776344305911a1a742c85f17638cee8f Reviewed-on: https://chromium-review.googlesource.com/c/1469263 Reviewed-by: Frank Henigman <fjhenigman@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Frank Henigman <fjhenigman@chromium.org>
Shahbaz Youssefi 341304d8 2019-02-12T20:58:54 Revert "Vulkan: support instanced draws." This reverts commit 199a9f385f5489b957fe1e42bf08f3f40edd38ca. Reason for revert: Causes a validation error when the extension is not present. See failures here: https://ci.chromium.org/p/chromium/builders/luci.chromium.try/win-angle-rel/693 Original change's description: > Vulkan: support instanced draws. > > Enable instanced draws with the Vulkan backend. > So far it only works when Vulkan has VK_EXT_vertex_attribute_divisor. > > BUG=angleproject:2672 > > Change-Id: I9445ba64282fa00a6eaee207b15efa2c7a9abbd3 > Reviewed-on: https://chromium-review.googlesource.com/c/1334973 > Commit-Queue: Frank Henigman <fjhenigman@chromium.org> > Reviewed-by: Jamie Madill <jmadill@chromium.org> TBR=fjhenigman@chromium.org,jmadill@chromium.org,syoussefi@chromium.org Change-Id: Iffccc2cca259bcd19c068a87a415d4e196901f45 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: angleproject:2672 Reviewed-on: https://chromium-review.googlesource.com/c/1468201 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Frank Henigman 199a9f38 2018-11-13T17:22:36 Vulkan: support instanced draws. Enable instanced draws with the Vulkan backend. So far it only works when Vulkan has VK_EXT_vertex_attribute_divisor. BUG=angleproject:2672 Change-Id: I9445ba64282fa00a6eaee207b15efa2c7a9abbd3 Reviewed-on: https://chromium-review.googlesource.com/c/1334973 Commit-Queue: Frank Henigman <fjhenigman@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill b980c563 2018-11-27T11:34:27 Reformat all cpp and h files. This applies git cl format --full to all ANGLE sources. Bug: angleproject:2986 Change-Id: Ib504e618c1589332a37e97696cdc3515d739308f Reviewed-on: https://chromium-review.googlesource.com/c/1351367 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi c2b576d9 2018-10-12T14:45:34 Vulkan: Implement GL_EXT_disjoint_timer_query - QueryVk::queryCounter() and relevant utils are implemented for the sake of Timestamp queries. - TimeElapsed queries are implemented using two Timestamp queries. Bug: angleproject:2885 Change-Id: Id181bd97f5a24e7e96b3ea1b819483227e64daf0 Reviewed-on: https://chromium-review.googlesource.com/c/1276806 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 30b5d84c 2018-08-31T17:19:12 Vulkan: Fix line width caps. We would need to enable the wide lines feature to support non-unit line widths. For now just disable the caps. Bug: angleproject:2598 Bug: angleproject:2706 Change-Id: I0dd228fc2c357bdd9442c3d841be769987a53f72 Reviewed-on: https://chromium-review.googlesource.com/1127303 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Geoff Lang 38971fd1 2018-06-28T15:19:18 Vulkan: Support multiple depth stencil formats for backbuffers. Since the backbuffer's depth stencil is always emualted, it can support any depth stencil format. BUG=angleproject:2692 Change-Id: I29df62bb322c1ac4e9fcd54e4cbc4c219cf12e83 Reviewed-on: https://chromium-review.googlesource.com/1119075 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 12222070 2018-07-11T14:59:48 Vulkan: Move Feature init before device creation. We were previously creating our device *before* initializing the FeaturesVk fields. This means we weren't requesting the MAINTENANCE1 extension correctly. Moving feature init before the first createDevice call fixes the ordering issue. This unblocks the viewport flip behaviour fixes. Bug: angleproject:2673 Change-Id: Iae6973b57bcb4da78134a17b0644cd248bfb4981 Reviewed-on: https://chromium-review.googlesource.com/1133920 Reviewed-by: Luc Ferron <lucferron@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Geoff Lang 62edcce8 2018-07-04T12:43:39 Vulkan: Initialize the max pbuffer size members of Config. Pass the VkPhysicalDeviceProperties to GenerateDefaultConfig to initialize the pbuffer size limitations in a platform independent way. BUG=angleproject:2622 Change-Id: Id99bc505a1965cc037c5dcd65af031c1c655d424 Reviewed-on: https://chromium-review.googlesource.com/1126406 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Luc Ferron <lucferron@chromium.org>
Jamie Madill 1266d20a 2018-06-29T09:11:34 Vulkan: Add Features class. This class will control optional features in the Vulkan back-end. It allows toggling the feature support from a centralized place. This can be useful for performance or correctness testing. Add a placeholder feature for line segment raster. We can also use a feature for enabling backbuffer flipping. Bug: angleproject:2598 Bug: angleproject:2673 Change-Id: I8ddec2dba2181d5b014267be68aee9d2cb015ccf Reviewed-on: https://chromium-review.googlesource.com/1120149 Reviewed-by: Luc Ferron <lucferron@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Geoff Lang 475ef575 2018-06-27T15:54:18 Vulkan: Refactor config generation out of platform specific code. Permuatations of configs are now generated in platform-independent code and a DisplayVk callback is used to determine native support. BUG=angleproject:2692 Change-Id: Iad450c1a3275239d6bcbc350e8dd8e37470fa8e0 Reviewed-on: https://chromium-review.googlesource.com/1117563 Reviewed-by: Luc Ferron <lucferron@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Jamie Madill 0cec82a5 2018-03-14T09:21:07 Vulkan: Implement basic depth/stencil buffers. This implements basic depth/stencil states and clearing. This also implements "fallback" texture formats in the texture generation. Fallback formats are those that are chosen at runtime for replacements for main formats which lack driver support. They are different from override formats, which are always used because we assume there is no driver support. The Vulkan spec only asserts that one of the two of D32 or D24 has mandatory support. In the case of AMD, D24 is not supported fully, and we need the fallback format support emulation. Bug: angleproject:2357 Change-Id: Ic86cede3c69ff9893a06b3a55c3b5d2d897fa55f Reviewed-on: https://chromium-review.googlesource.com/916701 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Frank Henigman <fjhenigman@chromium.org>
Luc Ferron 0aa1ffe3 2018-02-08T13:42:36 Vulkan: Autogen mandatory texture caps * This commit includes a JS file to execute on the spec and generate the JSON output of all the mandatory texture caps. Bug: angleproject:2348 Change-Id: I57e969915bdd0e7104e00a73fd3743ff1ecf0a6d Reviewed-on: https://chromium-review.googlesource.com/911615 Commit-Queue: Luc Ferron <lucferron@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Luc Ferron d50537a7 2018-02-07T17:02:08 Vulkan: Texture caps map We are generating the caps map using various bits from the results of vkGetPhysicalDeviceFormatProperties. This contains all the information required to fill out "renderable", "texturable" and "filterable". Later we'll need to read from vkGetPhysicalDeviceImageFormatProperties as well to get the sampleCounts. The tests for now are not very meaningful since they use the same logic as the caps code to build the expected results, however as soon as we'll add the hard-coded list of mandatory texture caps, the test will be a good validator that we are not breaking anything. We only check the optimal set of flags since it is the most restrictive set. isTexturable = flags contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT isFilterable = flags contain VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT isRenderable = flags contain VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT OR VK_FORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT Bug: angleproject:2348 Change-Id: I9da0712190d2678d7e377d6fcd4ca83d23eefd38 Reviewed-on: https://chromium-review.googlesource.com/908712 Commit-Queue: Luc Ferron <lucferron@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Luc Ferron e4741fd0 2018-01-25T13:25:27 Vulkan: Begin implementing caps mappings Bug: angleproject:1577 Change-Id: Ibed36dee9120e9182362bc9858cf513f798079cf Reviewed-on: https://chromium-review.googlesource.com/887225 Commit-Queue: Luc Ferron <lucferron@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>