src/libANGLE/renderer/vulkan/win32/DisplayVkWin32.cpp


Log

Author Commit Date CI Message
Charlie Lao 8ea87a67 2021-08-17T18:46:36 Vulkan: Avoid texture format fallback when possible Some texture formats are not renderable on some hardware. For example, R4G4B4A4 are not renderable on nvidia and not blendable on ARM. R5G5B5A1 are also not blendable on nvidia. Right now when we generate format table, we are being most conservative, picking an actual format that is always renderable and blendable. This means when R4G4B4A4 is used on one of these GPUs, we are always falling back to R8G8B8A8 regardless if the texture is actually being used as color attachment or not. This CL adds a actualRenderableImageFormatID field in vk::Format. Initially we will pick actualImageFormatID which only ensures texture sample capability. If later on the texture is being attached to FBO, then we will switch to actualRenderableImageFormatID and do data copy if necessary. This way we save memory and reduce texture bandwidth for most usage of these textures. For renderBuffer and surfaces and EGLImages, we always pick the renderable textures. Bug: b/196456356 Change-Id: I02eec3365c2a317b0d1bad6dbdc3e741114c5bba Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3104514 Reviewed-by: Ian Elliott <ianelliott@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Charlie Lao <cclao@google.com>
Jamie Madill 2e9706d8 2021-01-08T17:29:42 Vulkan: Use angle::FormatID instead of VkFormat. This change switches the internal enums we pass around from VkFormat to FormatID. The end goal of the refactor is to allow the Vulkan back-end to store packed tables indexed by FormatID. Because VkFormat has large gaps in its enum space we'd otherwise need to use unordered data structures like unordered_map. The change removes the redundant VkFormat storage from vk::Format and uses a new table query to return the VkFormat that 1:1 matches an angle::FormatID. We also include a reverse mapping for use with native Vulkan get functions for Android. Also moves sRGB conversion functions into renderer_utils. A couple sRGB formats that don't exist in GL are no longer handled by the sRGB conversion functions. These formats should be extremely rare. Bug: angleproject:5438 Change-Id: Id8b49773ca0c556f9f5a6a10fcf0d9762b93bbea Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2618204 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Ian Elliott <ianelliott@google.com>
Jamie Madill e91097bf 2020-12-29T14:05:56 Vulkan: Clean up "actual"/"intended" naming. Clarifies that the GL internal format is an "intended" format and the Vulkan formats are "actual" formats. This makes all the format fields use the same consistent naming pattern. Bug: angleproject:5438 Change-Id: I935a49895109e9e06eae5ef98d5614dfd1128ff8 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2605728 Reviewed-by: Tim Van Patten <timvp@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Trevor David Black e815afbf 2020-09-07T22:09:22 First pass at increasing inclusivity Link to the inclusivity rules https://source.android.com/setup/contribute/respectful-code Bug: b/162834212 Bug: chromium:1097198 Change-Id: Ied5a9e3879d72bff3f77ea6fcda9b82f30c32c2f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2396737 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Trevor Black <vantablack@google.com>
Jeff Vigil 348814f9 2020-09-30T09:50:10 EGL: Add stencil8 to configs Add stencil8 option to Depth and Stencil of configs based on support of stencil8 format from GLES. Add stencil8 to configs Adjust dEQP-EGL expectations Unblocks dEQP-EGL.functional.*.*_no_depth_stencil tests Test: angle_deqp_egl_tests Bug: angleproject:3231 Change-Id: I57d7085a71a5b0dc45803351c9116a1694668852 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2430191 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Shahbaz Youssefi 84bd9dad 2020-08-26T22:01:44 Vulkan: Allow pbuffer usage if no window support Vulkan allows rendering to non-swapchain images, so pbuffers can always be supported on every config. With this change, if the window system does not support a configuration, EGL_WINDOW_BIT is removed from the config instead of dropping the config entirely. Bug: chromium:1034840 Change-Id: Ib972ed8ddf7660c327123fa83ae0674456cf2a35 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2378921 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: back sept 10 - Jamie Madill <jmadill@chromium.org>
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 df0203a9 2020-01-15T14:05:33 EGL: Add support for EGL_EXT_pixel_format_float extension Add support for floating point configs. On backends that support rendering to floating point formats, add them to EGL's frambuffer config list Bug: angleproject:3958 Tests: dEQP-EGL.functional.wide_color.*fp16* angle_end2end_tests --gtest_filter=EGLFloatSurfaceTest* Change-Id: Ie65f63013483267985c2b308567bf5025acf750e Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1993686 Commit-Queue: Mohan Maiya <m.maiya@samsung.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
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>
Jamie Madill 2ed71c81 2019-11-27T11:42:08 Vulkan: Isolate DisplayVk.h from Display.cpp. With this change we no longer can access Vulkan (or Volk) headers in the ANGLE front-end. The only header that needs to be visible is the new "DisplayVk_api.h". This will simplify a bit of Volk integration. Also reworks how the entry points and headers are exposed to the tests. Bug: angleproject:3740 Change-Id: Ic1434f304619427ed6ad6370bc090ceb7858df94 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1936707 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Tobin Ehlis <tobine@google.com>
Courtney Goeltzenleuchter edc560fe 2019-10-31T17:18:29 Vulkan: Add 565 and validate pixel formats: Windows Add support for 565 to Windows. Also includes code that verifies generated configs can actually be supported by Vulkan. Test: --use-angle=swiftshader --deqp-gl-config-name=rgb565d0s0ms0 --gtest_filter=dEQP.GLES3/functional_fragment_ops_interaction_basic_shader_80 Bug: angleproject:4016 Change-Id: Idcfd4dd368c4a30ef177aa89e1035d2f00570c99 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1885378 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Courtney Goeltzenleuchter <courtneygo@google.com>
Jamie Madill 5883a44b 2019-11-02T19:34:47 Vulkan: Don't pass width/height to Surface constructors. These values are accessible already from the Surface state. Sometimes they don't apply (e.g. GGP). Remove them to keep the code clearer. Updates the offscreen surface constructor to pull width and height from the attributes map instead of using parameters. Otherwise they weren't used. Refactoring change only. Bug: angleproject:4078 Change-Id: I9e49eadc7116562f62bd8d11342d6b8835376719 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1895762 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: 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>
Michael Spang 740db7fd 2019-02-06T09:40:13 Vulkan: Add support for loading layers from DisplayVk Fuchsia needs a layer to support VK_KHR_swapchain. Add the ability for DisplayVk subclasses to request a layer in addition to an extension. BUG=angleproject:2475 TEST=angle_end2end_tests on Fuchsia Change-Id: If86c773d4bd4ebecaee4b1631d3d4975105fe849 Reviewed-on: https://chromium-review.googlesource.com/c/1456478 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: 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>
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>
Geoff Lang cb8a921b 2018-06-28T12:30:36 Vulkan: Support RGB/BGR backbuffers emulated on RGBA/BGRA. BUG=angleproject:2692 BUG=angleproject:2523 BUG=angleproject:2715 BUG=angleproject:2716 Change-Id: I538b385f8b66fb97e176953b0fc4a6299849c005 Reviewed-on: https://chromium-review.googlesource.com/1118713 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Luc Ferron <lucferron@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>
Geoff Lang 9e14164d 2018-06-27T11:43:18 VK: Support pbuffer surfaces. TEST=PbufferTest TEST=dEQP-EGL.functional.color_clears.single_context.gles2.rgba8888_pbuffer TEST=dEQP-EGL.functional.color_clears.multi_context.gles2.rgba8888_pbuffer TEST=dEQP-EGL.functional.render.single_context.gles2.rgba8888_pbuffer TEST=dEQP-EGL.functional.render.multi_context.gles2.rgba8888_pbuffer BUG=angleproject:2622 Change-Id: I99f64689c274fbb565b365f4a05b52252528fc38 Reviewed-on: https://chromium-review.googlesource.com/1117030 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill f618c9e5 2018-02-15T14:45:40 Vulkan: Add depth/stencil surfaces. This change lets us create egl::Surfaces from a D24S8 config. This is a bit hacky, because the spec only mandates 24 -or- 32 bit depth support, but not both or either individually. Will need follow-up work for proper EGL config setup. A single depth buffer is allocated for the entire set of swapchain images and is used with each. This also might be a problem if we're rendering to multiple frames at the same time. We'll likely have to revisit this in the future as well. This adds a new RenderTargetVk to the SurfaceVk class which points to the Depth/Stencil image. Since ImageViews must refer to either the depth or stencil, but not both, we'll need to address this when we get to implementing depth/stencil texture reads in shaders. Bug: angleproject:2357 Change-Id: Ibed0eed7e1d0efb272758dbfc79fa2c5aa93997f Reviewed-on: https://chromium-review.googlesource.com/919761 Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Yuly Novikov 199f4294 2018-01-19T19:04:05 Vulkan: Enable on Android Add Android DisplayVk and WindowSurfaceVk variants. Build Vulkan backend and validation layers on Android if toolchain uses required NDK API level. Fix validation layers discovery to work on Android. BUG=angleproject:2314 TEST=angle_end2end_tests builds and runs on Nexus 5X, 12 VULKAN tests pass Change-Id: Iac2ec4ecd6470a7552f9f60c023ba1760aa090c5 Reviewed-on: https://chromium-review.googlesource.com/887797 Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
Frank Henigman 29f148b0 2016-11-23T21:05:36 Support Vulkan on Linux as well as Windows. Refactor display and surface classes into Win32 and Linux parts and add Linux parts to gn and gyp builds. BUG=angleproject:1668 Change-Id: I2a7d29c35f4f42fa0035bd97938d3770f3627672 Reviewed-on: https://chromium-review.googlesource.com/412426 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>