|
d6afeadd
|
2021-08-30T14:44:59
|
|
Vulkan: Make descriptor set bindings consistent across shader stages
Previously if a uniform or uniform block was used in a program's
shader, a different descriptor set binding index would be used
for each linked shader stage. Now, the bindings chosen for
uniforms and blocks of the same name will be identical.
This change also updates mActiveImagesMask in ProgramExecutable
for separable programs.
Bug: angleproject:4512
Tests: KHR-GLES3*.core.geometry_shader.api.max_image_uniforms
ProgramPipelineTest31.MaxFragmentShaderStorageBufferObjects
ProgramPipelineTest31.MaxFragmentUniformBufferObjects
ProgramPipelineTest32.MaxGeometryImageUniforms
GeometryShaderTestES32.MaxGeometryImageUniforms
Change-Id: I3662d06b4dec284f4c51c6047e6b684b82925e3f
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3068381
Commit-Queue: Brandon Schade <b.schade@samsung.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
|
|
cf24931a
|
2021-08-17T10:48:23
|
|
Vulkan: Add ImageHelper::getActualFormat()
This is preparation for future CLs. In the future vk::Format may not
tell you what actual format is. This CL adds a new method of
ImageHelper::getActualFormatID() and ImageHelper::getActualFormat() so
that we can use these two APIs and avoid using vk::Format, thus reduce
reliance on vk::Format.
Bug: b/196456356
Change-Id: Ic50e664e033feb5e066f40269c33cffe96024172
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3100319
Commit-Queue: Charlie Lao <cclao@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Ian Elliott <ianelliott@google.com>
|
|
5c8bf081
|
2021-06-08T13:12:24
|
|
Vulkan: Add support for YUV internal format extension
1. Add a function to upload YUV image data to textures
2. Modify stageSubresourceUpdate method to account for YUV images
3. Create VkSamplerYcbcrConversion when initializing ImageHelper
4. Update hasImmutableSampler to account for native YUV format support
5. Skip initializeNonZeroMemory for YUV formats
Bug: angleproject:5773
Test: Texture2DTestES3.TexStorage2D*Yuv*Vulkan*
Change-Id: I270f04bbf903cf2bf19f100eb95f32953d491c39
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2947767
Commit-Queue: Mohan Maiya <m.maiya@samsung.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
715a49c7
|
2021-07-03T08:48:07
|
|
Vulkan: Handle incompatible immutable sampler formats
If the immutable sampler format of an active texture is not
compatible with those supported by the pipeline layout, recreate
the pipeline layout.
Bug: b/155487768
Bug: angleproject:5033
Bug: angleproject:5773
Test: ImageTest.SourceAHBTarget2DExternalCycleThroughYuvTargetsNoData*Vulkan
Change-Id: Iea78e1738ea2fb133a24dc88f5b68daf4cc1bdfe
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2997289
Commit-Queue: Mohan Maiya <m.maiya@samsung.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
31b06f5f
|
2021-07-12T10:06:04
|
|
Vulkan: Account for immutable samplers that need multiple descriptors
It is valid for immutable samplers to need more than 1 descriptor count.
Account for this possiblity while calculating descriptor pool size.
Bug: b/155487768
Bug: angleproject:5033
Bug: angleproject:5773
Bug: angleproject:6141
Change-Id: Ifb0ed3e4b3c01c61d81dd0c628101f31d4c8bd05
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3005329
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Mohan Maiya <m.maiya@samsung.com>
|
|
e2881e25
|
2021-06-27T10:45:41
|
|
Vulkan: Handle incompatible pipeline layouts
It is necessary that a pipeline layout be compatible with active
textures. Make sure to recreate the pipeline layout otherwise.
Bug: b/155487768
Bug: angleproject:5033
Bug: angleproject:5773
Test: ImageTest.SourceAHBTarget2DExternalCycleThroughRgbAndYuvTargets*Vulkan
Change-Id: Iab371a9035b6cd143585e5000e2e68c7302ef447
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2992056
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
b77a6c25
|
2021-06-16T11:01:14
|
|
Vulkan: Avoid using VK_WHOLE_SIZE when using dynamic offsets
Binding descriptor sets that use VK_WHOLE_SIZE with a dynamic offset
results in the VUID-vkCmdBindDescriptorSets-pDescriptorSets-01979
validation error.
Updated the updateDefaultUniformsDescriptorSet function to use the
uniform's size instead of using VK_WHOLE_SIZE.
Bug: angleproject:5924
Tests: dEQP-GLES31.functional.shaders.multisample_interpolation.*
SimpleStateChangeTest.UniformUpdateTest*Vulkan
UniformTestES3.MatrixUniformUpload*Vulkan
Change-Id: Ie4633af61d59a9401f599d336a5b9040cdf18004
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2950309
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
e354ff1a
|
2021-03-05T04:07:21
|
|
Vulkan: Allow DynamicBuffer suballocation in BufferVk
When allocations are made from DynamicBuffer, they suballocate from a
possibly larger BufferHelper. In BufferVk, the offset of the
suballocation was discarded, which limited the use of DynamicBuffer to a
pool of small buffers.
This change applies any such offset that may arise from suballocations
everywhere, and makes BufferVk use a larger buffer size when the
GL_DYNAMIC_* buffer usage hints are provided.
Bug: angleproject:5719
Change-Id: I3df3317f7acff1b1b06a5e3e2bb707616a7d0512
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2738650
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
ccc0fbaa
|
2021-03-24T17:56:38
|
|
Vulkan: Related fixes for buffer descriptor set cache.
Includes some stats counter gathering and a few related refactors and
cleanups. Also includes a new overlay widget.
Bug: angleproject:5736
Change-Id: Ida8d2cd815c5b598c6a442dd9bbfdf51e9c05180
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2785431
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Charlie Lao <cclao@google.com>
Reviewed-by: Tim Van Patten <timvp@google.com>
|
|
0c77f3ad
|
2021-03-10T15:58:00
|
|
Vulkan: Implement shader buffers descriptor cache.
Implements a descriptor set cache for UBOs, SSBOs, and atomic counter
buffers. Storage Images and framebuffer fetch input attachments are
not yet included. Requires moving the buffer barrier handling into
ContextVk, similarly to how we handle the barriers for Textures.
The packed description key for the descriptors uses a "fast" vector
with a basic minimum size. For most cases of a few buffers this will
fit easily in stack memory, but for larger programs with many buffers
we fit this into heap memory. The key has a large upper bound due to
the high ES 3.2 requirements and the need to index several values such
as the offset and binding size.
We use dynamic offsets for uniform buffers when possible. This ensures
applications like Manhattan 3.1 that use sets of common buffers with
changing offsets hit the cache most of the time.
Because of resource limits we pick at compilation time whether to use
dynamic or static descriptor sets. Mostly this applies to tests that
use a large number of uniform buffers. A future implementation could
be smart and would recompile the program with heuristics to use a
minimal number of dynamic indices.
Reduces the number of descriptor set updates from ~300 -> ~30 per frame
in Manhattan 3.1 and in Asphalt 9 from 900+ to as low as 0 per frame.
Bug: angleproject:5736
Change-Id: I5c2a3881bec90d301dab15cc86c8a70e60674ad7
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2757515
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
d3e1a7ff
|
2021-03-29T16:21:23
|
|
Reset mCurrentGraphicsPipeline in ProgramExecutableVk::reset
ContextVk::mCurrentGraphicsPipeline should be reset during
ProgramExecutableVk::reset() since programInfo.release() frees the
PipelineHelper that it's pointing to. This has resulted in several
use-after-free errors, which this CL will prevent in the future.
Bug: angleproject:5624
Bug: b/182409935
Change-Id: I847bb7eb5b593c89b84f0fbbca23ea5367f5f55c
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2792861
Commit-Queue: Tim Van Patten <timvp@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Cody Northrop <cnorthrop@google.com>
|
|
efc53d0f
|
2021-04-03T21:30:15
|
|
Vulkan: Refactor to descriptor offset array.
This is in preparation for using dynamic offsets for other sets than
the default descriptors.
Bug: angleproject:5736
Change-Id: I546e688ad57a35b380f8d7f303ffc0c62773ac18
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2804813
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
|
|
41a34d6b
|
2021-04-03T16:43:58
|
|
Vulkan: Use constants for descriptor types.
This will make it easier to substitute in the future.
Bug: angleproject:5736
Change-Id: I0686c4c396e9f12cfb71253ccd9aa491a7942826
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2804812
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
0af8cfa7
|
2021-03-17T17:43:03
|
|
Reland "Save/Load missing members"
This is a reland of b2e76cf58fc012b068aab4716a432bb8951e93e3
Always call saveLinkedStateInfo() so we fill in the necessary values
with valid data for monolithic programs also.
Original change's description:
> Save/Load missing members
>
> There are several class/struct members that are missing when a program
> is serialized/deserialized. This leads to errors when attempting to link
> programs that have been deserialized. For example, when drawing with a
> PPO that contains programs which were created with glProgramBinary().
>
> This CL adds saving/loading the missing members.
>
> Bug: b/182409935
> Change-Id: I637c6cd8c174acd6da8d51433893323a32e5d7c0
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2770683
> Commit-Queue: Tim Van Patten <timvp@google.com>
> Reviewed-by: Jamie Madill <jmadill@chromium.org>
> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
> Reviewed-by: Cody Northrop <cnorthrop@google.com>
Bug: b/182409935
Bug: angleproject:5793
Change-Id: I07ca8f5dfed8c0a9eac3a0defb1602d2ba021c5f
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2782189
Commit-Queue: Tim Van Patten <timvp@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Cody Northrop <cnorthrop@google.com>
|
|
776c6015
|
2021-02-26T00:00:57
|
|
Vulkan: Call glslang at compile time
With this change, the ANGLE translator immediately compiles the
generated GLSL into SPIR-V with glslang and discards the source. This
is in preparation for generating SPIR-V directly, by making the frontend
and backend already able to digest it.
This change also allows the expensive glslang calls to be parallelized,
improving the following perf test by about 20%:
LinkProgramBenchmark.Run/vulkan_compile_and_link_multi_thread
Previously, the test was run as such in the Vulkan backend:
Main Thread 1 Thread 2
Compile1 --->
Compile2 --------------------->
Translator Translator
<---
<---------------------
Link
glslang
for
shader1
glslang
for
shader2
Done
With this change, it is run as such:
Main Thread 1 Thread 2
Compile1 --->
Compile2 --------------------->
Translator Translator
glslang glslang
<---
<---------------------
Link
Done
glslang_wrapper_utils no longer interacts with glslang! A rename will
follow.
Bug: angleproject:4889
Change-Id: If4303e8ba0ba43b1a2f47f8c0a9133d0bee1a19a
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2721195
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
2a43f43a
|
2021-03-23T15:35:30
|
|
Revert "Save/Load missing members"
This reverts commit b2e76cf58fc012b068aab4716a432bb8951e93e3.
Reason for revert: Causing MSan failures on Linux. See bug.
Bug: chromium:1191344
Original change's description:
> Save/Load missing members
>
> There are several class/struct members that are missing when a program
> is serialized/deserialized. This leads to errors when attempting to link
> programs that have been deserialized. For example, when drawing with a
> PPO that contains programs which were created with glProgramBinary().
>
> This CL adds saving/loading the missing members.
>
> Bug: b/182409935
> Change-Id: I637c6cd8c174acd6da8d51433893323a32e5d7c0
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2770683
> Commit-Queue: Tim Van Patten <timvp@google.com>
> Reviewed-by: Jamie Madill <jmadill@chromium.org>
> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
> Reviewed-by: Cody Northrop <cnorthrop@google.com>
Bug: b/182409935
Change-Id: I1209257ed6bb55ba2d01d92bd3305d5e3ad6ee28
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2780015
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
572fd801
|
2021-03-22T16:14:34
|
|
Vulkan: Rename Uniforms/XFB descriptor desc.
The new name is more consistent with the other names.
Refactoring change only.
Bug: angleproject:5736
Change-Id: Idc47fef29040e3a422267795c4536163a6f8eb4e
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2779953
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
b2e76cf5
|
2021-03-17T17:43:03
|
|
Save/Load missing members
There are several class/struct members that are missing when a program
is serialized/deserialized. This leads to errors when attempting to link
programs that have been deserialized. For example, when drawing with a
PPO that contains programs which were created with glProgramBinary().
This CL adds saving/loading the missing members.
Bug: b/182409935
Change-Id: I637c6cd8c174acd6da8d51433893323a32e5d7c0
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2770683
Commit-Queue: Tim Van Patten <timvp@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Cody Northrop <cnorthrop@google.com>
|
|
02acc5ee
|
2021-03-18T16:08:59
|
|
Vulkan: More cleanups to perf counters.
This refactors the pipeline type in the ContextVk class to also use
a packed enum map. It also expands the object perf counters to store
both a specific and cumulative version for use in different cases.
Bug: angleproject:5736
Change-Id: I6ff78e38065eb577f2b95b1d9c4f9cc31d7f325f
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2774184
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
b717952e
|
2021-03-18T10:39:34
|
|
Vulkan: Use packed enum map for descriptor set index.
This simplifies a lot of the data structure indexing in the program
executable class. Also renames the "DriverUniforms" and
"InternalShader" index into a single "Internal" index.
Bug: angleproject:5736
Change-Id: I2a51d8b14d5b16b438dbe636f77b11bbc045ba9a
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2773321
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
|
|
1b08cfcb
|
2021-03-18T10:01:54
|
|
Vulkan: Clean up shader buffer DS allocation.
We were using repeated code patterns in several places.
Bug: angleproject:5736
Change-Id: I206783dd792c3b0f9d38027235445ec600a60d88
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2773320
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
716b2cba
|
2021-03-12T14:46:53
|
|
Use bitset masks for active shader buffers.
This switches the tracking for the uniform, shader storage, and atomic
counter buffers to use bitset masks to determine where there are
active buffers. This will make iterating these buffer sets faster.
Also renames the limit for atomic counter buffers to be consistent
with the other buffer types.
Also applies the implementation limit to atomic counter buffer
bindings. This fixes out-of-bounds access on some Linux platforms that
expose a large number of bindings.
Bug: angleproject:5736
Change-Id: Ice801645697592d1dda6aebf0cb69767594cc0c5
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2757509
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
|
|
89d2a96a
|
2021-03-09T18:37:57
|
|
Vulkan: Add test for UBO descriptor allocations.
This performance counter test verifies that re-binding the same
two buffers repeatedly doesn't allocate new descriptor sets. Currently
the test fails because we don't cache descriptor sets for UBOs.
Covers equivalent code patterns in Asphalt 9.
Reorganizes the perf counters collected for the program objects. Now
they are per-frame reset instead of cumulative. This tracking is now
consistent for the different counter types. In the future we can add
cumulative tracking for all per-object and global perf counters.
Bug: angleproject:5736
Change-Id: I23d04b6453e38af1cf4af7274d24382d136efad3
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2746176
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
c7c38731
|
2021-03-04T15:04:07
|
|
Vulkan: Move SpirvBlob definition to common/
For use by the translator.
Bug: angleproject:4889
Change-Id: Ie95cafd3cfcdde50acc5d26d3c00e6574186a805
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2737276
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
77637f2d
|
2021-02-19T15:18:52
|
|
Vulkan: Generate xfb support code in SPIR-V for emulation path
This change moves the code generation at link time from source code to
SPIR-V. As a result, transform feedback extension and emulation paths
are more similarly handled before SPIR-V transformation (they both store
information identically in the ShaderInterfaceVariableInfoMap).
This change gets rid of the @@ XFB-OUT @@ marker. With no source code
generation at link time, shader compilation can be moved to
glCompileShader time.
Bug: angleproject:4888
Change-Id: I8cdb89c22b57ce48cf5d226b8e41622d9d550d46
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2713269
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
|
|
550f2a3e
|
2021-02-24T09:49:42
|
|
Vulkan: Shader support for EXT_shader_framebuffer_fetch_non_coherent
Translator can accept gl_LastFragData and 'inout' variable to gain
access to framebuffer attachment data. The Vulkan translator replaces
it with the SubpassInput type variable. Note that this works only for
the noncoherent version of the extension.
Bug: angleproject:5454
Test: *EXTShaderFramebufferFetchNoncoherent*.*
Change-Id: I392f84ee3ad3eb9fbd09d0b7ff83731a9a3f33f6
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2598060
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Mohan Maiya <m.maiya@samsung.com>
|
|
907a3cee
|
2021-02-17T08:07:45
|
|
Vulkan: Add support for EXT_shader_framebuffer_fetch_non_coherent
EXT_shader_framebuffer_fetch_non_coherent is implemented using subpass
input attachments. The extension will be enabled in a follow up change
that adds required changes to the Vulkan translator.
Bug: angleproject:5454
Test: FramebufferFetchNonCoherentES31.*Vulkan
Change-Id: Ic73c66a476c4a21db5269431166a198841f1dc0c
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2598059
Commit-Queue: Mohan Maiya <m.maiya@samsung.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
79ae52dd
|
2021-02-11T14:18:41
|
|
Vulkan: Fix missing visibility barrier for host-visible buffer writes
See https://chromium-review.googlesource.com/c/angle/angle/+/1661252 for
context. This was accidentally broken during the command graph rework.
This will eventually be validated by syncval. See
https://github.com/KhronosGroup/Vulkan-ValidationLayers/issues/2329.
Bug: angleproject:5070
Change-Id: Ic16fa900e554d46e54b42fc3fbe0f96d5327fa0f
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2689379
Reviewed-by: Charlie Lao <cclao@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
a8a2a71b
|
2021-02-01T17:18:18
|
|
Vulkan: Support y-flip with no driver support.
We can reuse the surface rotation matrix code to do the y-flip.
This requires the SPIR-V transformation support. Because not
all rotations are encoded into the table we can only support
rotation with the driver support for y-flip (currently).
Includes some very minimal regression testing. This work is
targeted towards supporting vk-portability implementations
which are not as up-to-date with Vulkan features.
Bug: angleproject:5596
Change-Id: I270fa1efc03267551d28df33ddac9972e1343d60
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2665892
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Ian Elliott <ianelliott@google.com>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
37a0dced
|
2021-01-28T17:52:05
|
|
Vulkan: Disable clip space transform based on EXT_clip_control
When depth is set to "ZERO_TO_ONE_EXT" using EXT_clip_control
API, don't transform the z position in shader since it now matches
Vulkan's depth range. Toggle transformPositionToVulkanClipSpace
accordingly.
Bug: angleproject:5471
Tests: dEQP-GLES2.functional.clip_control.depth_mode_zero_to_one
Change-Id: I7e715cb3c98cecf5aaa5cdc3822a3a83bae9c720
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2615864
Commit-Queue: Mohan Maiya <m.maiya@samsung.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
ea71c6b6
|
2021-01-12T14:13:35
|
|
Vulkan: Emulate R32F images with R32UI
GL requires that imageAtomicExchange be supported for r32f formats.
However VK_FORMAT_FEATURE_STORAGE_*_ATOMIC_BIT is nearly unsupported
everywhere without some Vulkan extension that brings in unnecessary
support.
This GL feature is emulated by transforming the shader to use r32ui for
all images that originally specified r32f. floatToUintBits and
uintBitsToFloat is used to maintain correct usage of the image* builtin
functions.
Bug: angleproject:5535
Change-Id: Ie607089935d3283b3ffa054f4b4385b81fb8f53d
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2635453
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
|
|
beea4050
|
2021-01-16T11:32:50
|
|
Reland "Vulkan: Generate gl_Position.z correction in SPIR-V"
This reverts commit e3c357369f970a94759074418670de2ef131dcb8.
Reason for revert: Fixed parent CL
Original change's description:
> Revert "Vulkan: Generate gl_Position.z correction in SPIR-V"
>
> This reverts commit 1e4f8b02ae0603e7034c37e0ff6cee39c38771a9.
>
> Reason for revert:
> Earlier CL breaks pre-rotation:
> https://chromium-review.googlesource.com/c/angle/angle/+/2598584
>
> Original change's description:
> > Vulkan: Generate gl_Position.z correction in SPIR-V
> >
> > Instead of having the translator output code to transform gl_Position.z
> > to Vulkan clip space in the vertex stage, this change makes the SPIR-V
> > transformer perform this operation on the last geometry stage.
> >
> > An alternative solution would be to generate this transformation in the
> > translator in every geometry stage, each controlled by a separate
> > specialization constant. This change avoids unnecessary modifications
> > to earlier stages. Additionally, the transformer is already modifying
> > gl_Position.xy for pre-rotation, so the addition of a small
> > transformation of gl_Position.z in the same spot is rather trivial.
> >
> > Bug: angleproject:5479
> > Change-Id: Id971179ba47b206204bfdaf3b2b295ef97dd5117
> > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2598585
> > Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
> > Reviewed-by: Charlie Lao <cclao@google.com>
> > Reviewed-by: Jamie Madill <jmadill@chromium.org>
>
> TBR=syoussefi@chromium.org,jmadill@chromium.org,cclao@google.com
>
> Change-Id: I3bdf3d6f743125eaf552608f2664b715bd6935c5
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: angleproject:5479
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2634203
> Reviewed-by: Tim Van Patten <timvp@google.com>
> Commit-Queue: Tim Van Patten <timvp@google.com>
TBR=timvp@google.com,syoussefi@chromium.org,jmadill@chromium.org,cclao@google.com
# Not skipping CQ checks because this is a reland.
Bug: angleproject:5479
Change-Id: Id23052b8fc6bffa5bab20cb93eb21ea49a0f80d7
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2633710
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
dfd9bdfd
|
2021-01-16T11:32:30
|
|
Reland "Vulkan: Generate gl_Position pre-rotation in SPIR-V"
This reverts commit 3d39b7c5eab88c420d982155ffbb6181c678ceea.
Reason for revert: Fixed interaction with the
`forceDriverUniformOverSpecConst` workaround.
Original change's description:
> Revert "Vulkan: Generate gl_Position pre-rotation in SPIR-V"
>
> This reverts commit 0f86b196ffaffeeee3460e3188f20a7ac120796d.
>
> Reason for revert:
> Breaks pre-rotation for all apps, so they are displayed in portrait instead of landscape.
>
> Original change's description:
> > Vulkan: Generate gl_Position pre-rotation in SPIR-V
> >
> > Instead of having the translator output pre-rotation code in the vertex
> > stage based on a specialization constant, this change makes the SPIR-V
> > transformer perform pre-rotation of gl_Position on the last geometry
> > stage.
> >
> > An alternative solution would be to generate pre-rotation code in the
> > translator in every geometry stage, each controlled by a separate
> > specialization constant. This change avoids unnecessary modifications
> > to earlier stages. The generated shaders are also smaller, as they
> > don't contain a mat2[8] pre-rotation constant matrix. The SPIR-V
> > transformer knows the pre-rotation at transformation time, so it can
> > simply use swizzles to achieve the same results.
> >
> > This also ties in with upcoming changes which move gl_Position.z
> > correction to the last geometry shader stage, which is trivially done
> > piggy-backing on the infrastructure in this change.
> >
> > Bug: angleproject:5478
> > Change-Id: I9d5d9d19f3ccda665f5504368ce5ddfa5f383faf
> > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2598584
> > Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
> > Reviewed-by: Charlie Lao <cclao@google.com>
> > Reviewed-by: Jamie Madill <jmadill@chromium.org>
>
> TBR=syoussefi@chromium.org,jmadill@chromium.org,cclao@google.com
>
> Change-Id: I81f237fa6b10c7d59831363bee8999e7ad2f09be
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: angleproject:5478
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2633694
> Reviewed-by: Tim Van Patten <timvp@google.com>
> Commit-Queue: Tim Van Patten <timvp@google.com>
TBR=timvp@google.com,syoussefi@chromium.org,jmadill@chromium.org,cclao@google.com
Bug: angleproject:5478
Change-Id: I7c5eaeef03d9520abd36a1c4a766b6abbf4fdb45
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2633709
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
60015ff6
|
2021-01-14T02:03:07
|
|
Vulkan: Redo RewriteStructSamplers
This transformation is split into two. The first transformation solely
takes out the samplers out of structs, and potentially generates array
of array of samplers. A second transformation is added that takes any
array of array of opaque uniforms and flattens it.
A follow up change will simplify RewriteAtomicCounters which also
handles array of arrays (which is no longer possible), and removes
dependency on shaderStorageBufferArrayDynamicIndexing.
Bug: angleproject:2703
Bug: angleproject:3881
Bug: angleproject:4071
Bug: angleproject:4211
Change-Id: I352bb2bbe65ac49f4d7d753c0ba3160fa3cc925a
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2628138
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
3d39b7c5
|
2021-01-16T00:15:14
|
|
Revert "Vulkan: Generate gl_Position pre-rotation in SPIR-V"
This reverts commit 0f86b196ffaffeeee3460e3188f20a7ac120796d.
Reason for revert:
Breaks pre-rotation for all apps, so they are displayed in portrait instead of landscape.
Original change's description:
> Vulkan: Generate gl_Position pre-rotation in SPIR-V
>
> Instead of having the translator output pre-rotation code in the vertex
> stage based on a specialization constant, this change makes the SPIR-V
> transformer perform pre-rotation of gl_Position on the last geometry
> stage.
>
> An alternative solution would be to generate pre-rotation code in the
> translator in every geometry stage, each controlled by a separate
> specialization constant. This change avoids unnecessary modifications
> to earlier stages. The generated shaders are also smaller, as they
> don't contain a mat2[8] pre-rotation constant matrix. The SPIR-V
> transformer knows the pre-rotation at transformation time, so it can
> simply use swizzles to achieve the same results.
>
> This also ties in with upcoming changes which move gl_Position.z
> correction to the last geometry shader stage, which is trivially done
> piggy-backing on the infrastructure in this change.
>
> Bug: angleproject:5478
> Change-Id: I9d5d9d19f3ccda665f5504368ce5ddfa5f383faf
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2598584
> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
> Reviewed-by: Charlie Lao <cclao@google.com>
> Reviewed-by: Jamie Madill <jmadill@chromium.org>
TBR=syoussefi@chromium.org,jmadill@chromium.org,cclao@google.com
Change-Id: I81f237fa6b10c7d59831363bee8999e7ad2f09be
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: angleproject:5478
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2633694
Reviewed-by: Tim Van Patten <timvp@google.com>
Commit-Queue: Tim Van Patten <timvp@google.com>
|
|
e3c35736
|
2021-01-16T00:12:54
|
|
Revert "Vulkan: Generate gl_Position.z correction in SPIR-V"
This reverts commit 1e4f8b02ae0603e7034c37e0ff6cee39c38771a9.
Reason for revert:
Earlier CL breaks pre-rotation:
https://chromium-review.googlesource.com/c/angle/angle/+/2598584
Original change's description:
> Vulkan: Generate gl_Position.z correction in SPIR-V
>
> Instead of having the translator output code to transform gl_Position.z
> to Vulkan clip space in the vertex stage, this change makes the SPIR-V
> transformer perform this operation on the last geometry stage.
>
> An alternative solution would be to generate this transformation in the
> translator in every geometry stage, each controlled by a separate
> specialization constant. This change avoids unnecessary modifications
> to earlier stages. Additionally, the transformer is already modifying
> gl_Position.xy for pre-rotation, so the addition of a small
> transformation of gl_Position.z in the same spot is rather trivial.
>
> Bug: angleproject:5479
> Change-Id: Id971179ba47b206204bfdaf3b2b295ef97dd5117
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2598585
> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
> Reviewed-by: Charlie Lao <cclao@google.com>
> Reviewed-by: Jamie Madill <jmadill@chromium.org>
TBR=syoussefi@chromium.org,jmadill@chromium.org,cclao@google.com
Change-Id: I3bdf3d6f743125eaf552608f2664b715bd6935c5
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: angleproject:5479
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2634203
Reviewed-by: Tim Van Patten <timvp@google.com>
Commit-Queue: Tim Van Patten <timvp@google.com>
|
|
1e4f8b02
|
2020-12-21T23:47:47
|
|
Vulkan: Generate gl_Position.z correction in SPIR-V
Instead of having the translator output code to transform gl_Position.z
to Vulkan clip space in the vertex stage, this change makes the SPIR-V
transformer perform this operation on the last geometry stage.
An alternative solution would be to generate this transformation in the
translator in every geometry stage, each controlled by a separate
specialization constant. This change avoids unnecessary modifications
to earlier stages. Additionally, the transformer is already modifying
gl_Position.xy for pre-rotation, so the addition of a small
transformation of gl_Position.z in the same spot is rather trivial.
Bug: angleproject:5479
Change-Id: Id971179ba47b206204bfdaf3b2b295ef97dd5117
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2598585
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Charlie Lao <cclao@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
0f86b196
|
2020-12-21T22:54:05
|
|
Vulkan: Generate gl_Position pre-rotation in SPIR-V
Instead of having the translator output pre-rotation code in the vertex
stage based on a specialization constant, this change makes the SPIR-V
transformer perform pre-rotation of gl_Position on the last geometry
stage.
An alternative solution would be to generate pre-rotation code in the
translator in every geometry stage, each controlled by a separate
specialization constant. This change avoids unnecessary modifications
to earlier stages. The generated shaders are also smaller, as they
don't contain a mat2[8] pre-rotation constant matrix. The SPIR-V
transformer knows the pre-rotation at transformation time, so it can
simply use swizzles to achieve the same results.
This also ties in with upcoming changes which move gl_Position.z
correction to the last geometry shader stage, which is trivially done
piggy-backing on the infrastructure in this change.
Bug: angleproject:5478
Change-Id: I9d5d9d19f3ccda665f5504368ce5ddfa5f383faf
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2598584
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Charlie Lao <cclao@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
c07ef602
|
2021-01-05T12:26:05
|
|
Vulkan: Move xfb buffer decl to translator in emulation path
This makes @@ XFB-DECL @@ empty on this path. Ultimately, this is
working towards removing both @@ XFB-DECL @@ and @@ XFB-OUT @@ macros
for both the emulation and extension paths, allowing the shaders to be
compiled at compile time rather than link time.
Bug: angleproject:3606
Change-Id: If16e9d92c419a04ecd3094481ed546d0708cdb43
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2611305
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
|
|
bf6cc88a
|
2021-01-05T22:17:41
|
|
Vulkan: Remove duplicate shaderType parameter to SPIR-V transformer
The passed-in GlslangSpirvOptions already has the shaderType, so this
extra parameter was not necessary.
Bug: angleproject:4524
Change-Id: Ibbc7442b3173b26825f3cb9e2365789fade92cfc
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2611311
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
aff17499
|
2020-12-23T14:40:06
|
|
Vulkan: Directly capture non-gl_Postion builtins
Building on support for transform feedback capture of I/O block members,
this change optimizes capture of builtins other than gl_Position by
directly decorating members of gl_PerVertex. Most importantly, this
allows us to reserve only one varying for transform feedback, instead of
as many builtins there could be (up to 4).
Bug: angleproject:3606
Change-Id: Ie0957802c657ed6c5aac538d92b860582ed6da45
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2601072
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
093250e0
|
2020-12-23T12:07:46
|
|
Vulkan: Make shader variable info maps a class.
Instead of using a map type directly we abstract the info maps into an
encapsulated class. We can enforce a specific API set instead of using
the same API as the map class. This also cleans up a few of the APIs
related to these maps.
This change will allow future changes to the way the variables are
stored in the class without drastically changing the interface.
Bug: angleproject:3572
Bug: angleproject:4524
Change-Id: Ic1a63e1776c39f49b895a1274bae8282d7a6b9b5
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2600080
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
|
|
eeb14308
|
2020-12-23T01:45:35
|
|
Vulkan: Support xfb capture of I/O block fields
In the emulation path, it's ensured that the generated code references
the I/O block field correctly (using the instance name if provided, and
without it otherwise).
In the extension path, the info map is augmented with an array of xfb
decorations for its fields. Then when `OpDecorate %IOBlockId Block` is
encountered, the transform feedback decorations on the fields are
inserted:
OpMemberDecorate %IOBlockId MemberN XfbBuffer buffer
OpMemberDecorate %IOBlockId MemberN XfbStride stride
OpMemberDecorate %IOBlockId MemberN Offset offset
Future work includes removing the duplicate varying added for
gl_PointSize and use this mechanism to decorate gl_PerVertex directly.
Bug: angleproject:3606
Change-Id: I6fed0b1ee7245fe695337043b40b281fb01a1fb0
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2599953
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
85707f7f
|
2020-12-21T14:52:38
|
|
Vulkan: Pass in SPIR-V transform options in a struct
Clean up change in preparation for changes that add more options.
Bug: angleproject:5478
Change-Id: Id35825b337dba153a5c28dfcc311b344ce257f78
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2599941
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
|
|
98b56e60
|
2020-12-12T16:28:21
|
|
Vulkan: Accumulate internal cache stats in renderer
The CacheStats of all internal caches are accumulated
by the renderer.
In order to see the hit ratios of all caches, the
following GN args must be enabled:
is_debug = true
angle_enable_perf_counter_output = true
Bug: angleproject:5447
Test: Manual verification with angle_end2end_tests
Change-Id: Iaca3249192e9e4e130d8291b7759c459d79b06ee
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2588430
Commit-Queue: Mohan Maiya <m.maiya@samsung.com>
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
46eaba7f
|
2020-12-12T10:31:26
|
|
Vulkan: Add support for internal cache hit and miss counts
Add a CacheStats class that provides cache hit and miss bookkeeping.
All internal caches make use of this class to keep track of its stats.
This provides a means to profile cache hit ratios a.k.a Vulkan object
reuse for any application.
Bug: angleproject:5447
Test: Manual verification with angle_end2end_tests
Change-Id: I44eeb0c2b9b291ec1cdd156fb2be4a5fe80d2848
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2580111
Commit-Queue: Mohan Maiya <m.maiya@samsung.com>
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
067a12f0
|
2020-11-19T16:47:25
|
|
Reland "Vulkan: Use specialization constant for halfRenderAreaWidth"
This is a reland of ff38106d62fca2e36ec2db1cd580b546fd53ae43
Original change's description:
> Vulkan: Use specialization constant for halfRenderAreaWidth
>
> halfRenderArea is used by fragment shader to adjust gl_FragCoord for
> rotation and yflip compensation. This CL bakes halfRenderAreaWidth into
> shader via specialization constant, thus allow compiler to consolidate
> the calculation into one MAD instruction.
>
> Bug: b/173800146
> Change-Id: Id66301278e3389e2582369b695825e632bccecee
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2551541
> Commit-Queue: Charlie Lao <cclao@google.com>
> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
> Reviewed-by: Tim Van Patten <timvp@google.com>
> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Bug: b/173800146
Change-Id: Ifc36086f4c5d6a44fb5456aa6e31bc8a783bba71
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2579648
Commit-Queue: Charlie Lao <cclao@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
c859c0ac
|
2020-11-24T17:21:38
|
|
Batch replace std::unordered_map with angle::HashMap in src/
There are a few places that will remain std::unordered_map due to build
or run-time errors, which will need to be evaluated more closely to
determine if they should remain std::unordered_map or if there is
another Abseil data structure that would be more efficient while still
working correctly.
Bug: angleproject:4873
Change-Id: Ib04253e3ad6398e63f4cc2bfe12c0f9e57cb112b
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2558873
Commit-Queue: Tim Van Patten <timvp@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Charlie Lao <cclao@google.com>
|
|
1ad5791d
|
2020-12-03T22:05:51
|
|
Revert "Vulkan: Use specialization constant for halfRenderAreaWidth"
This reverts commit ff38106d62fca2e36ec2db1cd580b546fd53ae43.
Reason for revert: Suspect that this CL may be causing win-angle-rel-32 bot failures
Original change's description:
> Vulkan: Use specialization constant for halfRenderAreaWidth
>
> halfRenderArea is used by fragment shader to adjust gl_FragCoord for
> rotation and yflip compensation. This CL bakes halfRenderAreaWidth into
> shader via specialization constant, thus allow compiler to consolidate
> the calculation into one MAD instruction.
>
> Bug: b/173800146
> Change-Id: Id66301278e3389e2582369b695825e632bccecee
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2551541
> Commit-Queue: Charlie Lao <cclao@google.com>
> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
> Reviewed-by: Tim Van Patten <timvp@google.com>
> Reviewed-by: Jamie Madill <jmadill@chromium.org>
TBR=timvp@google.com,syoussefi@chromium.org,jmadill@chromium.org,cclao@google.com
# Not skipping CQ checks because original CL landed > 1 day ago.
Bug: b/173800146
Change-Id: I7bc9966ebbe949f3999d7927afa629dd2e3a4187
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2572801
Reviewed-by: Ian Elliott <ianelliott@google.com>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Commit-Queue: Ian Elliott <ianelliott@google.com>
|
|
06c39376
|
2020-11-27T12:45:33
|
|
Vulkan: Minimize gl_PerVertex members
As ANGLE doesn't redeclare gl_PerVertex, glslang always defines it with:
gl_Position
gl_PointSize
gl_ClipDistance
gl_CullDistance
The unused members here contribute to varying component limits. The
last two are unlikely to be used, and the second member is rarely used
as well.
This change keeps it simple and strips the trailing inactive members,
which for all intents and purposes accurately minimizes this struct.
Bug: angleproject:5405
Change-Id: I59c22af4988a3da7b1e428913d0ea13be9031cea
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2562754
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
720b85e6
|
2020-12-01T20:45:29
|
|
Reland "Vulkan: Use specialization constant for halfRenderAreaWidth"
This reverts commit b1917fe1a314709cd9f7f53b2923d6be0e8bbf6c.
Reason for revert: Not the root cause. See bug.
Original change's description:
> Revert "Vulkan: Use specialization constant for halfRenderAreaWidth"
>
> This reverts commit ff38106d62fca2e36ec2db1cd580b546fd53ae43.
>
> Reason for revert: Speculative revert to clear up AMD. See bug.
>
> Bug: chromium:1154356
>
> Original change's description:
> > Vulkan: Use specialization constant for halfRenderAreaWidth
> >
> > halfRenderArea is used by fragment shader to adjust gl_FragCoord for
> > rotation and yflip compensation. This CL bakes halfRenderAreaWidth into
> > shader via specialization constant, thus allow compiler to consolidate
> > the calculation into one MAD instruction.
> >
> > Bug: b/173800146
> > Change-Id: Id66301278e3389e2582369b695825e632bccecee
> > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2551541
> > Commit-Queue: Charlie Lao <cclao@google.com>
> > Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
> > Reviewed-by: Tim Van Patten <timvp@google.com>
> > Reviewed-by: Jamie Madill <jmadill@chromium.org>
>
> TBR=timvp@google.com,syoussefi@chromium.org,jmadill@chromium.org,cclao@google.com
>
> Change-Id: Idab612bcad4f179857c41ffc4bf8fa2355fae946
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: b/173800146
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2568244
> Reviewed-by: Jamie Madill <jmadill@chromium.org>
> Commit-Queue: Jamie Madill <jmadill@chromium.org>
TBR=timvp@google.com,syoussefi@chromium.org,jmadill@chromium.org,cclao@google.com
# Not skipping CQ checks because this is a reland.
Bug: chromium:1154356
Bug: b/173800146
Change-Id: I5b86bbee8600c6597620f31d8d7b08ca8b3d2d57
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2568246
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
b1917fe1
|
2020-12-01T20:42:36
|
|
Revert "Vulkan: Use specialization constant for halfRenderAreaWidth"
This reverts commit ff38106d62fca2e36ec2db1cd580b546fd53ae43.
Reason for revert: Speculative revert to clear up AMD. See bug.
Bug: chromium:1154356
Original change's description:
> Vulkan: Use specialization constant for halfRenderAreaWidth
>
> halfRenderArea is used by fragment shader to adjust gl_FragCoord for
> rotation and yflip compensation. This CL bakes halfRenderAreaWidth into
> shader via specialization constant, thus allow compiler to consolidate
> the calculation into one MAD instruction.
>
> Bug: b/173800146
> Change-Id: Id66301278e3389e2582369b695825e632bccecee
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2551541
> Commit-Queue: Charlie Lao <cclao@google.com>
> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
> Reviewed-by: Tim Van Patten <timvp@google.com>
> Reviewed-by: Jamie Madill <jmadill@chromium.org>
TBR=timvp@google.com,syoussefi@chromium.org,jmadill@chromium.org,cclao@google.com
Change-Id: Idab612bcad4f179857c41ffc4bf8fa2355fae946
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: b/173800146
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2568244
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
ff38106d
|
2020-11-19T16:47:25
|
|
Vulkan: Use specialization constant for halfRenderAreaWidth
halfRenderArea is used by fragment shader to adjust gl_FragCoord for
rotation and yflip compensation. This CL bakes halfRenderAreaWidth into
shader via specialization constant, thus allow compiler to consolidate
the calculation into one MAD instruction.
Bug: b/173800146
Change-Id: Id66301278e3389e2582369b695825e632bccecee
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2551541
Commit-Queue: Charlie Lao <cclao@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
aa8b10ae
|
2020-11-19T11:06:50
|
|
Vulkan: Avoid driver call when yflip changed but shader not using it
If shader is not using yflip, don't get into driver to ask for a new
pipeline program just because yflip has changed. Instead try to use
the non-yflipped program.
Bug: b/173461931
Change-Id: If938f5dc0632529c4f5e477fcb0c67bf58a1f3d0
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2549538
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Charlie Lao <cclao@google.com>
|
|
24f64249
|
2020-11-16T17:55:02
|
|
Vulkan: Track specialization constant usage bit and feedback to ctx
Right now context does not know which specialization constant is used by
the shader. Whenever a specialization constant changes, we assume shader
program is using it, we always reach into vulkan driver to ask for a new
program. Instead we can track shader's usage of specialization constant
so that context can utilize this information to avoid recompile pipeline
program if an unused specialization constant has changed.
This CL implements the plumbing the usage bits form compiler to program
object, it does not actually utilize the usage bits to avoid unnecessary
compilation yet.
Bug: b/173461931
Change-Id: Iebc9d0638c17b1a282c8b6093ce6bae154246e57
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2542866
Reviewed-by: Ian Elliott <ianelliott@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Charlie Lao <cclao@google.com>
|
|
b6ec24ab
|
2020-11-14T00:24:52
|
|
Vulkan: Support format reinterpretation in imageBuffers
This is done by creating multiple buffer views over the buffer based on
the format specified by the attached shaders.
Bug: angleproject:3573
Change-Id: I0372a988938050cc092d8a0959a59d1c893fc6f4
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2536909
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
|
|
2ffff6d0
|
2020-11-12T10:56:06
|
|
Vulkan: Support image buffers
This change does not support reinterpreted formats yet. Additionally,
despite lack of support for RGB32 formats, EXT_texture_buffer is exposed
by this extension. Those formats don't support the STORAGE_TEXEL_BUFFER
feature on any known hardware.
Bug: angleproject:3573
Change-Id: I85f45eb23f6a0aa533488bb98d9f226d59af4d76
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2534395
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
86d7e4d8
|
2020-11-10T15:55:34
|
|
Vulkan: Support texture buffers
Texture buffers are placed in the same descriptor set with the rest of
the textures. However, the different code paths that handle textures
have special cases for texture buffers as they create a different
descriptor type (texel buffer instead of combined image sampler). Image
view serials are used to track the buffer view serials as well so the
texture descriptor cache can handle texture buffers as well.
This CL is missing storage texel buffer support.
Bug: angleproject:3573
Change-Id: Iff80ca22ff9b9957a0c9a3c7aaada1fa54b24ec8
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2532653
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
|
|
1ed5a1a7
|
2020-11-16T16:43:02
|
|
Vulkan: Reuse GetBoundBufferAvailableSize in ProgramExecutableVk
This change simplifies the implementation of GetBoundBufferAvailableSize
and replaces GetShaderBufferBindingSize in ProgramExecutableVk.cpp
Bug: angleproject:3573
Change-Id: I811e616989560ed74f88377742ddbb73e14b218c
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2542862
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
b22f8e8e
|
2020-10-29T15:50:39
|
|
Vulkan: Add specialization constants for surface rotation
This plumbing through the specialization constant for surface rotation
from ContextVk to pipeline program creation. It has not been used yet,
so expecting no real functional change. This CL also converts
lineRasterEmulation to use the same specialization constant path as
surface rotation.
Bug: b/171750979
Change-Id: Ic08c4f8bb576424d1752015e874d0977a58d78bb
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2508837
Commit-Queue: Charlie Lao <cclao@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Ian Elliott <ianelliott@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
fa616931
|
2020-09-03T14:58:03
|
|
Mark uniform samplers in an array unused per element
https://bugs.webkit.org/show_bug.cgi?id=215630
Fix an issue with the OpenGL backend where entire arrays of
uniforms would be marked as unused if a single element was
reported as unused by the driver.
Bug: angleproject:5006
Change-Id: I9bbb75a5f113472393e8d9f1fb60a7865aa9529a
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2486540
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: James Darpinian <jdarpinian@chromium.org>
|
|
fcd35965
|
2020-09-29T14:15:51
|
|
Vulkan: Make DescriptorPoolHelper a Resource
Descriptor pools need to live as long as the descriptor sets that are
allocated from them. Using Serials while building a command to judge a
pool's lifetime is prone to errors, since a command's Serial value
isn't known until the command is submitted, leading to deleting pools
too early relative to when the descriptor set is actually used.
This CL updates DescriptorPoolHelper to inherit from Resource, so the
descriptor pools can be retain()'ed. This allows the Resource's counter
to indicate that a pool is in use until the command's Serial is known
and can be recorded to indicate when the command completes. This
prevents descriptor pools from being destroyed before the command
completes (while the descriptor sets are still in use), or even before
the command has been submitted. Destroying a descriptor pool resets all
of the descriptors that were allocated from it, which can trigger a
variety of VVL errors depending on when it's erroneously performed.
This CL also adds the necessary retain() calls for the descriptor pools.
In particular, the pools need to be retained each time a cached
descriptor set that was allocated from it is re-used. This is relatively
simple with the current design, since we always clear the descriptor set
caches whenever a new pool is allocated, so the descriptor pool binding
is always accurate.
Bug: angleproject:5030
Test: VulkanMultithreadingTest::MultiContextDrawSmallDescriptorPools()
Change-Id: Iac9e7efef338f169a6bf8ac3b2140e03dd326641
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2504457
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com>
Commit-Queue: Tim Van Patten <timvp@google.com>
|
|
ee4e0866
|
2020-09-24T11:39:49
|
|
Vulkan: Add descriptor set allocation counters
Add descriptor set allocation counters for the following:
- ContextVk
- Driver uniform allocations for graphics and compute pipelines.
- ProgramExecutableVk
- ANGLE driver uniforms
- Uniforms
- Textures
- Other shader resources
- UtilsVk
- All of the UtilsVk::Function types increment the same counter
Each object's counters live within the object itself and the cumulative
total is output as part of that object's destruction. On Present, all of
the descriptor set counts are collected into a single total which is
used to update the overlay each frame.
In order to see the cumulative total output for each object, the
following GN args must be enabled:
is_debug = true
angle_enable_perf_counter_output = true
To see the descriptor set allocation overlay:
ANGLE_OVERLAY=VulkanDescriptorSetAllocations
Bug: angleproject:5067
Test: Manual verification with angle_perftests
Change-Id: Ie45fda56ade3e68bfba7bf6da9554eb05a02c6b6
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2429487
Commit-Queue: Tim Van Patten <timvp@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Charlie Lao <cclao@google.com>
|
|
bd966253
|
2020-10-22T14:55:49
|
|
Increase MAX_UNIFORM_BUFFER_BINDINGS to 72
This is the minimum Vulkan limit.
Bug: angleproject:5212
Change-Id: I627a1446434c7abc2f53525cb71cb40a4927461c
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2491937
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
98c5ff6b
|
2020-10-25T16:26:55
|
|
BinaryStream: Preserve 64-bit integer data.
Previously the code would truncate 64-bit data to fit in 32-bits.
This ran into a serialization bug when expanding a 64-bit mask.
The new blend state masks for extended range were out of range for
the 32-bit promotion that was happening before.
Also refactors how we capture bools and enums to be more consistent.
size_t is now correctly saved and loaded as 64-bits.
Bug: angleproject:5247
Change-Id: I452a98c1b0add4c0cf45493032e9310e7d8321b2
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2497561
Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
9e3eec54
|
2020-10-25T15:44:09
|
|
Revert "Vulkan: Make DescriptorPoolHelper a Resource"
This reverts commit 5dcd29a6e532e4bd617af8767d488120b57f3b2c.
Reason for revert: Breaking the ANGLE -> Chromium roller:
https://chromium-review.googlesource.com/c/chromium/src/+/2496281
Original change's description:
> Vulkan: Make DescriptorPoolHelper a Resource
>
> Descriptor pools need to live as long as the descriptor sets that are
> allocated from them. Using Serials while building a command to judge a
> pool's lifetime is prone to errors, since a command's Serial value
> isn't known until the command is submitted, leading to deleting pools
> too early relative to when the descriptor set is actually used.
>
> This CL updates DescriptorPoolHelper to inherit from Resource, so the
> descriptor pools can be retain()'ed. This allows the Resource's counter
> to indicate that a pool is in use until the command's Serial is known
> and can be recorded to indicate when the command completes. This
> prevents descriptor pools from being destroyed before the command
> completes (while the descriptor sets are still in use), or even before
> the command has been submitted. Destroying a descriptor pool resets all
> of the descriptors that were allocated from it, which can trigger a
> variety of VVL errors depending on when it's erroneously performed.
>
> This CL also adds the necessary retain() calls for the descriptor pools.
> In particular, the pools need to be retained each time a cached
> descriptor set that was allocated from it is re-used. This is relatively
> simple with the current design, since we always clear the descriptor set
> caches whenever a new pool is allocated, so the descriptor pool binding
> is always accurate.
>
> Bug: angleproject:5030
> Test: MultithreadingTest::MultiContextDrawSmallDescriptorPools()
> Change-Id: I5fdeeb46159448dfd679d7169e423048348be5ab
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2437609
> Commit-Queue: Tim Van Patten <timvp@google.com>
> Reviewed-by: Jamie Madill <jmadill@chromium.org>
> Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com>
TBR=courtneygo@google.com,timvp@google.com,jmadill@chromium.org
# Not skipping CQ checks because original CL landed > 1 day ago.
Bug: angleproject:5030
Change-Id: I0fd6d9a0e1b0989b22368ef98652281288699deb
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2497222
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
33e30205
|
2020-10-17T19:03:45
|
|
Vulkan: sRGB cleanups.
A few fixes to how we check for the sRGB override in the
TextureVk class. In at least one instance there was a potential
edge case where in syncState we might not create the Texture
with the mutable bit the second time through the function.
Bug: angleproject:5176
Change-Id: I4f1ca6e469b10514c3a0de3120be9ade62568084
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2482292
Reviewed-by: Mohan Maiya <m.maiya@samsung.com>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
5dcd29a6
|
2020-09-29T14:15:51
|
|
Vulkan: Make DescriptorPoolHelper a Resource
Descriptor pools need to live as long as the descriptor sets that are
allocated from them. Using Serials while building a command to judge a
pool's lifetime is prone to errors, since a command's Serial value
isn't known until the command is submitted, leading to deleting pools
too early relative to when the descriptor set is actually used.
This CL updates DescriptorPoolHelper to inherit from Resource, so the
descriptor pools can be retain()'ed. This allows the Resource's counter
to indicate that a pool is in use until the command's Serial is known
and can be recorded to indicate when the command completes. This
prevents descriptor pools from being destroyed before the command
completes (while the descriptor sets are still in use), or even before
the command has been submitted. Destroying a descriptor pool resets all
of the descriptors that were allocated from it, which can trigger a
variety of VVL errors depending on when it's erroneously performed.
This CL also adds the necessary retain() calls for the descriptor pools.
In particular, the pools need to be retained each time a cached
descriptor set that was allocated from it is re-used. This is relatively
simple with the current design, since we always clear the descriptor set
caches whenever a new pool is allocated, so the descriptor pool binding
is always accurate.
Bug: angleproject:5030
Test: MultithreadingTest::MultiContextDrawSmallDescriptorPools()
Change-Id: I5fdeeb46159448dfd679d7169e423048348be5ab
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2437609
Commit-Queue: Tim Van Patten <timvp@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com>
|
|
0f2542e1
|
2020-10-21T00:38:40
|
|
Vulkan: Validate SPIR-V transformer at link time
Using an ASSERT, the SPIR-V transformer is run at link time to catch
bugs in tests that link but don't draw.
Bug: angleproject:4249
Change-Id: Icbeeb6e968f9901ba003918b1dd1d2eef0792469
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2488227
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
d7475437
|
2020-10-20T15:04:18
|
|
Vulkan: Support vertex attribute aliasing for matrix types
This change builds on vertex attribute aliasing SPIR-V tranformation for
non-matrix types to add support for matrix attribute types. This is
done by turning every matrix attribute declaration into multiple vector
attribute declarations, and reusing the same mechanism for resolving
aliasing between non-matrix types.
Take the following example:
attribute mat4 a; // location 0
attribute vec3 b; // location 1
attribute mat3 c; // location 1
attribute vec4 d; // location 2
The shader is modified as such:
attribute vec4 a_0; // location 0
attribute vec4 a_1; // location 1
attribute vec4 a_2; // location 2
attribute vec4 a_3; // location 3
attribute vec3 c_0; // location 4
attribute vec4 d; // location 5
attribute vec3 c_2; // location 6
mat4 a;
mat3 c;
and in the beginning of main(), the following code is inserted:
a = mat4(a_0, a_1, a_2, a_3);
c = mat3(c_0, d.xyz, c_2);
The shader continues to use a and c as before.
Bug: angleproject:4249
Change-Id: Idfcb8c6037ca0c1f21de8203d7e2a1b66fed6e7e
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2488128
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Charlie Lao <cclao@google.com>
Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com>
|
|
9091de43
|
2020-10-17T00:33:57
|
|
Vulkan: Support vertex attribute aliasing for non-matrix types
Initial implementation that supports float and vecN types. In this
case, every attribute occupies a single location. When two attributes
alias, they are either the same size, or one is bigger than the other.
Take the following example:
attribute vec3 a; // location 0
attribute vec3 b; // location 0
attribute vec4 c; // location 1
attribute vec2 d; // location 1
The shader may access either a or b (but not both). Similarly, it can
access either c or d (but not both). The shader can be modified such
that:
- f(b) is replaced with f(a).
- g(d) is replaced with g(c.xy).
- b and d are removed
As a result, there are no longer any aliasing attributes. In other
words, when attributes alias, the larger attribute can be retained and
the other attributes can be replaced by selecting the appropriate number
of components from the retained attribute.
Bug: angleproject:4249
Change-Id: I7c5461f777d659c92977e2572091a8ce5e422704
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2482286
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com>
Reviewed-by: Charlie Lao <cclao@google.com>
|
|
e5590288
|
2020-10-18T12:40:14
|
|
Rename "texelFetchInvoked" to "texelFetchStaticUse".
Technically more precise because something could be statically used
and never invoked. Also more consistent with the spec.
Bug: angleproject:5176
Change-Id: I70dd0787d67d9f046b7359abb24107cb430f5cae
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2483465
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Mohan Maiya <m.maiya@samsung.com>
Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com>
|
|
7bbe497a
|
2020-10-16T14:46:45
|
|
Vulkan: Implement EXT_texture_sRGB_decode
Implement EXT_texture_sRGB_decode. This builds on the existing
functionality from EXT_texture_sRGB_override, with 2 major edge
cases:
1. sRGB_decode allows the texture state to be overridden by
sampler state, which is implemented by forcing a a texture state
sync during updateActiveTextures if a texture is bound to the same
unit as a sampler with that state
2. texelFetch calls require us to reenable decoding, regardless
of decode state. We add a new compiler pass
(FlagSamplersWithTexelFetch) to mark samplers that are used with
texelFetch in order to support this.
This change also re-enables EXT_texture_sRGB_R8, which was disabled
due to a dEQP bug that this change will bypass.
Bug: angleproject:3609
Bug: angleproject:4503
Test: dEQP.GLES31/functional_srgb_texture_decode_skip_decode_*
Test: GLES31/functional_state_query_texture_*_srgb_decode_*
Test: GLES31/functional_state_query_sampler_*_srgb_decode_*
Test: GLES31/functional_debug_negative_coverage_*_srgb_decode_*
Test: GLES31/functional_android_extension_pack_extensions_ext_texture_srgb_decode
Test: angle_end2end_tests --gtest_filter=SRGBTextureTest.*Vulkan*
Change-Id: I4a67e487dc82e2f57c8c87d4bcd8ef442b6fe220
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2359481
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
|
|
f51e99fb
|
2020-10-13T11:38:28
|
|
Vulkan: Remove serial from RenderPassHelper
We don't delete RenderPass's so no need to keep a serial.
This simplifies things for coming threading code.
Bug: b/169788986
Change-Id: I2577b17bc1f6af163725389589d7cd62d09eea13
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2468538
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Courtney Goeltzenleuchter <courtneygo@google.com>
|
|
68bd685a
|
2020-10-10T22:58:41
|
|
Reland: "4 Vulkan content defined CLs."
Reland "Vulkan: Avoid content restore by detecting no-op stencil"
This relands commit 243d0f899e443cd931c78aba7489382dff79edbb.
Reland "Vulkan: Restore at the end of RP if write-after-invalidate"
This relands commit e5d52ac3b9a00656acdd912ee8cd62dd14784075.
Reland "Vulkan: Invalidate/restore depth/stencil separately."
This relands commit 61fa0878964a796f6d3b3c13bc3a3849403ecdbd.
Reland "Vulkan: Move content-defined tracking to ImageHelper"
This relands commit 2392e6b34c0ddfbfd7b4c3cb67323ba463e11a57.
Reason for revert: Caused crashes in Fuchsia x64 and on ARM.
Reland fixes content defined for external images.
Original CL message:
Content-defined tracking was done in render targets prior to this
change. This had multiple drawbacks:
- When a framebuffer attachment is changed (including the first time
it's set), it's unknown whether the contents of the attachment is
defined.
- Invalidate takes effect at the end of render pass, at which point the
render target objects may be gone. Attachment ImageHelpers are
however correctly tracked.
This change moves content-defined tracking to the ImageHelper itself,
and tracks it per subresource. ImageHelper::onWrite() now receives the
subresource that is being written, and marks it as having defined
content.
A future optimization can make use of this change to
ImageHelper::onWrite to track "dirty" subresources. This can lead to
the removal of unnecessary barriers when same-kind writes are done on
different subresources of the image. See http://anglebug.com/3347#c15
Bug: b/167275320
Bug: angleproject:4836
Bug: angleproject:5159
Change-Id: If5c1ae7152657fd7c94db7d55bea4fb9ddf835ba
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2464825
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
d6b1c17b
|
2020-10-10T14:29:15
|
|
Revert 4 Vulkan content defined CLs.
Revert "Vulkan: Avoid content restore by detecting no-op stencil"
This reverts commit 243d0f899e443cd931c78aba7489382dff79edbb.
Revert "Vulkan: Restore at the end of RP if write-after-invalidate"
This reverts commit e5d52ac3b9a00656acdd912ee8cd62dd14784075.
Revert "Vulkan: Invalidate/restore depth/stencil separately."
This reverts commit 61fa0878964a796f6d3b3c13bc3a3849403ecdbd.
Revert "Vulkan: Move content-defined tracking to ImageHelper"
This reverts commit 2392e6b34c0ddfbfd7b4c3cb67323ba463e11a57.
Causes crashes in Fuchsia x64 and on ARM.
Original CL message:
Content-defined tracking was done in render targets prior to this
change. This had multiple drawbacks:
- When a framebuffer attachment is changed (including the first time
it's set), it's unknown whether the contents of the attachment is
defined.
- Invalidate takes effect at the end of render pass, at which point the
render target objects may be gone. Attachment ImageHelpers are
however correctly tracked.
This change moves content-defined tracking to the ImageHelper itself,
and tracks it per subresource. ImageHelper::onWrite() now receives the
subresource that is being written, and marks it as having defined
content.
A future optimization can make use of this change to
ImageHelper::onWrite to track "dirty" subresources. This can lead to
the removal of unnecessary barriers when same-kind writes are done on
different subresources of the image. See http://anglebug.com/3347#c15
Bug: b/167275320
Bug: angleproject:4836
Bug: angleproject:5159
Change-Id: I93d9dfe973caa7ce70aefa46b5b7d04a8637efb3
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2464822
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
2392e6b3
|
2020-10-07T23:59:43
|
|
Vulkan: Move content-defined tracking to ImageHelper
Content-defined tracking was done in render targets prior to this
change. This had multiple drawbacks:
- When a framebuffer attachment is changed (including the first time
it's set), it's unknown whether the contents of the attachment is
defined.
- Invalidate takes effect at the end of render pass, at which point the
render target objects may be gone. Attachment ImageHelpers are
however correctly tracked.
This change moves content-defined tracking to the ImageHelper itself,
and tracks it per subresource. ImageHelper::onWrite() now receives the
subresource that is being written, and marks it as having defined
content.
A future optimization can make use of this change to
ImageHelper::onWrite to track "dirty" subresources. This can lead to
the removal of unnecessary barriers when same-kind writes are done on
different subresources of the image. See http://anglebug.com/3347#c15
Bug: b/167275320
Bug: angleproject:4836
Change-Id: Iabd1dace4eae9eb379453a9eb7ec6eafc9db1aef
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2462036
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Ian Elliott <ianelliott@google.com>
|
|
91b819a9
|
2020-09-30T10:02:04
|
|
Vulkan: Always reset during createPipelineLayout()
We need to always call reset() during createPipelineLayout(),
particularly to reset the descriptor pools to handle the new descriptor
set layouts that are generated by new immutable samplers. Otherwise,
DynamicDescriptorPool::init() will detect that a pool is attempting to
be created with a mis-matching descriptor set layout handle.
Bug: angleproject:4307
Test: Manually verify Cut the Rope doesn't crash
Change-Id: I0993bc37170e3ddf45c50abdfefda1d7f782b801
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2441127
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com>
Commit-Queue: Tim Van Patten <timvp@google.com>
|
|
b156a753
|
2020-09-28T16:43:50
|
|
Move LayoutCaches to ShareGroup
Testing with TSN found a race condition with RefCounted objects
(DescriptorSetLayout and PipelineLayout). Rather than add more lock
calls to protect accesses to mRefCount and mObject recommendation was to
put these caches in the ShareGroup (basically part of the context).
Locking at the GL level will ensure that two threads that share the same
context will not access the ShareGroup at the same time.
The ShareGroup also works because these layouts are not destroyed until
the context is destroyed so don't have to worry about other threads
(e.g. command processor thread) accessing them.
Bug: b/168744561
Change-Id: Icc0aa07bf4787a69572d6ec62da2f21d286232c3
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2437509
Commit-Queue: Courtney Goeltzenleuchter <courtneygo@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Charlie Lao <cclao@google.com>
|
|
68a5baeb
|
2020-09-23T22:13:03
|
|
Revert "Vulkan: Implement a SharedResourceUse pool"
This reverts commit de335c16855f11d1f0a6f0b37bee30c8a09a6c1d.
Reason for revert: Might actually regress CPU overhead perf.
Unsure but it's possible the reported perf improvement was due
to variance.
Original change's description:
> Vulkan: Implement a SharedResourceUse pool
>
> When adding a Resource to the ResourceUseList of ContextVk
> we constructed a new SharedResourceUse object for tracking
> and update of the Resource's Serial. We would then delete
> it after releasing the resource. This incurs repeated
> memory operation costs.
>
> Instead we now allocate a pool of SharedResourceUse objects
> and acquire and release from this pool as needed.
>
> VTune profile of the Manhattan 30 offscreen benchmark
> shows the CPU occupancy of bufferRead decrease from an
> average of 0.9% -> 0.6% and imageRead decreases from
> an average of 0.4% -> 0.3%. The bottleneck for both
> these methods is the retain() method that leverages
> the new SharedResourceUse pool.
>
> Bug: angleproject:4950
> Change-Id: Ib4f67c6f101d4b2de118014546e6cc14ad108703
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2396597
> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
> Reviewed-by: Jamie Madill <jmadill@chromium.org>
> Commit-Queue: Mohan Maiya <m.maiya@samsung.com>
TBR=syoussefi@chromium.org,jmadill@chromium.org,m.maiya@samsung.com
# Not skipping CQ checks because original CL landed > 1 day ago.
Bug: angleproject:4950
Change-Id: I40081551c3db67d6e55182fea40119946ed16ac3
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2426479
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
ed899835
|
2020-09-11T21:21:55
|
|
Vulkan: Allocate descriptor pools with layouts
Descriptor set layouts and pools are very tightly coupled, since their
binding types and counts must match to ensure the number of available
descriptor sets within a pool remains accurate. To enforce this, the
descriptor pools will now keep a copy of the VkDescriptorSetLayout that
the pool was created for, which is verified when a descriptor set is
allocated from the pool. If the handles don't match, an ASSERT() will
fire.
Bug: angleproject:5033
Test: CQ
Change-Id: I4faf82c24f31052e57b656c968788bb0c131b619
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2407282
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com>
Reviewed-by: Charlie Lao <cclao@google.com>
Commit-Queue: Tim Van Patten <timvp@google.com>
|
|
57193e8b
|
2020-09-13T23:58:42
|
|
Vulkan: Optimize Attribute Change Perf (5/5)
This patch series optimizes programs that use the pattern:
for (;;) {
glVertexAttribPointer(...)
glDraw(...)
}
Change 5: Re-check fragment opts on necessary changes.
Check on a program binding change and on a sample coverage enabled
chagne. This likely could be optimized further for program binding
changes.
In total the patch series reduces test iteration time by 25%.
Test: DrawCallPerfBenchmark.Run/vulkan_attrib_change
Bug: angleproject:5045
Bug: b/168493024
Change-Id: I5116f228d5eeef6606136a9a0cc81a4545df9d33
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2409177
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Charlie Lao <cclao@google.com>
Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com>
|
|
a9dcf0ea
|
2020-09-21T09:44:18
|
|
Fix early fragment tests optimization condition.
The optimization should check of "alpha to coverage" is enabled, not
just sample coverage.
Bug: angleproject:4508
Bug: angleproject:5045
Bug: b/168493024
Change-Id: I0e52ddd4c92f9a6ea8a0e7cf56db71ce9ff3c5de
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2422078
Reviewed-by: Charlie Lao <cclao@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
de335c16
|
2020-09-14T12:04:20
|
|
Vulkan: Implement a SharedResourceUse pool
When adding a Resource to the ResourceUseList of ContextVk
we constructed a new SharedResourceUse object for tracking
and update of the Resource's Serial. We would then delete
it after releasing the resource. This incurs repeated
memory operation costs.
Instead we now allocate a pool of SharedResourceUse objects
and acquire and release from this pool as needed.
VTune profile of the Manhattan 30 offscreen benchmark
shows the CPU occupancy of bufferRead decrease from an
average of 0.9% -> 0.6% and imageRead decreases from
an average of 0.4% -> 0.3%. The bottleneck for both
these methods is the retain() method that leverages
the new SharedResourceUse pool.
Bug: angleproject:4950
Change-Id: Ib4f67c6f101d4b2de118014546e6cc14ad108703
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2396597
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Mohan Maiya <m.maiya@samsung.com>
|
|
233cc31b
|
2020-09-15T11:05:17
|
|
Vulkan: Use linkedShaderStages in GlslangGetShaderSpirvCode()
The parameter linkedShaderStages is passed to
GlslangGetShaderSpirvCode(), but is unused. This CL uses the parameter,
rather than gl::AllShaderTypes().
This CL also removes the unused parameter variableInfoMap from the call
chain.
Bug: angleproject:3570
Change-Id: Ic60084e87cb2aa2a245e3e963598851331379e89
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2412364
Commit-Queue: Tim Van Patten <timvp@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
f12e4123
|
2020-08-25T12:01:12
|
|
Vulkan: Match descriptor pool sizes to descriptor set layouts
When a descriptor pool is created, a list of descriptor types and counts
are given to vkCreateDescriptorPool(). Later, when allocating a
descriptor set from the pool, we pass along a descriptor set layout to
vkAllocateDescriptorSets() which is used to determine how many of each
type of descriptor (i.e. binding) to allocate from the pool.
In order for our "free descriptor set" counts to be accurate for each
pool, the descriptor pools need to be created with descriptor counts
that match the descriptor set layout binding counts.
This change fixes a bug where the descriptor set layouts were created
with more bindings than the descriptor pool sizes, causing the "free
descriptor set" count to be inaccurate, leading to allocating too many
descriptor sets from a pool.
Bug: angleproject:3570
Test: VulkanDescriptorSetTest
Change-Id: I660bf02d29a1291391fb15f39e6479bf348d0f83
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2391114
Commit-Queue: Tim Van Patten <timvp@google.com>
Reviewed-by: Charlie Lao <cclao@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
377e7487
|
2020-08-27T17:11:35
|
|
Vulkan: Support array of array image type
Implement supporting the array of array of image
type in uniform. Add a new end2end test for it.
Bug: angleproject:3881
Change-Id: Idd757ae1d0ed34d585ae1ca5e0b6577459a0acb7
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2379335
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
ae09e889
|
2020-09-10T17:00:13
|
|
Fix mismatch issue with precision qualifiers.
GLSL allows varyings passed from one stage to another to not match in
precision (e.g. float & half-float). Vulkan doesn't allow that so adjust
those mismatches to use the higher precision.
To fix we keep track of the precision of varyings and in the Vulkan
backend if we see they are different patch up the SPIR-V to make them
match.
Bug: angleproject:3078
Change-Id: I385d31e082da46ccdd4817b6612f5f9d9cbce17c
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2337755
Commit-Queue: Courtney Goeltzenleuchter <courtneygo@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
|
|
97013e85
|
2020-08-27T03:35:42
|
|
Revert "Vulkan: Only count descriptor set resources once"
This reverts commit 3c2454b82c050193b8552000f1a9e208928d07e6.
Reason for revert:
Causes rendering issues in Manhattan 3.1.
Original change's description:
> Vulkan: Only count descriptor set resources once
>
> The descriptor set resource counts for monolithic programs already have
> all of the counts combined for all shader stages, rather than needing to
> loop through and combine them all like program pipeline objects.
>
> Bug: angleproject:3570
> Test: CQ
> Change-Id: Ib8a2fe7af991a8d9d5edcef346352c7bac0703fd
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2375869
> Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com>
> Reviewed-by: Jamie Madill <jmadill@chromium.org>
> Commit-Queue: Tim Van Patten <timvp@google.com>
TBR=courtneygo@google.com,timvp@google.com,jmadill@chromium.org
# Not skipping CQ checks because original CL landed > 1 day ago.
Bug: angleproject:3570
Change-Id: I4150d5adf65ace293cb08876e4a62ae3216096b6
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2378564
Reviewed-by: Tim Van Patten <timvp@google.com>
Commit-Queue: Tim Van Patten <timvp@google.com>
|
|
3c2454b8
|
2020-08-25T12:01:12
|
|
Vulkan: Only count descriptor set resources once
The descriptor set resource counts for monolithic programs already have
all of the counts combined for all shader stages, rather than needing to
loop through and combine them all like program pipeline objects.
Bug: angleproject:3570
Test: CQ
Change-Id: Ib8a2fe7af991a8d9d5edcef346352c7bac0703fd
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2375869
Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Tim Van Patten <timvp@google.com>
|
|
5d3a4ca4
|
2020-08-21T13:09:56
|
|
Vulkan: Fix dirty state in XFB emulation on EndXFB.
This regressed in "Vulkan: Preserve RPs on XFB changes when possible."
The bug manifested as incorrect fire rendering in Manhattan. The fix is
to ensure we dirty the correct buffer state when we call endXFB. Also
adds a regression test.
Bug: b/161744596
Bug: angleproject:4622
Change-Id: If16cc22b149526950f300e74c0cc82c0fefae5bc
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2368016
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Tobin Ehlis <tobine@google.com>
Reviewed-by: Charlie Lao <cclao@google.com>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
85ddcc93
|
2020-08-24T14:22:22
|
|
Vulkan: Convert ProgramExecutableVk::mDescriptorSets to std::array
Currently ProgramExecutableVk::mDescriptorSets is a vector, but it's
size is bound so it can be a std::array (DescriptorSetLayoutArray).
To ensure the size grows correctly in the future, the various descriptor
set indexes are also being converted from independent constexpr
uint32_ts into the enum DescriptorSetIndex.
Bug: angleproject:4898
Test: CQ
Change-Id: I7ae8ff3455bcfb61e24b73bd16cc3f8cf9873087
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2372664
Reviewed-by: Charlie Lao <cclao@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Tim Van Patten <timvp@google.com>
|
|
d201ed8b
|
2020-08-02T16:29:35
|
|
Vulkan: Track used Images in RenderPass.
Adding a simple ImageSerial tracking map in our RenderPass allows us
to know when we do or do not need to close the RenderPass on a new
Image access. This simple tracking scheme improves Manhattan
performance by up to 25% on Android. The improved perf comes from
reducing our RenderPass count (23->18 RenderPasses in our capture
scene).
Adds a FastUnorderedSet class to manage the used RP Image serials.
Updates the Query helpers to explicitly flush the RP before inserting
queries.
Bug: angleproject:4911
Change-Id: I0c34fc8e307514ebdf3e81e08d8e5aedb70ebe8f
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2334346
Reviewed-by: Charlie Lao <cclao@google.com>
Reviewed-by: Tim Van Patten <timvp@google.com>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
f9dd2c15
|
2020-08-02T18:03:16
|
|
Vulkan: Accumulate Buffer barriers.
Uses an unordered_map in the CommandBufferHelper to track buffer
reads and writes. Buffer barriers are tracked specially in the
CommandBufferHelper class as a barrier we execute immediately when
we execute the commands into the primary. So when we run into an
incompatible buffer access we must start a new command buffer.
The rules for an incompatible access are:
- when we are reading a buffer, any prior write in the same command
buffer is incompatible.
- when we are writing a buffer, any prior read or write in the same
command buffer is incopatible.
Also adds a regression test using a new performance counter.
Bug: angleproject:4429
Change-Id: I393a4ed87314f955eb998940b877ba76ea15a7b8
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2334091
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Charlie Lao <cclao@google.com>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
b9b5fa55
|
2020-08-02T00:17:20
|
|
Vulkan: Redo Sampler Serials.
Instead of refreshing sampler serials every time the SamplerVk or
TextureVk has a state change we can give a VkSampler a unique serial.
The serial is unique to this VkSampler and repeated state changes
will fetch the same Serial from the SamplerCache. This allows for
more cache hits.
We store the the new Serial together with the VkSampler in a
SamplerHelper class and store references to a SamplerHelper in
SamplerVk and TextureVk instead of the VkSampler directly.
In a follow-up change we will improve image view caching by also
improving how we store serials for ImageViews.
Bug: angleproject:4911
Change-Id: I9168c2700e383bca796cca925b38cfd30132d982
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2333988
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
22e6fc03
|
2020-07-31T15:58:28
|
|
Vulkan: Move Resource Serial gen into Renderer.
Putting Serial allocation in the Renderer allows the Helper
classes to manage allocating its own Serial. The init functions for
ImageViewHelper only have access to a vk::Context/RendererVk, not a
ContextVk. This will be updated in a future CL.
Re-uses the Serial Type X-Macro to do more code generation.
Serial allocation now uses an atomic because of its now Renderer
shared location.
Bug: angleproject:4911
Change-Id: I2d5d3d0bbf613d5468de795a700f66164291bc79
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2332884
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Charlie Lao <cclao@google.com>
|
|
89ade79a
|
2020-07-31T16:04:09
|
|
Vulkan: Clean up ScopedDescriptorSetUpdates.
Matches style guide requirement for types before members. Also
moves the implementation of the class entirely into the cpp file.
Moves the method implementation in ContextVk so we can more easily
alter member variables.
Unrelated cleanup done while working on consolidating RenderPasses.
Bug: angleproject:4911
Change-Id: Ibe4273fc609b494840f1e86584bcee5bc31397d5
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2331950
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Charlie Lao <cclao@google.com>
|
|
8765b46a
|
2020-07-15T17:10:35
|
|
Vulkan: Make mDefaultUniformStorage per ContextVk
Right now the dynamic buffer for default uniform is per program. Most of
time the buffer is unused. That is a huge waste of memory (and these
memory are wired memory). This CL moves the mDefaultUniformStorage from
per ProgramVk to ContextVk so that we all share with each other.
Bug: b/161391337
Change-Id: I1fe8523b2b2dbc39bec3509a3432e38e34bd5713
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2274870
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com>
Commit-Queue: Charlie Lao <cclao@google.com>
|
|
234be194
|
2020-07-15T14:55:18
|
|
Vulkan: Move mEmptyBuffer from program to ContextVk
And merge that with TheNUllBuffer as well so that you only have one
dummy buffer per context.
Bug: b/161391337
Change-Id: I75fddb5c48393876e745ff237e11d9c5672ae10e
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2300707
Commit-Queue: Charlie Lao <cclao@google.com>
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
cc551385
|
2020-06-29T10:25:45
|
|
Vulkan: Add cache for default uniform descriptor set
Instead of free and allocate a descriptor set whenever buffer changes,
add it into the descriptorset cache. Every time you get the buffer, we
also look in the cache first to see if there is a descriptorset for that
buffer or not. If yes, we use the cached descriptor set instead of
allocate one.
Bug: b/159457348
Change-Id: I64c252dfe22db66ea8188415e1b384af371b82ab
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2273698
Commit-Queue: Charlie Lao <cclao@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com>
Reviewed-by: Tim Van Patten <timvp@google.com>
|