|
f10bf6bf
|
2019-09-26T10:27:18
|
|
Vulkan: Implement multi-threaded GL.
The main component of this change is to make vk::BufferHelper,
vk::ImageHelper and vk::SyncHelper use a common path. We introduce a
new "vk::SharedGarbage" helper class that stores small lists of garbage
from individual objects like an ImageHelper or BufferHelper. The
SharedGarbage is stored in the RendererVk with the ResourceUse of the
helper object. The ResourceUse tells RendererVk when it is safe to
destroy the GarbageObjects.
New "onGraphAccess" commands are added in a few places to enable the
common garbage collection path. A couple Context-only resources like
default attributes now are referenced where they were not before.
Also reorganizes some functions so we can add a few helpful ASSERTs
to our graph dependencies. Added "updateCurrentAccessNodes" for this.
Also adds a "RendererScoped" helper to replace many uses of
"ContextScoped".
The multithreading EGL tests mostly pass but have some remaining
flakiness so cannot yet be enabled.
Bug: angleproject:2464
Change-Id: Ia3e3ae8848d731abf3f21ebe04c33e381e130be0
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1808444
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
|
|
912e52d8
|
2019-08-23T00:25:09
|
|
Vulkan: Storage image support
Image bindings are placed after atomic counters in the "resources"
descriptor set.
There are two issues yet to be addressed:
- GL can create a 2D (array) view of a 3D image, but this is not allowed
in Vulkan. If this cannot be made possible, emulation needs to be
done.
https://github.com/KhronosGroup/Vulkan-Docs/issues/1033
- GL can create an image view of a texture with a different format and
have the data reinterpreted. This is not currently done.
Bug: angleproject:3563
Change-Id: I95c4d92c50bb033212a9a67f3f2d6f97c074c7bf
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1767366
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
4346c8b1
|
2019-04-09T14:50:23
|
|
Vulkan: pipeline cache not populated as blob cache is not set
1. Use vkMergePipelineCaches to recreate pipeline cache after
blob cache callbacks are set after eglInititalize.
2. Use a more proper way to save the cache data to disk.
Bug: angleproject:3318
Change-Id: Ied1fb572813198b51e02ed9629cbf34e2d9159b2
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1683807
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
c13ca2af
|
2019-07-17T15:46:29
|
|
Vulkan: Allow more than one atomic counter buffer binding
dEQP assumes there are more than one atomic counter buffers available.
This is technically not a requirement by the standard, but nevertheless
could be what applications expect as well.
This change adds support for multiple atomic counter buffer bindings.
This is done by declaring an array of storage buffers for the atomic
counter buffers (instead of declaring only one) and passing the
(binding, offset) pair around to functions instead of just the offset.
The atomic counter is found by indexing `binding` into the storage
buffer array first before indexing `offset` into its `uint[]`.
ProgramVk's default uniform collection is also fixed not to include
atomic counter uniforms.
A remaining issue is that atomic counter buffer offsets don't have
alignment requirements in GLES, but Vulkan does for storage buffers.
Similar to emulated transform feedback buffer offsets, these should be
sent to the shader through uniform values. This will be done in a
follow up change.
Bug: angleproject:3566
Change-Id: I5600225c24c38f1a8ecf5c64388073055733197d
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1707931
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
b82d8633
|
2019-07-15T11:23:08
|
|
Vulkan: Atomic counter buffer support
Vulkan doesn't treat atomic counters especially, and they are emulated
with atomic access to storage buffers.
A single atomic counter buffer binding per pipeline is supported. All
the atomic counters identify an offset within this buffer. The shader
is modified to include a storage buffer definition with
`uint counters[];` as the only field.
A compiler pass replaces atomic counter definitions with variables that
hold the corresponding offset parameter, as well as changing atomic_uint
types to just uint (as the offset). Where an atomic counter variable is
used, it is replaced with the offset variable (plus the array index, if
array). At the same time, built-in `atomicCounter*` functions are
replaced with a corresponding `atomic*` function and
`memoryBarrierAtomicCounter` is replaced with `memoryBarrierBuffer`.
Bug: angleproject:3566
Change-Id: Iefb3d47de6a5cb3072bfa0cb94a46ac6a886d369
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1704635
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
|
|
87dc17b5
|
2019-07-22T11:41:27
|
|
Vulkan: Generalize buffers desc set name to include images
And atomic counter buffers which are emulated with storage buffers.
Bug: angleproject:3566
Change-Id: I102763900c779c3a84661491bad53aec384461f7
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1713086
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
9ec3f51d
|
2019-07-19T13:06:16
|
|
Reland "Vulkan: Implement OES_get_program_binary extension"
Reason for revert: default uniform initialization was incomplete
This change has the following fixes:
1. Add missing default uniform initialization when loading
program binaries.
2. Re-enable OES Program Binary capabilities for Vulkan.
3. Added two angle end2end test,
- ProgramBinaryES3Test.BinaryWithLargeUniformCount
uses several uniforms across the vertex and fragment
shaders.
- ProgramBinaryES3Test.ActiveUniformShader tests
the difference between uniform static and active use
Bug: angleproject:3216
Bug: angleproject:3217
Bug: angleproject:3665
Tests: dEQP-GLES3.functional.shader_api.program_binary*
angle_end2end_tests --gtest_filter=ProgramBinary*
Change-Id: If6886f01241d65bb1e17a21cc3406533021072ee
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1699069
Commit-Queue: Mohan Maiya <m.maiya@samsung.com>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
f92fc916
|
2019-07-15T22:39:23
|
|
Vulkan: Compute shader support
A DispatchHelper class is created as the equivalent of FramebufferHelper
as a command graph resource. There's currently a single dispatcher and
all dispatch calls are recorded on that. Context dirty bits are set up
in such a way that graphics and compute workloads are independently
handled, so that issuing a dispatch call wouldn't cause a framebuffer's
render pass to rebind resources.
Bug: angleproject:3562
Change-Id: Ib96db48297074d99b04324e44b067cfbfd43e333
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1688504
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
a9ec8749
|
2019-07-11T11:31:47
|
|
Vulkan: override format for mismatched attribs
Prevents Vulkan validation error by replacing the input format for any
mismatched vertex attributes with a format compatible to what the shader
expects.
Bug: angleproject:3436
Change-Id: Ia52f29c084d82bbc4e9149102cd4b5fc25ccb9b3
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1698567
Commit-Queue: Courtney Goeltzenleuchter <courtneygo@google.com>
Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
29fba5e0
|
2019-07-04T17:08:41
|
|
Vulkan: Prepare for variable-stage pipelines
Compute (single-stage pipeline) is upcoming, but this change prepares
GlslangWrapper to handle any number of stages (mostly). Additionally,
this change binds each resource to each stage based on whether it's
active, so that we don't hit the per-stage limit of resources by binding
every resource to every stage.
Bug: angleproject:3633
Bug: angleproject:3562
Change-Id: Ifebf691482846e0371c6e314f514226a4cfee258
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1689330
Reviewed-by: Tim Van Patten <timvp@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
1cde0eab
|
2019-07-03T10:58:32
|
|
Vulkan: Add storage buffer support
The storage buffers are placed in the same descriptor set as uniform
buffers. Some refactoring is done to reuse code that handles UBOs to
handle SSBOs as well. A good number of tests still fail as they test
SSBOs in conjunction with compute shaders.
Bug: angleproject:3561
Change-Id: Ia33c1f68e6f6402c746f5919ede87b2c308cf81c
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1687126
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
|
|
a8da8668
|
2019-07-02T12:21:26
|
|
Vulkan: Implement OES_get_program_binary extension
- Serialize and deserialize completed shader source of
program for saving out for glGetProgramBinary().
- Cleaned up some unnecessary includes in cpp files.
- Some refactoring within ProgramVk::ShaderInfo to minimize code
duplication.
- Added ProgramVk::ShaderInfo::saveShaderSource and
ProgramVk::ShaderInfo::loadShaderSource.
- Updated vk_caps_utils.cpp to enable getProgramBinary and add the
GL_PROGRAM_BINARY_ANGLE program binary format. This follows the pattern
for other backends.
Bug: angleproject:3216
Tests: dEQP-GLES3.functional.shader_api.program_binary*
angle_end2end_tests --gtest_filter=ProgramBinaryTest*
Change-Id: I927a27aaf9aa3d7fac550819ee80d2676ec1d1be
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1683099
Commit-Queue: Mohan Maiya <m.maiya@samsung.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
0bfa5504
|
2019-06-03T10:40:10
|
|
Vulkan: Emulate Transform Feedback with vertex shader output
In ES 3.0 and 3.1, only non-indexed GL_POINTS, GL_LINES and GL_TRIANGLES
is supported for transform feedback. Without tessellation and geometry
shaders, we can calculate the exact location where each vertex transform
output should be written on the CPU, and have each vertex shader
invocation write its data separately to the appropriate location in the
buffer.
This depends on the vertexPipelineStoresAndAtomics Vulkan feature.
Bug: angleproject:3205
Change-Id: I68ccbb80aece597cf20c557a0aee842360fea593
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1645678
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
88596bea
|
2019-06-13T14:17:48
|
|
Vulkan: Implement a texture descriptor cache.
We noticed a significant hotspot in vkAllocateDesctiptorSets. The app
was repeatedly cycling through a few combinations of active textures.
For each state change in ANGLE we were allocating a new desctiptor set.
This in turn would trigger internal driver memory allocation and cause
jank. Using a cache avoids allocations entirely since the application
is rotating through a stable set of textures.
The descriptor cache is stored in each program. It is indexed by a set
of 32-bit serials. Each texture generates a unique serial for every
combination of VkImage and VkSampler that the texture owns. The texture
descriptor is refreshed every time a texture changes or is rebound.
The descriptor cache is accessed via an unoredered map with the texture
serial sets as the hash key. We also store the maximum active texture
index in the cache key so we don't need to hash and memcmp on all 64
active textures.
This will currently fail if more than MAX_UINT serials are generated.
But that number is high enough that it shouldn't be possible to hit
in practice in a practical amount of time.
Requires shifting the texture sync to ContextVk so we can get the new
serial after the textures are updated. And to make sure to update the
image layouts even if the descriptors are not dirty.
Improves performance of the T-Rex demo. Also improves the score of the
texture state change microbenchmark by about 40%.
Bug: angleproject:3117
Change-Id: Ieb9bec1e8c1a7619814afab767a1980b959a8241
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1642226
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
266a9e8d
|
2019-06-05T15:15:10
|
|
Vulkan: Move descriptor pools into ProgramVk.
Previously ContextVk owned the descriptor pools. We were trying to
maximize descriptor reuse to conserve memory. However the default
uniforms would have no possible sharing. And because uniform buffers
are usually unique to a program it's likely there would be less reuse.
Image descriptors could be shared. But with the advent of a descriptor
cache in the Program it becomes difficult to manage the cache through
descriptor pool recycling. Moving the pools into the Program simplifies
the cache management. We could look at adding back more reuse in the
future.
Also shifts driver uniforms back into the end of the descriptor sets
to make indexing into the Program's descriptor pools simpler.
Bug: angleproject:3117
Change-Id: I52bb49cf322d944ad7cf08791efdf24b7fe573ce
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1644775
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
ee244c77
|
2019-05-06T10:30:18
|
|
Vulkan: Move command graph and garbage to ContextVk.
To support multithreading, contexts should manage their own command graphs
and garbage. This allows safe access to vulkan resources such as command pools
without thread synchronization.
BUG=angleproject:2464
Change-Id: I930149bc9f0793028761ee05ab50b8c0a4dec98a
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1516515
Commit-Queue: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
776694cd
|
2019-05-08T10:28:55
|
|
Change all ANGLE workarounds to use struct definition with info.
Change each workaround from a simple bool to a struct with info
including name, workaround set, description, and bug IDs. This will help
with future workaround integration with Chrome.
Bug: angleproject:1621
Change-Id: Ia27c180abaf845e280060c803e5994cc3152a057
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1593917
Commit-Queue: Jonah Ryan-Davis <jonahr@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
216f73d0
|
2019-04-12T13:32:30
|
|
Vulkan: add uniform buffer object support
Support for layout qualifiers in interface blocks are added. All
interface blocks are adjusted to either be in std140 or std430.
In the Vulkan backend, a new descriptor set is added for UBOs. A dirty
bit is added for UBO updating and pipeline layouts and descriptor
bindings are updated.
Bug: angleproject:3199, angleproject:3220
Change-Id: I271fc34ac2e1e8b76dee75e54a7cff0fe15fe4ee
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1565061
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
2660b503
|
2019-03-21T12:08:40
|
|
Vulkan: Restore CommandBuffer to namespace vk
Moved vk::CommandBuffer and vk::SecondaryCommandBuffer to vk::priv:: and
aliased vk::CommandBuffer to one or the other. This allows the rest of
the classes to continue seeing vk::CommandBuffer as they used to do.
Used a special alias for the primary command buffer that gets submitted
(vk::PrimaryCommandBuffer).
Bug: angleproject:3136
Change-Id: I61236fd182230991db7395d05e3da3be5e3f45be
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1534456
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
134425c7
|
2019-03-15T17:02:17
|
|
Vulkan:Integrate SecondaryCommandBuffers
Integrate the custom SecondaryCommandBuffer type into the CommandGraph
nodes by adding new ANGLE_USE_CUSTOM_VULKAN_CMD_BUFFERS define that can
be set in the BUILD gn args with angle_enable_custom_vulkan_cmd_buffers
set to "true."
Initially the custom cmd buffers are disabled by default.
This adds some support functions to SecondaryCommandBuffer to make the
integration easier by matching the wrapped cmd buffer interface:
initialize(), end(), valid().
Bug: angleproject:3136
Change-Id: Ib910554583192550757bb8ce89914e3ea8737988
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1526556
Commit-Queue: Tobin Ehlis <tobine@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
e332e621
|
2019-02-14T12:53:04
|
|
D3D: Asynchronously load program binaries.
Unpack as much of the binary steam as possible before passing the final loading
of the shader programs off to a worker thread. Reporting as many possible link
errors before becoming asynchronous means that linking should only fail due to
unexpected system issues at that point.
This also allows other backends to asynchronously load program binaries.
BUG=angleproject:2857
Change-Id: I587917a3e54522114dabd41d1b14fc491c8fd18a
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1473451
Commit-Queue: Jamie Madill <jmadill@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
d838178d
|
2019-03-04T11:07:47
|
|
Vulkan: Rename vk::Shared* to vk::RefCounted*
To be specific regarding what being "shared" entails. Also, avoids
confusion w.r.t to an upcoming vk::Shared class.
Bug: angleproject:2464
Change-Id: Ib9c112bbb822ae30dab39c75a8cde25dd79b2258
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1499693
Reviewed-by: Jamie Madill <jmadill@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
3f0c4a56
|
2019-01-10T10:20:35
|
|
Vulkan: Faster state transitions.
Implements a transition table from Pipeline Cache entry to
state change neighbouring Pipeline Cache entries. We use
a 64-bit mask to do a quick scan over the pipeline desc.
This ends up being a lot faster than doing a full hash
and memcmp over the pipeline description.
Note that there could be future optimizations to this design.
We might keep a hash map of the pipeline transitions instead
of a list. Or use a sorted list. This could speed up the search
when there are many transitions for cache entries. Also we could
skip the transition table and opt to do a full hash when there
are more than a configurable number of dirty states. This might
be a bit faster in some cases. Likely this will be something we
can add performance tests for in the future.
Documentation is also added in a README file for the Vulkan back
end. This will be extended over time.
Improves performance about 30-35% on the VBO state change test.
Bug: angleproject:3013
Change-Id: I793f9e3efd8887acf00ad60e4ac2502a54c95dee
Reviewed-on: https://chromium-review.googlesource.com/c/1369287
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
|
|
dbc605ce
|
2019-01-04T16:39:14
|
|
Vulkan: Optimize VBO state changes.
Also has some minor optimizations for the front-end.
12% improvement on the Vulkan VBO change test.
Bug: angleproject:3014
Change-Id: I38e1a8194edfc14bfe57424be348cb9688e928f4
Reviewed-on: https://chromium-review.googlesource.com/c/1369286
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
f83a28a6
|
2018-12-09T03:48:34
|
|
Vulkan: Shader path for framebuffer-to-texture copy
Part 1 in a series of changes to perform image copies on the GPU.
Bug: angleproject:2958
Change-Id: I6264a880865c4738c0866f2dc71af63425fc4118
Reviewed-on: https://chromium-review.googlesource.com/c/1370724
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
254b32cb
|
2018-11-26T11:58:03
|
|
Vulkan: Make DynamicBuffer use BufferHelper
This is so that the resulting buffers can be written to by the GPU.
Additionally, the class is given the ability to create host-visible or
device-local buffers, making map()-on-init() optional.
This is in preparation for vertex/index transformations in compute.
Bug: angleproject:2958
Change-Id: Ib8f5829e33a1e49fa8f80c70dbde74f313ae49ec
Reviewed-on: https://chromium-review.googlesource.com/c/1351113
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
|
|
df066e9c
|
2018-11-13T15:39:47
|
|
Vulkan: Remove vk::ShaderType
Use gl::ShaderType instead. For now, only GLES2 shaders are supported
in ProgramVk.
Bug: angleproject:2522
Change-Id: I17bc9afddb6d39cf45fb4dd37f34c7263a3ed515
Reviewed-on: https://chromium-review.googlesource.com/c/1333970
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
dc65c5bd
|
2018-11-21T11:07:26
|
|
Vulkan: Cache pipelines with Shader Programs.
This allows for a few nice things. First and foremost it reduces the
size of the PipelineDesc, which is now 232 bytes. It also allows us
to completely forego pipeline caches for compute shaders.
We also allow sharing vertex and fragment shaders among multiple
programs for internal shaders. This is good for memory savings. To
allow this we keep the shaders as ref counted objects.
Bug: angleproject:2522
Change-Id: I2322be5061979d9669a0b25c152359561eeb80ee
Reviewed-on: https://chromium-review.googlesource.com/c/1344449
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
|
|
77abad8d
|
2018-10-25T17:03:48
|
|
Remove Context::gatherParams.
This won't be used in the future. It saves a few instructions on each
entry point.
Also refactors a bit of touched code. Also adds in a missed entry
point: "glTexStorage2DMultisampleANGLE".
Removes related code and moves remaining helper code in params.h into a
new file entry_point_utils.h.
In total this patch series reduces overhead by up to 5%.
Bug: angleproject:2933
Change-Id: Ifb49564597cde6ba82dfc3e185227619fdc62612
Reviewed-on: https://chromium-review.googlesource.com/c/1299478
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
bfe31c42
|
2018-10-25T17:03:47
|
|
Remove uses of DrawCallParams.
Packing and referencing this structure was causing unnecessary draw
call overhead. This improves performance on all the back-ends. Impacts
the GL back-end the most.
In total this patch series reduces overhead by up to 5%.
Bug: angleproject:2933
Change-Id: Ief416ab874e481baf960d02965978a311214a146
Reviewed-on: https://chromium-review.googlesource.com/c/1299477
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
|
|
f4a789f9
|
2018-10-18T16:56:20
|
|
Use angle::Result in front-end (Part 6)
Refactors the gl::Program, gl::Compiler and gl::Query classes.
Bug: angleproject:2491
Change-Id: I96acecdc6af301a89201bd7f5222a180433e5eb2
Reviewed-on: https://chromium-review.googlesource.com/c/1289711
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
78bcd2be
|
2018-10-16T15:05:20
|
|
Vulkan: Fix deleting in-use descriptor sets.
Sequences of many frames with uniform updates could lead to a bug where
we attempt to delete descriptor sets that are still in use. To trigger
the bug we need to write enough uniform data to trigger a descriptor
set to be freed. This would correctly trigger refresh sets in the
Program. But if there was a second program idle in the background that
also allocated descriptors from the old pool, the bug would manifest.
Fix this by storing a shared handle to the descriptor pool in the
Program. The dynamic descriptor pool won't recycle descriptor pools
internally unless there are zero outstanding references to the pool.
We could also improve this in a resource sharing situation by keeping
a single shared dynamic descriptor pool per share group.
Includes a contribution from tobine@google.com that adds a test to
cover the bug.
Bug: angleproject:2863
Change-Id: Id585b85f33f8cfa3772ceff3af512d1e4fb0b75a
Reviewed-on: https://chromium-review.googlesource.com/c/1271919
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
785e8a0b
|
2018-10-04T17:42:00
|
|
Remove gl::LinkResult.
Instead of returning a small struct from LinkProgram calls we use
angle::Result. Linking can have 3 cases:
- the link was successful -> angle::Result::Continue
- the link failed -> angle::Result::Incomplete
- there was an internal error -> angle::Result::Stop
Note that any unexpected Incomplete is still an error. Each function
that accepts Incomplete must check explicitly.
This is the last user of ErrorOrResult.
Bug: angleproject:2491
Change-Id: Idba23be27efe4b561720a4bdd8fe486b40779497
Reviewed-on: https://chromium-review.googlesource.com/c/1255645
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Yuly Novikov <ynovikov@google.com>
|
|
b36a4816
|
2018-09-25T10:15:11
|
|
Vulkan: Add OpenGL line segment rasterization.
Line rasterization rules are implemented using a shader patch. The
patch does a small test and discards pixels that are outside of the
OpenGL line region.
The feature is disabled on Android until we can determine the root
cause of the test failures.
Bug: angleproject:2598
Change-Id: Ic76c5e40fa3ceff7643e735e66f5a9050240c80b
Reviewed-on: https://chromium-review.googlesource.com/1120153
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
2b858c2f
|
2018-09-03T13:58:14
|
|
Vulkan: More micro-optimizations to setupDraw.
Still a hotspot but much improved.
Bug: angleproject:2786
Change-Id: Ie68ff314e6c952f281b48f6d9af37b5dcd194d6a
Reviewed-on: https://chromium-review.googlesource.com/1194882
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Frank Henigman <fjhenigman@chromium.org>
|
|
88fc6da3
|
2018-08-30T16:18:36
|
|
Vulkan: Mega-refactor to VertexArrayVk.
This moves a lot of the code in VertexArrayVk into ContextVk. Having
the code in a centralized place makes the code a bit more organized
since the Context is reponsible for binding state to the command
buffers. It also makes it easier to use dirty bits to track the command
buffer state.
Bug: angleproject:2786
Change-Id: I5cefbb14028e8f3fe651f26e997ca88f8f1c7628
Reviewed-on: https://chromium-review.googlesource.com/1188953
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
|
|
70aeda49
|
2018-08-20T12:17:40
|
|
Add gl::Program::syncState and dirty bits.
Currently this handles uniform block bindings. Cleans up some logic in D3D.
Bug: angleproject:2747
Change-Id: I8c2989738d50a77d6f6d90a9ff11dceab6d3129c
Reviewed-on: https://chromium-review.googlesource.com/1172085
Reviewed-by: Frank Henigman <fjhenigman@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
7ae70d8f
|
2018-07-06T13:47:01
|
|
ParallelCompile: Parallelize D3D linking
This adds a new linking state to Program. If a Program is in linking
state, on the one hand the foreground thread may continue issuing more
GL calls, and on the other hand the background linking threads may be
accessing Program internally too. Without a proper constraint there
must be conflicts between them. For this purpose, we block any further
GL calls to Program until it's actually linked. In addition, we
prohibit parallel linking an active program, so that ProgramD3D does
not have to worry about such similar conflicts.
Also changes the WorkerThread to support limiting the number of
concurrently running worker threads.
BUG=chromium:849576
Change-Id: I52618647539323f8bf27201320bdf7301c4982e6
Reviewed-on: https://chromium-review.googlesource.com/1127495
Commit-Queue: Jie A Chen <jie.a.chen@intel.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
242c4fe8
|
2018-07-12T15:56:56
|
|
Vulkan: Store ProgramVk shaders in ShaderInfo.
This encapsulates most of the logic for a Program into a helper class.
Now we can store multiple instances of the Program's back-end to
implement different shader behaviour at draw time.
This will be useful for shader patching for OpenGL line segment raster.
Bug: angleproject:2598
Change-Id: I800a737088574e28f3a4ec23b91c0cb2647e4e12
Reviewed-on: https://chromium-review.googlesource.com/1127302
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
84c662b9
|
2018-07-12T15:56:55
|
|
Vulkan: Store program textures cache.
The program textures update needs to call into the incomplete textures
cache. Moving this step into an update mechanism allows us to avoid
some complexity of calling the incomplete textures cache inside the
ProgramVk class.
This enables further refactors for draw call shader patching and line
segment raster.
Bug: angleproject:2598
Change-Id: I0fd81ca58d2641572a2dd444992ccddd99ebc823
Reviewed-on: https://chromium-review.googlesource.com/1127301
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
|
|
06ca634e
|
2018-07-12T15:56:53
|
|
Vulkan: Refactor for draw call shader patching.
This refactors a few methods to enable draw call shader patching. The
shader serials in the Pipeline description are inserted right before
we query the pipeline cache. This is done during a draw call. Also
renames the 'QueueSerial' member of the ObjectAndSerial class to just
'Serial' to more accurately reflect it usage in ShaderAndSerial.
Also changes the GlslangWrapper class to have all static methods. If we
need to store state we can revert these changes at some point.
Also splits the GlslangWrapper link call into two static calls. One
call is called to get the linked source code. The second call compiles
the linked sources into shader code. Only the second call will be
necessary for draw call shader patching to implement OpenGL line
rasterization in Vulkan.
Bug: angleproject:2598
Change-Id: I7bad3c3eeab1fb062c15a840836db4a28f841a26
Reviewed-on: https://chromium-review.googlesource.com/1127158
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
|
|
21061026
|
2018-07-12T23:56:30
|
|
Vulkan: Use angle::Result error handling.
Introduces a vk::Context class to contain an error handler and Renderer
pointer. This abtracts the common code path for ContextVk + DisplayVk.
Removes vk::Error in favor of the POD angle::Result class. There are a
few remaining usages of gl::Error that will have to be cleaned up when
we can change the front-end APIs.
Bug: angleproject:2713
Change-Id: I5e68f223d595c6c561b59d6a85759e5738ed43c6
Reviewed-on: https://chromium-review.googlesource.com/1128924
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Frank Henigman <fjhenigman@chromium.org>
|
|
9b168d02
|
2018-06-13T13:25:32
|
|
Vulkan: Store Pipeline/DS Layouts in ProgramVk.
We can keep a shared reference to the Pipeline and Descriptor Set
layouts in the Program. This ensures they are not in use when they are
deleted. Note that they are allowed to be deleted as long as no command
buffers are currently recording with them. If the Program is deleted
then there should be no further commands using these layouts.
Bug: angleproject:2462
Change-Id: I75161b3ce1ee8eae33dd6becee79b4262b844cdd
Reviewed-on: https://chromium-review.googlesource.com/1089807
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Frank Henigman <fjhenigman@chromium.org>
|
|
48cdc2e8
|
2018-05-31T09:58:34
|
|
Vulkan: Implement setUniform for matrices correctly
This fixes all these tests:
dEQP-GLES2.functional.shaders.functions.datatypes.float_mat*
dEQP-GLES2.functional.shaders.functions.datatypes.mat*
dEQP-GLES2.functional.shaders.linkage.varying_type_mat*
dEQP-GLES2.functional.shaders.matrix.*
dEQP-GLES2.functional.uniform_api.value.assigned.by_pointer.render.basic.mat2_*
dEQP-GLES2.functional.uniform_api.value.assigned.by_pointer.render.basic.mat3_*
dEQP-GLES2.functional.shaders.conversions.matrix_to_matrix.*
dEQP-GLES2.functional.shaders.conversions.matrix_combine.*
dEQP-GLES2.functional.shaders.random.scalar_conversion*
Bug:angleproject:2581
Bug:angleproject:2583
Bug:angleproject:2584
Bug:angleproject:2588
Change-Id: Ib8c03397f0229432292c51f4a6332f954fc8fa12
Reviewed-on: https://chromium-review.googlesource.com/1080392
Commit-Queue: Luc Ferron <lucferron@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
|
|
90968360
|
2018-05-04T08:47:22
|
|
Vulkan: Incomplete textures support
2D multisample is out of scope since its ES 3 only.
Bug: angleproject:2499
Change-Id: Id5f81d713a2882ba2a91b7d3f281d71a3e9289f4
Reviewed-on: https://chromium-review.googlesource.com/1046786
Commit-Queue: Luc Ferron <lucferron@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
33318de4
|
2018-05-01T11:22:54
|
|
Vulkan: Use ShaderType enum.
This re-uses the same machinery as the GL front-end. It saves a lot of
custom casting and array sizing. Currently we only support vertex and
fragment shaders in Vulkan. Because of the Pipeline cache sizing, it's
easier to stick with just VS/FS and introduce the full set of shaders
when we move to packing the cache better.
Bug: angleproject:2522
Bug: angleproject:2455
Change-Id: I21432a335c741885af87970d8ee52b4a36338304
Reviewed-on: https://chromium-review.googlesource.com/1036927
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Jiawei Shao <jiawei.shao@intel.com>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
6c7ab7fe
|
2018-03-31T14:19:15
|
|
Vulkan: Reorganize helper classes.
This renames ResourceVk to vk::CommandGraphResource, which should help
clarify its usage. This also moves LineLoopHandler, ImageHelper, and
the DynamicBuffer and DynamicCommandPool classes into a new vk_helpers
module. This file contains helper classes that manage other resources.
Also this makes DynamicBuffer and DynamicDescriptorPool no longer
inherit from CommandGraphResource. In the future, only Impl objects
will be allowed to be graph resources.
Bug: angleproject:2318
Change-Id: I0fa23da2ac853d90f3c822547a4a314f247cc757
Reviewed-on: https://chromium-review.googlesource.com/985200
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Frank Henigman <fjhenigman@chromium.org>
|
|
f3614370
|
2018-03-31T14:19:14
|
|
Vulkan: Rename StreamingBuffer to DynamicBuffer.
This makes it consistent with DynamicDescriptorPool, and gives a bit
more precise definition.
Bug: angleproject:2318
Change-Id: I8953113165ebe2d0dcfc0fc923d94280180442ce
Reviewed-on: https://chromium-review.googlesource.com/985199
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Luc Ferron <lucferron@chromium.org>
|
|
6ea1b416
|
2018-03-21T16:13:01
|
|
Vulkan: Reallocate only the right uniform descriptor set when needed
Bug: angleproject:2421
Change-Id: Ibdd8beee8103062a566b8caa23cdd9b8ac35d3a8
Reviewed-on: https://chromium-review.googlesource.com/974105
Commit-Queue: Luc Ferron <lucferron@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
|
|
7a06ac1b
|
2018-03-15T10:17:04
|
|
Vulkan: Dynamic update of uniforms
- This change enables us to update uniforms indefintely using
VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC descriptor types.
- Enables 219 new dEQP tests in the uniform_api namespace.
- Creates a new white box test to validate new buffer allocation.
Bug: angleproject:2392
Change-Id: I8146e6104a6b7727f63265a4671577d251a8fca8
Reviewed-on: https://chromium-review.googlesource.com/965929
Commit-Queue: Luc Ferron <lucferron@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
|
|
7cec3353
|
2018-03-13T13:29:34
|
|
Vulkan: Get/SetUniform for float / int and vec*
Bug:angleproject:2392
Change-Id: I2110ecde653a85a28b515dc9d8473a1b37a73eb6
Reviewed-on: https://chromium-review.googlesource.com/962718
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Luc Ferron <lucferron@chromium.org>
|
|
b7d924a8
|
2018-03-10T11:16:54
|
|
Vulkan: Make free part of DescriptorPool.
This also fixes a missed VkResult error. In order to do this
we also return an error from ProgramImpl::destroy.
Bug: angleproject:2396
Change-Id: I649b19e64732785bb33eebadea7f361245137d0f
Reviewed-on: https://chromium-review.googlesource.com/958406
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
67ae6c58
|
2018-03-09T11:49:01
|
|
Vulkan: Use free descriptor set bits in pool.
This forces us to free descriptor sets when we're done with them,
but saves us from needing to track when a descriptor set pool is no
longer in use. We may need to revisit this in the future if we want
to support pool allocation for performance.
Bug: angleproject:2396
Change-Id: I3f3184f3dd9e4c2911e1aade4dcb95962a26c3a7
Reviewed-on: https://chromium-review.googlesource.com/956574
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
3c424b48
|
2018-01-19T12:35:09
|
|
Vulkan: Add vk_cache_utils.h.
This file contains the Pipeline and RenderPass cache utils.
Also renames renderervk_utils.h to vk_utils.h and the format utils
file.
Refactoring change only.
Bug: angleproject:2163
Change-Id: I5113a9a2c6f0b0960d38e6c2d8e391fa2d9f5f6a
Reviewed-on: https://chromium-review.googlesource.com/876505
Reviewed-by: Frank Henigman <fjhenigman@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
f2f6d379
|
2018-01-10T21:37:23
|
|
Vulkan: Add PipelineDesc.
The PipelineDesc class is a 512-byte packed description of the entire
Vulkan pipeline state. It uses the alignas keyword and some static
asserts to verify that the structures are packed. This ensures that
when ANGLE uses MurmurHash to hash the entire struct, and memcmp to
check for identity, that there are no garbage padding bits.
This CL does not implement the Pipeline cache, but it will help, since
now we have a packed type that can be used as the key to a hash map.
Bug: angleproject:2163
Change-Id: I16efa927f08d30d89a9c4c8943edd211c6878ac8
Reviewed-on: https://chromium-review.googlesource.com/829893
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Frank Henigman <fjhenigman@chromium.org>
|
|
8c3988c5
|
2017-12-21T14:44:56
|
|
Vulkan: Use one pipeline layout for all Programs.
This simplifies the pipeline state object caching. We will not need
to use any extra bits to cache based on program properties - instead
all programs will be compatible. The pipeline layout strucutre is
described in the design docs. It currently only has two bind groups:
the first for default uniforms, and the second for Textures. In the
future we might re-organize this to handle driver uniforms, dynamic
push constants, and/or program uniform buffers with ES 3.0.
Instead of storing only the Textures that are required by a Program,
we reserve space for the maximum possible Texture units. We might have
to revisit this very simple design in the future to support texture
arrays, which are handled specially in Vulkan.
Bug: angleproject:2163
Change-Id: I3e1656c2c73045aed56838a5f1267b246a623362
Reviewed-on: https://chromium-review.googlesource.com/837943
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
acf2f3ad
|
2017-11-21T19:22:44
|
|
Apply Chromium style fixes.
This addresses several minor code quality issues that are validated
in Chromium, but not yet applied to ANGLE:
* constructors and destructors must be defined out-of-line
* auto is not allowed for simple pointer types
* use override everywhere instead of virtual
* virtual functions must also be defined out-of-line
Slightly reduces binary size for me (~2k on Win, 150k on Linux).
Bug: angleproject:1569
Change-Id: I073ca3365188caf5f29fb28d9eb207903c1843e6
Reviewed-on: https://chromium-review.googlesource.com/779959
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
6db1c2e8
|
2017-11-08T09:17:40
|
|
Link interface blocks in ProgramImpl::link.
This allows the back-end to have access to the interface block info
in the link operation, and also allows the interface block info to
have direct access to the post-link Impl information.
BUG=angleproject:2208
Change-Id: Ib2bfb3c9155eee715bd3d29de1c3fdd67b16eed4
Reviewed-on: https://chromium-review.googlesource.com/753521
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
c9727f31
|
2017-11-07T12:37:07
|
|
Pass InterfaceBlockLinker to ProgramImpl::link.
This change is in preparation for moving the linking logic to the
Implementation.
Introduces a ProgramLinkedResources class that is passed into the Impl
and holds linking-related info such as the UBOs, Varyings, etc.
BUG=angleproject:2208
Change-Id: I2ef0824b54bfb462c79d003bffe34e9cfad60d8a
Reviewed-on: https://chromium-review.googlesource.com/746204
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
5547b384
|
2017-10-23T18:16:01
|
|
Vulkan: Implement simple static textures.
After this change, the SimpleTexture2D sample mostly runs.
BUG=angleproject:2167
Change-Id: Ie6d56f890b1aede329e11d1e987d0f8c17a2d0b4
Reviewed-on: https://chromium-review.googlesource.com/720072
Reviewed-by: Frank Henigman <fjhenigman@chromium.org>
|
|
76e471e9
|
2017-10-21T09:56:01
|
|
Vulkan: Implement basic uniforms.
This implementation adds one descriptor set with two bindings: one for
default vertex uniforms and the other for fragment. It adds two
corresponding uniform buffers, and the logic for updating the
descriptor sets bound to Vulkan. It doesn't handle much in the way of
synchronization and dependency management, or uniform update.
If there are only vertex or fragment uniforms the empty uniform buffer
is omitted from the descriptor set. If both are missing, there is no
descriptor set bound.
Note that as our implementation progresses we might not be able to
initialize our descriptor sets at link time, due to streaming in
uniform data.
BUG=angleproject:2167
Change-Id: I4ce4c3879ab454114df43bfac8d87ddf817fc045
Reviewed-on: https://chromium-review.googlesource.com/706340
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
|
|
c514348e
|
2017-10-15T20:20:06
|
|
Vulkan: Minor cleanups to ProgramVk.
This moves the Pipeline Layout and related layout code init into the
LinkProgram implementation call. These resources don't depend on
anything other than the state at link time. Moving the init makes
the calling code a bit simpler since it doesn't need to process error
conditions and check for validity every time.
Also introduce a reset() method, similar to ProgramD3D. This will
allow us to re-link a program multiple times (once resource lifetime
management is properly implemented).
BUG=angleproject:2167
Change-Id: Ibe76ed9b901adf6b69b51ba8219b3ce79d55b87d
Reviewed-on: https://chromium-review.googlesource.com/720071
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
|
|
855d964b
|
2017-05-17T14:05:06
|
|
Prefix user-defined names in GLSL output
Now user-defined names are prefixed by _u in GLSL output in case name
hashing is not on. Internal names such as names of temporary variables
created in AST transformations are written out as such.
This makes handling of internal function names and internal variable
names consistent. It also removes the possibility of name conflicts
between user-defined names and internal names in case name hashing is
not on. In the same vein, it makes it safe to use GLSL reserved words
that are not reserved in ESSL as variable names in case name hashing
is not on.
This also makes the GLSL output more consistent with how names are
handled in HLSL output. Name hashing code is shared between
VariableInfo and OutputGLSLBase to ensure names are handled
consistently in both. The name that's used in the shader source for a
given interface variable is written out to ShaderVariable::mappedName.
An exception needs to be made for identifiers close to the length
limit, since adding any prefix would take them over the limit. But
they can be just written out as such, since we don't have any builtins
or ANGLE internal variables that have as long names and could create a
conflict.
BUG=angleproject:2139
BUG=angleproject:2038
TEST=angle_unittests, angle_end2end_tests, WebGL conformance tests
Change-Id: Id6ed052c4fab2d091227dc9a3668083053b67a38
Reviewed-on: https://chromium-review.googlesource.com/507647
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
54164b0c
|
2017-08-28T15:17:37
|
|
Add getUniform impl methods.
This will let us remove some of the uniform data management code in
the GL front-end, and simplify the GL back-end. It will also enable
us to implement uniform data more efficiently in the D3D11 back-end,
and probably Vulkan back-end later.
This also implements a new impl method for the ProgramGL class to
flag optimized-out uniforms as no longer used, post-link. This is
important because otherwise the optimized uniforms get assigned
valid locations, and then the getUniform calls are expected to
succeed.
We also use a workaround for uniform value queries for the GL
back-end. It seems as though some drivers (seen on NVIDIA and AMD)
may not properly clamp to the maximum representable integer value
when querying out-of-range floating point values. Work around this by
always calling the driver with the proper type and then casting the
value in ANGLE.
BUG=angleproject:1390
Change-Id: I03dc2382e7af52455c356a2bf3971a4d1bd46ec6
Reviewed-on: https://chromium-review.googlesource.com/616785
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
|
|
27a60631
|
2017-06-30T15:12:01
|
|
Re-apply UBO binding workaround on program save.
The workaround which was previously defined to only apply on load
also seems to affect save on some AMD drivers.
BUG=angleproject:1637
BUG=angleproject:1897
Change-Id: Ia01a1420a484f3c2682ce97eaab18baccfb66a50
Reviewed-on: https://chromium-review.googlesource.com/558008
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
|
|
9cf9e871
|
2017-06-05T12:59:25
|
|
Move LinkResult to the gl:: namespace.
This is a derived type from gl::Error so makes sense to be there.
Also makes it more accessible than in ProgramImpl.h
BUG=angleproject:1897
Change-Id: Id41b13e5a072745d8c361057f5bef8f152e0452b
Reviewed-on: https://chromium-review.googlesource.com/522872
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
83418fb1
|
2017-06-05T12:59:24
|
|
Don't allow for error in ProgramImpl::save.
Refactoring cleanup patch only.
BUG=angleproject:1897
Change-Id: I6d12de5dab16ead9684886a1cf15b570e3c98156
Reviewed-on: https://chromium-review.googlesource.com/522871
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
c564c070
|
2017-06-01T12:45:42
|
|
Pass gl::Context to impl methods instead of ContextImpl.
In some cases we might have to call back into the GL layer, passing
the Context, and if we just have a ContextImpl pointer this isn't
possible. It also removes the need for SafeGetImpl.
BUG=angleproject:2044
Change-Id: I6363e84b25648c992c25779d4c43f795aa2866d6
Reviewed-on: https://chromium-review.googlesource.com/516835
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
61afff14
|
2017-03-14T15:34:03
|
|
ES31: Add PROGRAM_SEPARABLE to ProgramParameter and GetProgram
BUG=angleproject:1939
TEST=angle_end2end_tests
Change-Id: I97ad11360f7c015947a2c0cc7d4a47f994726834
Reviewed-on: https://chromium-review.googlesource.com/454264
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
|
|
5deea723
|
2017-02-16T10:44:46
|
|
Vulkan: Don't store device handles in wrapped objects.
BUG=angleproject:1684
Change-Id: I0ec11ec79f2e9893600a8ffd8cdbfc6040fb6f70
Reviewed-on: https://chromium-review.googlesource.com/426402
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
|
|
df68a6f0
|
2017-01-13T17:29:53
|
|
Vulkan: Implement a simple graphics pipeline.
BUG=angleproject:1580
Change-Id: Iceaed896db22dc9eefa3f1bee7d6142fcfb20368
Reviewed-on: https://chromium-review.googlesource.com/412267
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
|
|
8ecf7f9b
|
2017-01-13T17:29:52
|
|
Vulkan: Implement shader compilation.
This hooks up the Vulkan GLSL, decorated with locations, to glslang,
and then pipes the SPIRV back to the Program implementation for later
use when making pipelines to run draw calls.
The program compilation tests work now, but don't really test
anything other than not generating Vulkan validation layer errors
during compilation and shader object generation.
BUG=angleproject:1576
Change-Id: I625e42219f4b4d1433dd3109b94e1a2f666ba4bd
Reviewed-on: https://chromium-review.googlesource.com/408519
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
|
|
192745a7
|
2016-12-22T15:58:21
|
|
Add varying packing validation for WebGL.
This CL moves the varying packing from the D3D layer up to Program.
This is necessary for WebGL validation, and gives us consistency
for the various back-ends. There may be some additional cleanup work
on the VaryingPacking class, because it does some work that is D3D-
specific.
WebGL requires strict varying packing. Instead of allowing success
unconditionally, it's an explicit error to succeed to pack a set of
varyings that the sample algorithm would fail to pack.
Introduce a new packing mode option to the varying packing class to
handle this different packing style, while keeping our old more
relaxed packing method for ES code.
BUG=angleproject:1675
Change-Id: I674ae685ba573cc2ad7d9dfb7441efa8cb2d55fc
Reviewed-on: https://chromium-review.googlesource.com/423254
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
|
|
a7d12dc7
|
2016-12-13T15:08:19
|
|
Store uniform block bindings in program binaries.
This affects all back-ends - we weren't saving this. Note that
bindings can only be set after program linking. The spec is fairly
clear in that any programs saved must be loadable and runnable under
the same set of state, which would include block bindings.
Also add validation for zero binary formats in GetProgramBinary.
Also add a workaround for AMD where the block bindings were not
applied properly after link, similarly to our original bug.
This CL also includes a few fixups for GLProgram (raii).
BUG=angleproject:1637
Change-Id: Iae068eb4e1e4c763aa9f9332c033e38708026c8f
Reviewed-on: https://chromium-review.googlesource.com/418393
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
46eaa946
|
2016-06-29T10:26:37
|
|
Support CHROMIUM_path_rendering fragment operations
This brings two new APIs, BindFragmentInputLocation and
ProgramPathFragmentInputGen that together dictate how the
fragment shader varyings are used.
BUG=angleproject:1382
Change-Id: I4b52fd8a3555235a73aecd4f3dba2d500789cbb0
Reviewed-on: https://chromium-review.googlesource.com/357071
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Sami Väisänen <svaisanen@nvidia.com>
Commit-Queue: Sami Väisänen <svaisanen@nvidia.com>
|
|
9e54b5af
|
2016-05-25T12:57:39
|
|
Add Vulkan stubs.
Currently enabled for Windows by default.
BUG=angleproject:1319
Change-Id: I87921c579bee466465fb1e3f629bb3a40fdff659
Reviewed-on: https://chromium-review.googlesource.com/328730
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|