|
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>
|