|
158ecba6
|
2022-01-07T16:40:26
|
|
Vulkan: Remove cached Impl pointers from ContextVk.
These pointers were a common source of programming error, where
sometimes they wouldn't be updated when they were needed. Instead
we can pull the objects directly from the GLES state. We added
them initially to attempt a performance improvement, but it's
likely they didn't significantly decrease memory accesses or the
number of instructions we process for GLES calls. Hence removing
them should be an improvement in safety without a perf loss.
Bug: angleproject:6864
Change-Id: I54107686992065a514077c71d173b804e295515e
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3378904
Reviewed-by: Charlie Lao <cclao@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
17bf6e98
|
2021-11-11T20:53:31
|
|
Implement GL_EXT_multi_draw_indirect
* Added the validation functions for multiDrawArraysIndirect()
and multiDrawElementsIndirect() according to the specs.
* Added generic implementation for the two functions that can
be called by back-ends.
* Added unit tests for the multiDrawIndirect functions.
* Added flags for back-ends so they can enable the extension.
* Minor cleanup in MultiDrawTest.cpp
Bug: angleproject:6439
Change-Id: I4e5f1cab05c6de330aef82d115492dcc9d2fad44
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3276043
Commit-Queue: Amirali Abdolrashidi <abdolrashidi@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
d2c01d2c
|
2021-09-17T12:57:14
|
|
GL: Allow selecting virtualization groups at context creation
Rewrite EGL_ANGLE_platform_angle_context_virtualization to
EGL_ANGLE_context_virtualization, changing the context virtualization
parameter to an identifier for what virtualization group the frontend
context should be added to.
This allows ANGLE's GL backend to be used by multiple threads if the
user creates contexts with different virtualization groups.
Bug: angleproject:6406
Change-Id: I7414d4705ce10bdf63a9b824043d5dd040dad875
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3169193
Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Geoff Lang <geofflang@chromium.org>
|
|
1ca1589f
|
2021-09-13T10:56:58
|
|
Give GLES extension bools a vendor suffix.
This is in preparation for auto-generation which will give all of
these bools suffixes.
Bug: angleproject:6379
Change-Id: I7e3f6c9b644c41a2165e6bf7b62d661fd352a250
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3158503
Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
Reviewed-by: Cody Northrop <cnorthrop@google.com>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
45965e72
|
2021-06-17T10:21:26
|
|
Vulkan: Translate border color's channel by image view format
ANGLE implementes some formats as other formats,such as ALPHA8 to R8,
this caused some tests failed due to missing border color's channel
translation,this change add a new textureBorderLoadFunction to
translate channels of border color by image view format.
Bug: angleproject:6046
Change-Id: I94ce719b4db3724ffd3dc862b51a412b5d9f3cce
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2972328
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
7e81056a
|
2021-02-01T11:16:14
|
|
Vulkan: Support integer type incomplete texture
Support both signed and unsigned integer type incomplete textures.
Bug: angleproject:5502
Bug: angleproject:4432
Tests: IncompleteTextureTestES3.*IntegerType*
dEQP.KHR_GLES31/core_sample_variables_mask_rgba8*i_*
Change-Id: Ic8c972aac0ca8589b26333b66dd0cc5fb5134043
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2613245
Commit-Queue: Mohan Maiya <m.maiya@samsung.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
2e9706d8
|
2021-01-08T17:29:42
|
|
Vulkan: Use angle::FormatID instead of VkFormat.
This change switches the internal enums we pass around from VkFormat
to FormatID. The end goal of the refactor is to allow the Vulkan
back-end to store packed tables indexed by FormatID. Because VkFormat
has large gaps in its enum space we'd otherwise need to use unordered
data structures like unordered_map.
The change removes the redundant VkFormat storage from vk::Format and
uses a new table query to return the VkFormat that 1:1 matches an
angle::FormatID. We also include a reverse mapping for use with native
Vulkan get functions for Android.
Also moves sRGB conversion functions into renderer_utils. A couple
sRGB formats that don't exist in GL are no longer handled by the sRGB
conversion functions. These formats should be extremely rare.
Bug: angleproject:5438
Change-Id: Id8b49773ca0c556f9f5a6a10fcf0d9762b93bbea
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2618204
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Ian Elliott <ianelliott@google.com>
|
|
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>
|
|
995493cc
|
2020-11-18T20:33:33
|
|
Revert "Vulkan: Remove rotation related data from driver uniform"
This reverts commit fd97c3343e9ff23677124b7528ec945bca65796a.
Reason for revert: The specialization constant for rotation causes
performance regression with older qualcomm driver. We need to keep the
driver uniform code path for the older driver.
Original change's description:
> Vulkan: Remove rotation related data from driver uniform
>
> Rotation is now handled in the shader compiler with specialization
> constant, it should be removed from driver uniforms. Since Metal is
> using the flipXY, flipXY/negFlipXY are still kept in the shader side
> implementation, but have moved to TranslatorMetal in this CL.
>
> Bug: b/171750979
> Change-Id: Ie8d15ef227cb52a6e19e4319ecc9f09bda42e667
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2519863
> Reviewed-by: Ian Elliott <ianelliott@google.com>
> Reviewed-by: Tim Van Patten <timvp@google.com>
> Reviewed-by: Jamie Madill <jmadill@chromium.org>
> Commit-Queue: Charlie Lao <cclao@google.com>
TBR=ianelliott@google.com,timvp@google.com,jmadill@chromium.org,cclao@google.com
Bug: b/171750979
Change-Id: Iff9cffb28851ade1d9c5cd23fde73910a19867ce
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2547808
Reviewed-by: Ian Elliott <ianelliott@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Charlie Lao <cclao@google.com>
Commit-Queue: Charlie Lao <cclao@google.com>
|
|
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>
|
|
fd97c334
|
2020-11-12T11:05:40
|
|
Vulkan: Remove rotation related data from driver uniform
Rotation is now handled in the shader compiler with specialization
constant, it should be removed from driver uniforms. Since Metal is
using the flipXY, flipXY/negFlipXY are still kept in the shader side
implementation, but have moved to TranslatorMetal in this CL.
Bug: b/171750979
Change-Id: Ie8d15ef227cb52a6e19e4319ecc9f09bda42e667
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2519863
Reviewed-by: Ian Elliott <ianelliott@google.com>
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Charlie Lao <cclao@google.com>
|
|
796df76c
|
2020-06-25T11:49:12
|
|
MultiDraw Refactor
Refactor MultiDraw* from general Context to different ContextImpl.
Move general multiDraw code to renderer_utils.cpp.
Bug: angleproject:3402
Change-Id: I85cb4b781afa2b3a8beb382a9c735910057f2ebe
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2268580
Commit-Queue: Shrek Shao <shrekshao@google.com>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
a91dcb62
|
2020-06-05T09:46:56
|
|
Fix FramebufferVk::getScissoredRenderArea() for pre-rotation
This fixes cases where pre-rotation wasn't occuring for small scissors
used with glClear(). There are around 1000 tests that do this.
Test: angle_deqp_gles2_tests --gtest_filter=dEQP.GLES2/functional_fragment_ops_depth_stencil_*
Bug: angleproject:4431
Bug: b/157933235
Bug: b/157933198
Change-Id: I469d51975e3bc3a7bfc9521a3817c919e809f7dd
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2228211
Reviewed-by: Cody Northrop <cnorthrop@google.com>
Commit-Queue: Ian Elliott <ianelliott@google.com>
|
|
d0146e07
|
2020-05-12T14:47:11
|
|
Vulkan: Rename SurfaceRotationType to SurfaceRotation
Follow-on CL per request in
https://chromium-review.googlesource.com/c/angle/angle/+/2191425/3/src/libANGLE/renderer/renderer_utils.h#48
Bug: angleproject:4436
Change-Id: I2ee8c65a0dbcf2eee4c9c7f4252abf16a578cad3
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2197614
Commit-Queue: Ian Elliott <ianelliott@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
e9dcffb1
|
2020-05-11T17:36:33
|
|
Vulkan: Enhance ReadPixels to deal with pre-rotation
Depending on the orientation, the source image may be row-major
or column-major; with positive or negative x/y-axis pitches.
Regardless of the orientation, the destination remains
row-major.
Bug: angleproject:4436
Bug: b/150329975
Change-Id: Ia1287f7036f07548d35128f1761feadf721cd78a
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2191425
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com>
Commit-Queue: Ian Elliott <ianelliott@google.com>
|
|
eb63016d
|
2020-02-04T16:15:41
|
|
Add environment overrides for ANGLE features.
Allows the application to override ANGLE behaviour without having to
modify the code or use the ANGLE extension. Useful for testing with the
command graph refactor.
Adds a new string utility for parsing lists of strings from environment
variables.
Bug: angleproject:4029
Change-Id: Ibae93b743c0c385392cd259d9604ce2f2ed988dc
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2037784
Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
d50151d3
|
2019-12-17T13:57:12
|
|
Move Serial utils to their own file.
This will let the front-end access them without pulling in the rest
of renderer_utils. The Serial class in particular will be useful for
capture/replay.
Also adds a very minimal unit test.
Bug: angleproject:4223
Change-Id: I9e63b8a8227a245b20a8f024b960fcf60c7840db
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1954611
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Cody Northrop <cnorthrop@google.com>
|
|
5f857839
|
2019-12-04T15:30:50
|
|
Improve current multisampled renderbuffer/texture support
This is split off from a change to implement multisampled textures for
the Vulkan back-end, and will come before that change. The changes
include:
- Make a common utility rx::GetSamplePosition() function. D3D11 and
Vulkan use the same standard sample positions/locations for 1, 2, 4,
8, and 16 samples. The D3D11 back-end has a utility function for
this, which is being moved to a common location--for use by both the
D3D11 and Vulkan back-ends.
- Texture::setStorageMultisample() handles converting the "requested number of
samples" to the actual number of samples used (e.g. converting 3 to 4),
supported by the underlying back-end). The actual number used is stored in
gl::TextureState::mImageDescs, for use by other GLES commands.
- Change some end2end tests to not make assumptions about the supported number
of samples, but to properly query what is supported.
Bug: angleproject:3565
Bug: angleproject:4196
Change-Id: I1dc12fedd0f8fb4975f90d87486e443b069b7141
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1948535
Commit-Queue: Ian Elliott <ianelliott@google.com>
Reviewed-by: Ian Elliott <ianelliott@google.com>
|
|
7e48c9eb
|
2019-08-06T17:17:19
|
|
Add explicit integer casts
WebKit uses the -Wshorten-64-to-32 flag which warns on these cases.
Bug: 3439
Change-Id: I8c1de60da0f173ca2036e2120e79b857f5f2775f
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1740866
Commit-Queue: James Darpinian <jdarpinian@chromium.org>
Reviewed-by: Kenneth Russell <kbr@chromium.org>
|
|
3a36f306
|
2019-07-19T12:43:22
|
|
Always set matrix uniform to dirty when it updates
Remove the dirty checking of matrix uniform update at frontend and
always let backend update whenever glUniformMatrix* is called. Profiled
with UniformsBenchmark/* with vulkan backend, performance increases
around 6% when data being updated is changing and performance increases
around 2% when data being updated stays same.
Bug: angleproject:3705
Change-Id: I8eaf6a1231e634b69c6dc540db1b9d3a312bf45d
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1709725
Commit-Queue: Jiacheng Lu <lujc@google.com>
Reviewed-by: Tobin Ehlis <tobine@google.com>
|
|
ec30d78d
|
2019-07-03T12:56:58
|
|
Optimize uniform matrix update
1. Add a fast matrix update function to do a single memcpy for uniform
matrix assignment with same layout. It benefits row-4 no-transpose GLSL
matrix and col-4 transpose HLSL matrix.
2. Make boolean IsColumnMajor to be a template parameter in generate
uniform matrix updating, which gets rid of the conditional branch
in loop and has better performance.
3. Add e2e test of uploading multiple 3x4 GLSL matrices at the same
time, which adds coverage to this CL.
Bug: angleproject:3632
Change-Id: Id1701ef6fbf63ea4b9884254d93ea8eacfe4e16a
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1688274
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
08b56293
|
2019-06-10T12:55:36
|
|
Vulkan: add LINE_LOOP with primitive restart
Adds support for GL_LINE_LOOP with primitive restart.
Bug: angleproject:3215
Change-Id: Ief1bdf15ef9b108dba025eaf4ce580bba54af623
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1649351
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
fce1e2d1
|
2019-06-04T15:02:08
|
|
Extend eglGetPlatformDisplay to allow feature overrides.
Add EGL_FEATURE_OVERRIDES_ENABLED_ANGLE and
EGL_FEATURE_OVERRIDES_DISABLED_ANGLE to submit lists of strings naming
the features that should be overridden (either enabled or disabled) on
display creation.
Bug: angleproject:1621
Change-Id: I4bb75c5dbab0e3b701a72069c38f8c60ecfffad2
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1646595
Commit-Queue: Jonah Ryan-Davis <jonahr@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
f7106d16
|
2019-05-30T17:34:42
|
|
Revert "Revert "Vulkan: Use atomics in SerialFactory.""
This reverts commit 35fa85ba2fafa583bd706b64d181f3f95094325d.
Reason for revert: This commit was an innocent bystander. The
bugs are intermittent, requiring multiple runs to verify.
Bug: angleproject:3492
Change-Id: Idc9dcb1631cfca5fea342266c732732c6f2bd2d5
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1636263
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
35fa85ba
|
2019-05-29T15:59:13
|
|
Revert "Vulkan: Use atomics in SerialFactory."
This reverts commit 1b0f79ee92b51122634fca6342876db196b85e3c.
Reason for revert: Breaks a number of applications on Android
Original change's description:
> Vulkan: Use atomics in SerialFactory.
>
> This allows serials to be generated from multiple threads without locking for
> very little/no cost.
>
> BUG=angleproject:2464
>
> Change-Id: Id61d170e7a985c3100da0057156859ffcb083dad
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1516514
> Commit-Queue: Geoff Lang <geofflang@chromium.org>
> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
TBR=geofflang@chromium.org,syoussefi@chromium.org,jmadill@chromium.org
Change-Id: I52011f294d68490998869fa898e929fd41eaa51c
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1636272
Reviewed-by: Cody Northrop <cnorthrop@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Cody Northrop <cnorthrop@google.com>
|
|
1b0f79ee
|
2019-02-28T11:08:21
|
|
Vulkan: Use atomics in SerialFactory.
This allows serials to be generated from multiple threads without locking for
very little/no cost.
BUG=angleproject:2464
Change-Id: Id61d170e7a985c3100da0057156859ffcb083dad
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1516514
Commit-Queue: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
b783fbc7
|
2019-05-10T23:16:17
|
|
Vulkan: Fix matrix uniforms
A piece of code shared with d3d was used to implement this feature.
However, we store the uniform data transposed and row-major in d3d to
accomodate the fact that matrix indexing in HLSL is the opposite of GLSL
(mat[row][col] in HLSL as opposed to mat[col][row] in GLSL).
There were two functions that copied the source matrix fields either as
column-major or source-major (corresponding to `transpose` false or true
respectively in glUniformMatrix*) into a row-major destination. These
functions are refactored into one, which copies from any-major source to
any-major destination. The HLSL backend uses the "to row-major" variant
and the Vulkan backend uses the "to column-major" variant.
Bug: angleproject:3198
Change-Id: I7254da4fbe6916af78c5906abcb82ca01674ab9f
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1607541
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
127990f9
|
2019-04-04T13:52:04
|
|
Vulkan: Use render pass loadOp for scissored clears
At this point, every clear is done through render pass loadOp, except
masked color or stencil clears. The only fallback is clearWithDraw,
that can clear both color and stencil at the same time.
Bug: angleproject:2361
Change-Id: I805fc12475e832ad2f573f665cdfeb766e61a6d0
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1553740
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tobin Ehlis <tobine@google.com>
|
|
8dc27f99
|
2018-11-29T11:45:44
|
|
Use packed enum for DrawElementsType.
The packing and unpacking take a few extra instructions. But it
completely obviates the need for any switches in the validation code.
Speed is slightly faster or the similar depending on the back-end.
Also add gl_angle_ext.xml to GL entry point generator inputs. This was
missing and would cause the code generation to miss certain changes.
Bug: angleproject:2985
Change-Id: I1ea41a71db71135000166ead8305ec42d22ff7b3
Reviewed-on: https://chromium-review.googlesource.com/c/1351729
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
b980c563
|
2018-11-27T11:34:27
|
|
Reformat all cpp and h files.
This applies git cl format --full to all ANGLE sources.
Bug: angleproject:2986
Change-Id: Ib504e618c1589332a37e97696cdc3515d739308f
Reviewed-on: https://chromium-review.googlesource.com/c/1351367
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
666818ea
|
2018-11-14T09:54:33
|
|
Use angle::Result in front-end (Part 8)
Refactors the gl::Texture class and a few related methods. Also reduces
binary size by up to 4k.
Bug: angleproject:2491
Change-Id: Ib9a69d7f507b0dce35abb17b90532f812bf43214
Reviewed-on: https://chromium-review.googlesource.com/c/1291845
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
|
|
c1fd7376
|
2018-10-26T22:48:39
|
|
Move index range calculations into VertexArray.
This is in preparation for removing the entire DrawCallParams struct.
This struct was big enough to cause a performance hit on draw call perf
tests just by virtue of initializing the fields. Also dereferencing the
struct members is slower than reading function parameters since it adds
an indirection.
Also includes some error refactoring to enable moving code to a shared
location.
In total this patch series reduces overhead by up to 5%.
Bug: angleproject:2933
Change-Id: Ib663f2538c14ac30d4c31fd10d6350be469626e2
Reviewed-on: https://chromium-review.googlesource.com/c/1298380
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
4e6f2aea
|
2018-09-19T11:09:51
|
|
Implement ANGLE_copy_texture_3d Extension
Adds copyTexture3DANGLE and copySubTexture3DANGLE that adds copy
operations on volumetric textures.
Bug: angleproject:2762
Test: angle_end2end_tests
Change-Id: I0076989c2b7ed69abfc73143c325065bdb06a360
Reviewed-on: https://chromium-review.googlesource.com/c/1207216
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
1ffad843
|
2018-09-24T23:40:45
|
|
Remove PixelPackState from PackPixelsParams.
Only one flag ("reverseRowOrder") from PixelPackState was being used,
so instead of including the entire struct in PackPixelsParams, just
include the one flag.
BUG=angleproject:2718
Change-Id: I32e8b30383d198ecba9bf1719c32dda0938fc969
Reviewed-on: https://chromium-review.googlesource.com/1242210
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Yuly Novikov <ynovikov@google.com>
|
|
522095f7
|
2018-07-23T14:59:41
|
|
Rename "color" functions to "pixel" functions.
This extends of the copy, read and write functions to cover depth and
stencil formats.
Refactoring change only.
Bug: angleproject:2673
Change-Id: I4b0b2f4cf8621051cacd95cdbd6d70f94ca612e2
Reviewed-on: https://chromium-review.googlesource.com/1147152
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
db9c69ed
|
2018-07-18T17:23:47
|
|
Make PackPixels take an angle::Format.
This removes the format type parameter from places where it isn't
needed. It also removes the 'write color' functions map. This map was
redundant with the angle::Format write function.
Bug: angleproject:2729
Change-Id: I24e4548a89342237d7ed25180fea156fba51ccab
Reviewed-on: https://chromium-review.googlesource.com/1142300
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
|
|
24ddc7a8
|
2018-06-11T14:56:34
|
|
WGL: Support unvirtualized contexts and unsafe multithreading.
When using unvirtualized contexts, DisplayWGL still creates a Renderer for
managing any internal GL resources such as emulated back buffers for
DXGISwapChainWindowSurfaceWGL or D3DTextureSurfaceWGL but also creates a new
Renderer for each GL context. All created contexts share resources.
BUG=angleproject:2464
Change-Id: I945502514079368e062beef70bed49c61ed44403
Reviewed-on: https://chromium-review.googlesource.com/1097459
Commit-Queue: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Yuly Novikov <ynovikov@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>
|
|
46bcea50
|
2018-05-31T09:48:36
|
|
D3D,Vulkan: Prep work to share useful functions from D3D
- Refactor and move some functions used by D3D that are not really
renderer specific to be used by the Vulkan implementation to support
setting matx uniforms.
Bug: angleproject:2581
Change-Id: Ib37ddf4fc62bb8ecb3629893a24969e1f515795b
Reviewed-on: https://chromium-review.googlesource.com/1079845
Commit-Queue: Luc Ferron <lucferron@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
|
|
99d492c2
|
2018-02-27T15:17:10
|
|
Use packed enums for the texture types and targets, part 2
This completes the refactor by using the packed enums in the gl:: layer
and in the backends.
The packed enum code generation is modified to support explicitly
assigning values to the packed enums so that the TextureTarget cube map
faces are in the correct order and easy to iterate over.
BUG=angleproject:2169
Change-Id: I5903235e684ccf382e92a8a1e10c5c85b4b16a04
Reviewed-on: https://chromium-review.googlesource.com/939994
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
|
|
f0e89be6
|
2017-11-08T14:00:32
|
|
Use packed enums for the texture types and targets, part 1
In OpenGL there are two enum "sets" used by the API that are very
similar: texture types (or bind point) and texture targets. They only
differ in that texture types have GL_TEXTURE_CUBEMAP and target have
GL_TEXTURE_CUBEMAP_[POSITIVE|NEGATIVE]_[X|Y|Z].
This is a problem because in ANGLE we use GLenum to pass around both
types of data, making it difficult to know which of type and target a
variable is.
In addition these enums are placed somewhat randomly in the space of
OpenGL enums, making it slow to have a mapping from texture types to
some data. Such a mapping is in hot-code with gl::State::mTextures.
This commit stack makes the texture types and target enums be
translated to internal packed enums right at the OpenGL entry point
and used throughout ANGLE to have type safety and performance gains.
This is the first of two commit which does the refactor for all of the
validation and stops inside gl::Context. This was the best place to
split patches without having many conversions from packed enums to GL
enums.
BUG=angleproject:2169
Change-Id: Ib43da7e71c253bd9fe210fb0ec0de61bc286e6d3
Reviewed-on: https://chromium-review.googlesource.com/758835
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: 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>
|
|
cda6af19
|
2017-10-30T19:20:37
|
|
Split pixelBuffer from pack/unpack state
This will refactor will help use packed enums for buffer targets.
BUG=angleproject:2169
Change-Id: Ie7ed3e105f89457c67027e6598d7e29503ad355c
Reviewed-on: https://chromium-review.googlesource.com/745181
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
|
|
5ad26408
|
2017-10-17T15:32:06
|
|
Add destructor to MultisampleTextureInitializer.
This was generating a warning for missing virtual destructor in
some configurations.
BUG=angleproject:2167
Change-Id: I05e335de4ab1160c6066665d588b50527ea34cbd
Reviewed-on: https://chromium-review.googlesource.com/723980
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
42975644
|
2017-10-12T12:31:51
|
|
Move incomplete texture logic to shared helper.
The incomplete texture handling is similar between the D3D and Vulkan
back-ends. We create 1x1 textures, initialize them to black, and bind
them when we detect incomplete textures. We would also bind incomplete
textures when we detect feedback loops. In the GL back-end, we
wouldn't detect feedback loops, and would allow the driver to handle
incompleteness.
Instead implement this in a shared helper class, and do the feedback
loop detection in the front-end for every back-end. This makes our
behaviour more consistent between back-ends, and prevents undefined
behaviour.
Because initializing multisample textures is tricky (they
can't be updated with TexImage calls) we do a bit of a workaround so
the back-end can clear the incomplete multisample texture initially.
This progresses the initial Vulkan textures implementation.
BUG=angleproject:2167
Change-Id: I79ddcc0711fcc986f2578a52ac6f701231d241ac
Reviewed-on: https://chromium-review.googlesource.com/700993
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
9959f544
|
2017-09-12T15:22:56
|
|
Cleanups to ResourceSerial.
Allow for "empty" bindings, which are valid but represent when no
object is bound.
BUG=angleproject:2052
Change-Id: I0a41d1f0db3f5736e9e8f8ca3a74f41b748fd2d2
Reviewed-on: https://chromium-review.googlesource.com/659225
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
|
|
0e7f1736
|
2017-09-09T23:32:50
|
|
D3D: Only scan cached shader executable lists once.
Any time we would query ProgramD3D for a particular vertex or pixel
shader, we would iterate over all the cached shaders of the program
looking for the matching input or output layout signature. This change
makes it so we only compute the index of the matching shader once,
and subsequent calls will re-use the shader index. This should speed
up the draw call benchmarks.
Also include a fix to the Serial class that initializes a Serial value
to an invalid sentinel value. This ensures that comparing any other
Serial (including another invalid serial) to the invalid serial will
return not-equals.
BUG=angleproject:1155
Change-Id: I7d913bf08d0bedf6155eae0661b2a5fa94565cc9
Reviewed-on: https://chromium-review.googlesource.com/648730
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
|
|
d93cd6c2
|
2017-08-11T16:32:41
|
|
Refactor the CPU copy texture code into a function in renderer utils.
BUG=angleproject:1932
Change-Id: Iab79f2a09c2d8a85d2a9dde34acf4d2151072c2b
Reviewed-on: https://chromium-review.googlesource.com/612561
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Geoff Lang <geofflang@chromium.org>
|
|
222c517f
|
2017-07-19T16:15:42
|
|
Control Debug layers in ANGLE_platform_angle.
Debug layers seem to be a universal thing among functional back-ends.
D3D, OpenGL and Vulkan all need some kind of controls for debugging,
so it seems to make sense to make this control part of the base
extension.
Default the extension to EGL_DONT_CARE, which allows the back-end to
have a lot of flexibility in terms of implementation.
Also enable the extension in the D3D11 and OpenGL back-ends, and set
the extension to enabled for angle_end2end_tests.
Remove EGLVulkanEXTTest since it no longer tests anything not tested
in the base ANGLETest class.
BUG=angleproject:2086
Change-Id: I52d8170effd1846b9afbe6e4052c699fe5cb0de8
Reviewed-on: https://chromium-review.googlesource.com/578369
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
|
|
4928b7ca
|
2017-06-20T12:57:39
|
|
Proliferate gl::Context everywhere.
This gives the D3D back-end access to the GL state almost anywhere.
This uses the onDestroy hook for Textures to push errors up from
destructors, although they still don't quite make it to the Context.
There are places, such as in EGL object (Context/Surface) destruction,
where we end up calling through to GL implementation internals without
having access to a gl::Context. We handle this via a proxy Context
to a Display, basically a null context, that has access to impl-side
state like the Renderer pointer if necessary. It does not have access
to the normal GL state.
Also Pass gl::Context to RefCountObject::release(). Since we're using
destroy() methods now, we should not ever call the destructor directly.
BUG=angleproject:1156
Change-Id: Ie4c32ad6bf6caaff0289901f30b5c6bafa2ce259
Reviewed-on: https://chromium-review.googlesource.com/529707
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
|
|
fb05bcba
|
2017-06-07T15:43:18
|
|
Move the vk Serial class to renderer_utils.
This can be useful for other back-ends, for various types of state
management. Also redesign the class to use an opaque factory instead
of an increment operator. The class maintains the property of being
ordered. Also assume we don't overflow with 64-bit serials. We could
maybe redesign this to use 32-bit serials for memory constrained
situations, and handle overflow more gracefully.
I plan to use the serials to track state revisions for the vertex
array class, to avoid doing redundant work.
BUG=angleproject:1156
Change-Id: I02c78b228bc6e2fb3ee786fe67a4e607baaca18e
Reviewed-on: https://chromium-review.googlesource.com/529704
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
dcc9b51d
|
2017-06-05T15:28:45
|
|
D3D11: Consolidate input layout application.
This merges all calls to IASetInputLayout to a single place in
StateManager11. This means we no longer have to invalidate the state
for D3D11, and can always lazily apply the input layout state.
Introduces a new ResourceSerial class to replace the uintptr_t and
DirtyPointer design.
BUG=angleproject:2052
Change-Id: I76b874218b754395f25a129967c769b1f8f82115
Reviewed-on: https://chromium-review.googlesource.com/523025
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
abaab233
|
2017-01-10T12:37:37
|
|
Vulkan: Introduce vk::Format.
BUG=angleproject:1319
Change-Id: I88bcc6caa5d29565728848bada1563e47e383b29
Reviewed-on: https://chromium-review.googlesource.com/367753
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
4f57e5f9
|
2016-10-27T17:36:53
|
|
D3D11: Make several format tables constexpr.
This should guarantee the best memory access patterns.
It introduces some indirections for some format queries,
but most of these should be direct array lookups, or used
infrequently. We can optimize this later if necessary.
BUG=angleproject:1389
Change-Id: I5e2c8c530a07798494afd3ea36b6164d7564c02c
Reviewed-on: https://chromium-review.googlesource.com/403314
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
|
|
b2e4863c
|
2016-08-09T18:08:03
|
|
Replace std::map with switch in load functions.
BUG=angleproject:1455
Change-Id: Ica74ea5503efc0315bc4d98aa322da523a30b24c
Reviewed-on: https://chromium-review.googlesource.com/367696
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
30712068
|
2016-08-09T11:10:36
|
|
Move fast copy functions into angle::Format.
These tables were duplicated in D3D11 and D3D9, and would have to be
further duplicated into Vulkan.
BUG=angleproject:1455
Change-Id: Ice1b81417d7b14f933b61861c4a9997c260ef72e
Reviewed-on: https://chromium-review.googlesource.com/367690
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
86e0b7f7
|
2016-08-09T11:10:29
|
|
Clean up PackPixels.
BUG=angleproject:1455
Change-Id: I263719cc77ff80580a551683d062e862dee1bdab
Reviewed-on: https://chromium-review.googlesource.com/365826
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
a5b1561e
|
2016-08-09T11:10:27
|
|
Place format info in angle::Format.
Some bits of information, like the copy functions and mipmap gen
functions, can be shared across back-ends in the angle::Format
class.
Also name the info struct angle::Format, and use an enum class
angle::Format::ID to identify the particular format.
This patch introduces a new table generator for angle formats
and updates the D3D11 generator accordingly.
BUG=angleproject:1455
Change-Id: I13b8b98822b1186c6a9e436dc232c18fef50980c
Reviewed-on: https://chromium-review.googlesource.com/365824
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
d2b50a0b
|
2016-06-09T00:13:35
|
|
Move ReadPixels logic to helper methods.
These routines were pretty much duplicated between D3D9 and D3D11.
Since I was going to have to rewrite them again for Vulkan, I
figured it would be best to move them into a common location and
clean them up a bit.
BUG=angleproject:1319
Change-Id: I15d39b052daf3e1020dbd0880f01ae84f3686a0a
Reviewed-on: https://chromium-review.googlesource.com/349630
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|