src/libANGLE/renderer/vulkan/vk_internal_shaders_autogen.cpp


Log

Author Commit Date CI Message
Shahbaz Youssefi 43997017 2019-03-30T23:24:01 Vulkan: fix non-float clear with draw Instead of using one draw call that clears all attachments, multiple draw calls are issued that clear a single attachment each. This allows us to have a manageable number of variations for the ImageClear.frag shader, now that non-float format support is introduced. Bug: angleproject:3187 Change-Id: Ic0c1067a396250bd80f31d00cad5a272acff8be8 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1545523 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Shahbaz Youssefi 4f3b207d 2019-01-01T14:48:25 Vulkan: Shader path for texture-to-texture copy This change implements glCopy[Sub]TextureCHROMIUM in GPU. As with the previous change implementing glCopyTex[Sub]Image2D, it currently only selects the shader path if the texture is already defined. Bug: angleproject:2958 Change-Id: Ia1b5625f92e6c9f91807c9b601e5c34d2d5e5c30 Reviewed-on: https://chromium-review.googlesource.com/c/1392394 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Shahbaz Youssefi f83a28a6 2018-12-09T03:48:34 Vulkan: Shader path for framebuffer-to-texture copy Part 1 in a series of changes to perform image copies on the GPU. Bug: angleproject:2958 Change-Id: I6264a880865c4738c0866f2dc71af63425fc4118 Reviewed-on: https://chromium-review.googlesource.com/c/1370724 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Shahbaz Youssefi e321940c 2018-12-08T16:54:14 Vulkan: Move image clear functionality to UtilsVk DispatchUtilsVk is renamed to UtilsVk and the functionality in framebuffer's clearWithDraw() is moved to that class. Eventually, more fragment-shader-based internal algorithms will be added to this class as well. Bug: angleproject:2958 Change-Id: I4753c9cb3288b59cd1ed60fe7a57b9f189704322 Reviewed-on: https://chromium-review.googlesource.com/c/1369284 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Shahbaz Youssefi 611bbaab 2018-12-06T01:59:53 Vulkan: Convert vertex attributes in compute In this commit, VertexArrayVk::convertVertexBuffer() is renamed to VertexArrayVk::convertVertexBufferCpu() to explicitly show it does a CPU readback. A new VertexArrayVk::convertVertexBuffer() function is added that has the same functionality in gpu (with some assumptions, where the CPU fallback is used should those assumptions fail). Currently, the only requirement is that buffer offset/stride are divided by the component size. ConvertVertex.comp is the shader responsible for this conversion, and it implements the functionality in renderer/copyvertex.inc, minus a few functions that are not used in the Vulkan backend. Bug: angleproject:2958, angleproject:3009 Change-Id: I8ec9a5f4672509bcf7b9e352cd27663970ad4653 Reviewed-on: https://chromium-review.googlesource.com/c/1364451 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Jamie Madill 7c985f5c 2018-11-29T18:16:17 Make angle::Result an enum. This moves away from a class type to a value type. This should improve performance when using angle::Result as a return value. Previously the generated code would return a pointer instead of a value. Improves performance in the most targeted microbenchmark by 10%. In more realistic scanarios it will have a smaller improvement. Also simplifies the class implementation and usage. Includes some unrelated code generation changes. Bug: angleproject:2491 Change-Id: Ifcf86870bf1c00a2f73c39ea6e4f05ca705050aa Reviewed-on: https://chromium-review.googlesource.com/c/1356139 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Shahbaz Youssefi 8f1b7a66 2018-11-14T16:02:54 Vulkan: Add DispatchUtilsVK This class provides a set of compute-based internal utilities. Currently, buffer clear and copy are implemented. Other possibilities include more efficient mip map generation, or specialized texture operations. VertexArrayVk::updateIndexTranslation() is updated to convert the GL_UNSIGNED_BYTE index buffer to a GL_UNSIGNED_SHORT one using this class to avoid a CPU readback. The vk::Format class is augmented with a few flags (IsInt, IsUnsigned) to be able to select the appropriate shader based on the format (float, int or uint). Bug: angleproject:2958,angleproject:3003 Change-Id: Ie35519deb3c32a3da5ccf74080c70092c9287f0a Reviewed-on: https://chromium-review.googlesource.com/c/1336307 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Shahbaz Youssefi df8c1053 2018-11-29T11:49:45 Vulkan: Uber-shader generated code optimization Refactors code out of generated functions into a common function and simplifies assertions. Bug: angleproject:2958 Change-Id: I896c2304c3ac1e043c16f9ecf81fa8b72a6b87c0 Reviewed-on: https://chromium-review.googlesource.com/c/1355501 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Shahbaz Youssefi a1442ecd 2018-11-26T12:48:10 Vulkan: Uber-shader support For each internal shader, there is now possibly a companion .json file that defines shader variations. The variations consist of a set of flags and a set of enums. Each enum defines a variation that takes one of a few values. Flags are shorthands for 2-value enums. In the shader code, #if can be used to change the shader based on variations derived from flags and enums. On the C++ side, those variations are combined into an index and the appropriate shader is retrieved from a table. Bug: angleproject:2958 Change-Id: Ic4fc7061adb20c047c26624305285e3005092aab Reviewed-on: https://chromium-review.googlesource.com/c/1351117 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
jchen10 be7f44fb 2018-05-21T14:35:32 Vulkan: Use push constant for masked clear color Storing the color in an uniform buffer, and updating it by vkCmdUpdateBuffer can hit a driver bug. Using vkCmdPushConstants instead can workaround this bug. Besides, push constant is expected to outperform memory-backed resource update according to the vkspec (section 13.2.6). Bug: angleproject:2547 Change-Id: I319cd8e07e0a1d0cb56005b78a46466d9fca436e Reviewed-on: https://chromium-review.googlesource.com/1067247 Commit-Queue: Jie A Chen <jie.a.chen@intel.com> Reviewed-by: Luc Ferron <lucferron@chromium.org>
Jamie Madill d47044ad 2018-04-27T11:45:03 Vulkan: Add framework for internal shaders. Vulkan intenal shaders are stored in a ShaderLibrary, and this is owned by the RendererVk. This way the shaders are reused between all the different Contexts. They are initialized lazily to keep init time low. They also have an associated Serial (called a ProgramSerial) so they can be identified in a PipelineDesc (used by the Pipeline cache). We use a python script to build and invoke the glslang validator, that also produces SPIR-V binary code snippets. These snippets are gathered into an auto-generated file that is exposed via an auto-generated header file. The InternalShaderID enum class gives access to the internal shaders that are shared through the Vulkan back-end. This also adds simple clear shaders to be used in masked color clears. The patch doesn't add any functionality but it is split off from the color clear functionality to keep the code size down. Bug: angleproject:2339 Bug: angleproject:2455 Change-Id: Ie83043eda217c9f013817b198c92a3b7ba0878b4 Reviewed-on: https://chromium-review.googlesource.com/1031372 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>