Commit Graph
8334 Commits
Author SHA1 Message Date
Olli Etuaho 4ebd8f3d99 Fix issues with clearing deleted attachments
Deleting an object that was acting as a framebuffer color attachment
in the current framebuffer didn't previously update all of the
framebuffer state correctly. Fix this by going through the usual
resetAttachment path when any framebuffer attachment is deleted
instead of having custom code that only updated part of the state.

Also early out from clearbuffer calls in case of a missing color
buffer - even now that the draw buffer mask is being updated correctly,
some backend code doesn't take it into account. One example is
querying attachment format when the SRGB clear for linear framebuffer
attachments workaround is active.

BUG=angleproject:2831
TEST=angle_end2end_tests

Change-Id: I1071a60dc0251946fed00e88e43a244fe59f4863
Reviewed-on: https://chromium-review.googlesource.com/1235656
Reviewed-by: Jamie Madill <[email protected]>
Reviewed-by: Geoff Lang <[email protected]>
Commit-Queue: Olli Etuaho <[email protected]>
2018-09-25 05:19:53 +00:00
Olli Etuaho 7620c7391c Prevent crash in robust access mode when buffer has no data
This fixes a crash appearing in robust access mode when a buffer has
no data by stopping the draw call.

A better fix would be to ensure that fetches from an empty buffer
result in zero, but this fix requires a lot more effort. This is not
necessarily warranted since the client is either way doing something
incorrect in this case.

BUG=angleproject:2840
TEST=angle_end2end_tests

Change-Id: Ie4ef5b1ca7c0091d7d26f91678d6e4768cc0c650
Reviewed-on: https://chromium-review.googlesource.com/1238622
Reviewed-by: Jamie Madill <[email protected]>
Reviewed-by: Corentin Wallez <[email protected]>
Commit-Queue: Olli Etuaho <[email protected]>
2018-09-25 05:18:33 +00:00
Frank Henigman 85c4b43e6d Vulkan: Translate line loop indices from buffer.
When a line loop is drawn with byte indices from a buffer, translate
to short.  Enable test.

BUG=angleproject:2802

Change-Id: Ie178ec866387be85b91291c28e1978db0a09c20a
Reviewed-on: https://chromium-review.googlesource.com/1237293
Reviewed-by: Frank Henigman <[email protected]>
Commit-Queue: Frank Henigman <[email protected]>
2018-09-25 02:36:29 +00:00
Tobin Ehlis f5aad06313 Avoid flush/invalidate of host-coherent memory
For DynamicBuffer avoid calling vkFlushMappedMemoryRanges() or
vkInvalidateMappedMemoryRanges() if the underlying memory is host-
coherent. These calls are not required for host-coherent memory and
may negatively impact performance.

When currently allocating HOST_VISIBLE memory it's possible to also get
HOST_COHERENT memory even though it's not explicitly requested. Because
of this, the change updates the memory allocaiton interfaces through
the stack to pass back the actual allocated memory properties so that
it can be checked to see if it's host-coherent.

Bug: angleproject:2804
Change-Id: Ife95c4b98115b16d16c087dd72dba7d9661fdb46
Reviewed-on: https://chromium-review.googlesource.com/1234276
Commit-Queue: Tobin Ehlis <[email protected]>
Reviewed-by: Yuly Novikov <[email protected]>
2018-09-25 01:37:30 +00:00
Jamie Madill e2d2270a6f Vulkan: Merge append/beginWriteResource.
The new API is named 'recordCommands'.

These two APIs were basically doing the same thing. We don't need to
have an understanding of creating a new graph node to know that we
want to record some Vulkan commands to a command buffer. The prior
design was actually masking a bug where we would allow appending
commands to a command graph node that had already started a render
pass. Fix this by adding a render pass check to recordCommands.

Also removes 'hasStartedWriteResource' since this method wasn't used
anywhere.

Also renames 'onResourceChanged' to 'finishCurrentCommands'.

Bug: angleproject:2828
Change-Id: I00bd5b893fcfc37172b6c1706cb2f5fc57e79f54
Reviewed-on: https://chromium-review.googlesource.com/1235654
Commit-Queue: Jamie Madill <[email protected]>
Reviewed-by: Frank Henigman <[email protected]>
Reviewed-by: Geoff Lang <[email protected]>
2018-09-25 00:33:08 +00:00
Jamie Madill 5272a54370 Vulkan: Skip BufferDataTest.RepeatedDrawDynamicBug on Win/Intel.
Bug: angleproject:2843
Change-Id: If86ed33f7fbc70e4f10580d2b52ff04454e95f52
Reviewed-on: https://chromium-review.googlesource.com/1240416
Reviewed-by: Jamie Madill <[email protected]>
Commit-Queue: Jamie Madill <[email protected]>
2018-09-24 17:22:58 +00:00
Jamie Madill f668a4b5fb Skip Texture::syncState when no dirty bits.
We sometimes generate local dirty bits in TextureGL. To make sure the local
dirty bits don't get skipped we use a Subject/Observer pattern between the
TextureGL and gl::Texture. This allows us to skip syncState in the hot path.

Also inlines a couple of other texture functions. And fixes a stray header
in EGLBlobCacheTest.

Bug: angleproject:2763
Change-Id: Ie1d8a5865deaf2a563a358c31ae28bef6b2458b1
Reviewed-on: https://chromium-review.googlesource.com/1228374
Commit-Queue: Jamie Madill <[email protected]>
Reviewed-by: Yuly Novikov <[email protected]>
2018-09-24 02:07:21 +00:00
Jamie Madill 77db6f4af1 Use global Context lookup in single-threaded cases.
In single-threaded cases we don't need to use a TLS lookup for the
current Context.

Assume a global context has 3 states: unset, set, and multi-threaded:

* global context unset -> set the global context
* global context set, matches TLS context -> set the global context
* global context set, doesn't match TLS -> set multi-threaded
* global context multi-threaded -> leave it

This also inlines the global context/TLS check into global_state.h.
Increases performance of the binding perf overhead test by up to 25%
and the draw call perf test by up to 3%.

Bug: angleproject:2824
Change-Id: Ib95953ca918f2408fe72ca83061f4e2d1bd1adad
Reviewed-on: https://chromium-review.googlesource.com/1231993
Commit-Queue: Jamie Madill <[email protected]>
Reviewed-by: Yuly Novikov <[email protected]>
2018-09-24 02:01:01 +00:00
Jamie Madill 55e57f96fb Remove some redundant dirty bits notifications.
These were already being signaled in the front end.

Bug: angleproject:2763
Change-Id: Id78d3d764e80e687c29c08395b59048d314bfbe2
Reviewed-on: https://chromium-review.googlesource.com/1204490
Reviewed-by: Yuly Novikov <[email protected]>
Reviewed-by: Shahbaz Youssefi <[email protected]>
Commit-Queue: Jamie Madill <[email protected]>
2018-09-22 00:20:56 +00:00
Bryan Bernhart c55aefe33f ES31: Support atomic functions on D3D11 - Part III
This patch is the third one to support atomic functions on D3D11.

In this patch we enable support for atomic function returns outside of
assignments (e.g. part of arithmetic operations or to index into arrays) and
when used directly initialize a variable.

Note that we are still missing the functionality to be tag loops with
[allow_uav_condition] as required by InterlockedCompareExchange.

BUG=angleproject:2682
TEST=angle_end2end_tests

Change-Id: Ia409ebb10621fd5c514cf6c76f366a320a9d9fc1
Reviewed-on: https://chromium-review.googlesource.com/1208317
Reviewed-by: Bryan Bernhart <[email protected]>
Reviewed-by: Corentin Wallez <[email protected]>
Commit-Queue: Corentin Wallez <[email protected]>
2018-09-21 23:26:41 +00:00
Geoff Lang 799da6d18c Revert "D3D11: Resolve multisampled EGL surfaces at eglSwapBuffers"
An increased crash rate in rx::NativeWindow11Win32::createSwapChain has been
seen around the same time as this patch landed.  Speculatively reverting.

BUG=887403

This reverts commit a49f60fee7.

Change-Id: Id1b08efbf47196f17f4a5e509a29f7d628b07b49
Reviewed-on: https://chromium-review.googlesource.com/1238884
Reviewed-by: Geoff Lang <[email protected]>
Commit-Queue: Geoff Lang <[email protected]>
2018-09-21 20:16:52 +00:00
Frank Henigman 9d84ccbaf2 Vulkan: renderer->finish() before reading buffers.
Have to call renderer->finish() before reading a buffer otherwise you can
get stale data.
Enable IndexBufferOffsetTest.UInt8Index/ES2_VULKAN which now works.
Disable LineLoopTest.LineLoopUShortIndexBuffer/ES2_VULKAN which stopped
working on Windows with Intel GPU.

BUG=angleproject:2659

Change-Id: I1e21b0e1dacd3368923caf18e767e34ab696eef6
Reviewed-on: https://chromium-review.googlesource.com/1227032
Commit-Queue: Frank Henigman <[email protected]>
Reviewed-by: Yuly Novikov <[email protected]>
2018-09-21 19:52:11 +00:00
Olli Etuaho ab5fb5edb1 Reland "Support EXT_blend_func_extended in the GLES2 context"
This re-lands EXT_blend_func_extended implementation. A lot of the
implementation has been rewritten on top of changes that have been
done since the last attempt.

For now we only expose the extension on desktop GL. To support GLES,
we'd need to investigate what's the most robust way to handle the
compiler output and make the binding of the fragment outputs
conditional.

The extension is disabled on AMD and Intel because of test failures.

BUG=angleproject:1085
TEST=angle_end2end_tests

Change-Id: I619ae3162769b90aad095ddec158ce6c57a114a8
Reviewed-on: https://chromium-review.googlesource.com/1233713
Reviewed-by: Jamie Madill <[email protected]>
Reviewed-by: Geoff Lang <[email protected]>
Commit-Queue: Olli Etuaho <[email protected]>
2018-09-21 06:49:32 +00:00
Jamie Madill 38fe68403b Remove secondary Texture rendering loop check.
This check was not used. It applied only to rendering Feedback Loops.
The behaviour is undefined in non-WebGL and for WebGL we have a
separate validation check.

Also update the feedback loop tests to ignore the current GL states.
This change is based on feedback from the OpenGL ES working group.

Bug: angleproject:2763
Bug: chromium:763695
Change-Id: I9882b4f9af2d43fc7b5604ff36dadcc79dfd378f
Reviewed-on: https://chromium-review.googlesource.com/1228373
Commit-Queue: Jamie Madill <[email protected]>
Reviewed-by: Shahbaz Youssefi <[email protected]>
Reviewed-by: Yuly Novikov <[email protected]>
2018-09-21 06:16:23 +00:00
Olli Etuaho 0131ff4018 Fix using a large vertex attrib divisor on D3D11
A divisor >= 256 used to trigger an assert on the D3D11 backend since
it couldn't fit into the input layout cache. Increase the space
reserved for the divisor in the input layout cache to make sure that
the correct input layout will get used and to fix the assert.

BUG=angleproject:2832
TEST=angle_end2end_tests

Change-Id: I34eead6c4e8c4fea379bbafc8670b4e32a5b633b
Reviewed-on: https://chromium-review.googlesource.com/1236293
Reviewed-by: Jamie Madill <[email protected]>
Reviewed-by: Geoff Lang <[email protected]>
Commit-Queue: Olli Etuaho <[email protected]>
2018-09-21 05:37:25 +00:00
Jamie Madill e25b800611 Move sampler sync out of syncProgramTextures.
We only need to call the syncState for samplers when they are dirty.
Also includes changes to refactor out the sampler sync in GL. Adds
observer bindings so sampler sync is handled correctly in resource
sharing scenarios.

Bug: angleproject:2763
Change-Id: I762f0738ee7572ae29ce6bd5384a30aa9588c848
Reviewed-on: https://chromium-review.googlesource.com/1227797
Reviewed-by: Shahbaz Youssefi <[email protected]>
Commit-Queue: Jamie Madill <[email protected]>
2018-09-21 05:32:45 +00:00
Jiawei Shao a977acc857 ES31: Support translating textureGather into HLSL - Part I
This patch is the first one in the series of supporting GLSL texture
function textureGather/textureGatherOffset on D3D11.

According to ESSL 3.1 SPEC (Chapter 8.9.3, Page 130), the definition
of textureGather on sampler2D is:
    gvec4 textureGather (gsampler2D sampler, vec2 P[, int comp])

The parameter "comp" is optional, and if it is specified, the value
of "comp" must be a constant integer expression with a value of 0, 1,
2, or 3, identifying the x, y, z, or w postswizzled component of the
four-component vector lookup result for each texel, respectively. If
comp is not specified, it is treated as 0.

According to the definition above, textureGather is equivalent to
Texture2D.Gather[Red|Green|Blue|Alpha] in HLSL, where we can use a
switch-case expression to choose the right HLSL texture function.

The features listed here will be implemented in the following patches:
1. Support textureGatherOffset
2. Support textureGather[Offset] on isamplers and usamplers
3. Support textureGather[Offset] on textures when swizzle is on
4. Support textureGather[Offset] on shadow samplers

BUG=angleproject:2826
TEST=dEQP-GLES31.functional.texture.gather.basic.2d.rgba8.*
     dEQP-GLES31.functional.texture.gather.basic.cube.rgba8.*
     (without texture_swizzle)
     dEQP-GLES31.functional.texture.gather.basic.2d_array.rgba8.*
     (without texture_swizzle)

Change-Id: Iff2ed4f8b65dad613cb0bafdfd19f8f0528e832c
Reviewed-on: https://chromium-review.googlesource.com/1232980
Commit-Queue: Jiawei Shao <[email protected]>
Reviewed-by: Corentin Wallez <[email protected]>
2018-09-21 00:11:15 +00:00
Ian Elliott 4ce287e042 Change the name of the opt'ed-in app from maps to cubey.
Since this is about to be used for the Q release, and we haven't
receieved permission from the maps team to opt-in their app, we'll
switch to our team's test app.

Bug: angleproject:2794
Change-Id: Idbda050b1130c359cda68066f187aadeb8e949b5
Reviewed-on: https://chromium-review.googlesource.com/1236658
Commit-Queue: Ian Elliott <[email protected]>
Commit-Queue: Jamie Madill <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
2018-09-20 19:50:34 +00:00
Jamie Madill 52ea49706f Vulkan: Enable a few BufferDataTests.
These are already passing.

Bug: angleproject:2644
Change-Id: Iac3452547e319a709e010431eb8a45f5523bb5f7
Reviewed-on: https://chromium-review.googlesource.com/1235653
Reviewed-by: Yuly Novikov <[email protected]>
Commit-Queue: Jamie Madill <[email protected]>
2018-09-20 16:17:20 +00:00
Jamie Madill d511948b9f Use FastVector in angle::Subject.
This improves object binding performance. We no longer need to check
two containers when manipulating the bound subjects/observers.

Bug: angleproject:2763
Change-Id: I0ccb2e76be47bd8a28fba5a0c3eff857aa166bb7
Reviewed-on: https://chromium-review.googlesource.com/1227795
Commit-Queue: Jamie Madill <[email protected]>
Reviewed-by: Yuly Novikov <[email protected]>
Reviewed-by: Shahbaz Youssefi <[email protected]>
2018-09-19 20:42:28 +00:00
Jamie Madill 20c01390cb Fix FastVector::resize when count < size.
Also update a test to trigger the bug.

Bug: angleproject:2763
Change-Id: I8e6735320a34dcc4cc8beee1b7a22b768912f24f
Reviewed-on: https://chromium-review.googlesource.com/1234338
Reviewed-by: Shahbaz Youssefi <[email protected]>
Commit-Queue: Jamie Madill <[email protected]>
2018-09-19 20:42:03 +00:00
Olli Etuaho dbce1f890a Fix trying to clear nonexistent FBO attachments
The D3D11 backend used to crash to a null pointer dereference if a
glClearBuffer call was done on a nonexistent depth or stencil
attachment. Validate for these conditions so that the backend can't
crash in this case.

BUG=angleproject:2827
TEST=angle_end2end_tests

Change-Id: Iecee78d213d11d492d52f246b4b068e8b6f34244
Reviewed-on: https://chromium-review.googlesource.com/1233675
Reviewed-by: Jamie Madill <[email protected]>
Reviewed-by: Geoff Lang <[email protected]>
Commit-Queue: Olli Etuaho <[email protected]>
2018-09-19 18:30:59 +00:00
Jamie Madill bf7cfbea4b Re-land "Add FastVector for simple dynamic vector cases."
Re-land fixes memory leak and adds inline to a few more methods.

This optimized vector keeps an initial fixed size storage but has
unbounded growth like a normal std::vector. It operates like a
FixedVector initially but then switches the storage to an allocated
pool when the element count exceeds the array limit.

This gives fast performance in the small case since no dynamic
allocation is needed. It also handles the "slow" big case.

Bug: angleproject:2763
Change-Id: Ib3cc7b652a14ed346528bf15820023ab0b5317ce
Reviewed-on: https://chromium-review.googlesource.com/1233453
Commit-Queue: Jamie Madill <[email protected]>
Reviewed-by: Yuly Novikov <[email protected]>
2018-09-19 18:05:47 +00:00
Tobin Ehlis 2ec817bb6b Remove writeResource down readPixels path
This is not needed and results in creating an empty command buffer.

Bug: angleproject:2818
Change-Id: I06e5542cb3cd819c18758c909b8fcb624b074874
Reviewed-on: https://chromium-review.googlesource.com/1232981
Reviewed-by: Jamie Madill <[email protected]>
Commit-Queue: Tobin Ehlis <[email protected]>
2018-09-19 18:03:26 +00:00
Olli Etuaho 2c8f084543 Add ANGLE_multiview_multisample
We add a novel multiview multisampling extension that includes the
requirement to explicitly resolve the multisampled framebuffer. The
explicit resolve is much more straightforward to implement on top of
OpenGL and D3D11 than implicit resolve found in the native extension
OVR_multiview_multisampled_render_to_texture. It also has predictable
performance characteristics.

The extension allows multiview drawing to 2D multisample texture
arrays and is now enabled on both the GL backend and the D3D11
backend. The implementation is fairly simple, as it involves just
small changes in validation to allow multisampled framebuffer
attachments. The multiview rendering logic is exactly the same
regardless of whether multisampling is enabled.

For the most part the same tests are used to test both multisampled
and non-multisampled rendering. The tests will use a different
framebuffer setup depending on the test param. They resolve the
multisampled framebuffer to a non-multisampled framebuffer prior to
any readbacks from the framebuffer.

Some of the tests are adjusted so that they have the correct sub-pixel
positioning of multisampled quads, so there won't be any pixels that
would be just partially covered.

The tests don't have any tolerance for partially covered pixels - if
we find any platforms where the tests run into a sub-pixel positioning
corner case, tolerance may need to be added later.

BUG=angleproject:2775
TEST=angle_end2end_tests

Change-Id: I590d7f300a92ea5439f2720d9db14a7976db2e1d
Reviewed-on: https://chromium-review.googlesource.com/1221214
Commit-Queue: Olli Etuaho <[email protected]>
Reviewed-by: Geoff Lang <[email protected]>
2018-09-19 13:19:40 +00:00
Jeff Gilbert 5c72f28d1a Remove unused include global_state.h from validationEGL.cpp.
Bug: angleproject:2825
Change-Id: I34a7c520d31cf0a9321d5599046159ef9bf58be5
Reviewed-on: https://chromium-review.googlesource.com/1232973
Commit-Queue: Jamie Madill <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
2018-09-19 07:26:48 +00:00
Yuly Novikov dc8fb9374e Revert "Add FastVector for simple dynamic vector cases."
This reverts commit 4d45e7dc75.

Reason for revert: Memory leak detected during roll in https://ci.chromium.org/p/chromium/builders/luci.chromium.try/linux_chromium_asan_rel_ng/101750

Original change's description:
> Add FastVector for simple dynamic vector cases.
> 
> This optimized vector keeps an initial fixed size storage but has
> unbounded growth like a normal std::vector. It operates like a
> FixedVector initially but then switches the storage to an allocated
> pool when the element count exceeds the array limit.
> 
> This gives fast performance in the small case since no dynamic
> allocation is needed. It also handles the "slow" big case.
> 
> Bug: angleproject:2763
> Change-Id: I9c002b205bd4ac9fc171d1fdc42bc8ea5fe8dabe
> Reviewed-on: https://chromium-review.googlesource.com/1227794
> Reviewed-by: Shahbaz Youssefi <[email protected]>
> Commit-Queue: Jamie Madill <[email protected]>

[email protected],[email protected],[email protected]

Change-Id: Iaec76244cc736a8469b80bfc8534fb0fd6c49e11
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: angleproject:2763
Reviewed-on: https://chromium-review.googlesource.com/1232978
Reviewed-by: Yuly Novikov <[email protected]>
Commit-Queue: Yuly Novikov <[email protected]>
2018-09-19 01:37:40 +00:00
jchen10 99118c1c1d Improve dirtybits for compute
For D3D11 backend, dirtybits are used to sync and update state
for compute.
For GL backend, mProgramUniformBuffersDirty,
mProgramAtomicCounterBuffersDirty, mProgramImagesDirty are newly
applied.

Bug: angleproject:2814

Change-Id: Ia459ca26705b7c685179d64e0c934535bf16741f
Reviewed-on: https://chromium-review.googlesource.com/1215245
Reviewed-by: Jamie Madill <[email protected]>
Reviewed-by: Geoff Lang <[email protected]>
Commit-Queue: Jie A Chen <[email protected]>
2018-09-19 00:51:04 +00:00
jchen10 a155bacf99 ParallelCompile: Parallelize shader translation
This changes to construct a new ShHandle of compiler for each Shader,
and use it to translate the shader source in a background thread.

Bug: chromium:849576

Change-Id: Ib49952c7292321ee6aa1c5996f8f7927f40d8f04
Reviewed-on: https://chromium-review.googlesource.com/1177195
Commit-Queue: Jie A Chen <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
2018-09-19 00:49:23 +00:00
Jamie Madill 4d45e7dc75 Add FastVector for simple dynamic vector cases.
This optimized vector keeps an initial fixed size storage but has
unbounded growth like a normal std::vector. It operates like a
FixedVector initially but then switches the storage to an allocated
pool when the element count exceeds the array limit.

This gives fast performance in the small case since no dynamic
allocation is needed. It also handles the "slow" big case.

Bug: angleproject:2763
Change-Id: I9c002b205bd4ac9fc171d1fdc42bc8ea5fe8dabe
Reviewed-on: https://chromium-review.googlesource.com/1227794
Reviewed-by: Shahbaz Youssefi <[email protected]>
Commit-Queue: Jamie Madill <[email protected]>
2018-09-18 20:38:32 +00:00
Jamie Madill 80efe08d4d Log Renderer string on Android displays.
This adds a custom logging step to DisplayAndroid and DisplayVkAndroid.
It's easiest to add to these two classes since we have no common info
logging code and other platforms may not want startup spam. It would
also be possible to put this into debug info hooks.

Bug: angleproject:2823
Change-Id: I12a1ea9e27880648d8a73a9e3faa56f318620cbe
Reviewed-on: https://chromium-review.googlesource.com/1230273
Reviewed-by: Ian Elliott <[email protected]>
Reviewed-by: Cody Northrop <[email protected]>
Commit-Queue: Cody Northrop <[email protected]>
2018-09-18 20:13:52 +00:00
Jamie Madill fcfd3382d4 More binding inlining.
Slight performance increase in binding related tests.

Bug: angleproject:2763
Change-Id: I4d14177adab678d596cd34b8f1b99f5309f017f0
Reviewed-on: https://chromium-review.googlesource.com/1227793
Commit-Queue: Jamie Madill <[email protected]>
Reviewed-by: Shahbaz Youssefi <[email protected]>
2018-09-18 18:46:46 +00:00
Jamie Madill 0fdb956d9c Re-land "Inline and micro-optimize more for perf tests.""
Re-land fixes memory leaks.

Using a custom array instead of std::vector speeds up the resource
manager. One reason is because calls to size() are implemented in many
implementations as a difference between two pointers. This sub size
implementations are slower than storing a simple size variable in a
custom class.

Also includes more inlining of hot spots functions.

Also includes a small unit test class for ResourceMap. And an unrelated
but small test fix for TextureLimisTest. Also a small unrelated fix for
a Transform Feedback test.

Increase the scores of the draw call perf test with texture and buffer
bindings and the buffer binding perf test.

Bug: angleproject:2763
Change-Id: Ic2f0f689107b2bf05c63da2ed6bbc9f0feea63f7
Reviewed-on: https://chromium-review.googlesource.com/1229033
Reviewed-by: Shahbaz Youssefi <[email protected]>
Commit-Queue: Jamie Madill <[email protected]>
2018-09-18 16:14:49 +00:00
jchen10 95277a300f ES31: Add DispatchComputeIndirect support for D3D11
BUG=angleproject:2270
TEST=angle_end2end_tests.ComputeShaderTest.DispatchComputeIndirect/ES3_1_D3D11

Change-Id: I29bd888ce1e7e3e09b5635699a36164cd97cd7de
Reviewed-on: https://chromium-review.googlesource.com/1209563
Reviewed-by: Geoff Lang <[email protected]>
Commit-Queue: Jie A Chen <[email protected]>
2018-09-18 02:17:36 +00:00
Yuly Novikov 98a3e078c0 Revert "Inline and micro-optimize more for perf tests."
This reverts commit 57ff6f95f1.

Reason for revert: Memory leaks detected during roll in https://ci.chromium.org/p/chromium/builders/luci.chromium.try/linux_chromium_asan_rel_ng/100284

Original change's description:
> Inline and micro-optimize more for perf tests.
> 
> Using a custom array instead of std::vector speeds up the resource
> manager. One reason is because calls to size() are implemented in many
> implementations as a difference between two pointers. This sub size
> implementations are slower than storing a simple size variable in a
> custom class.
> 
> Also includes more inlining of hot spots functions.
> 
> Also includes a small unit test class for ResourceMap. And an unrelated
> but small test fix for TextureLimisTest. Also a small unrelated fix for
> a Transform Feedback test.
> 
> Increase the scores of the draw call perf test with texture and buffer
> bindings and the buffer binding perf test.
> 
> Bug: angleproject:2763
> Change-Id: I41c327987db27ac45e6a62579f01e1cdc22e396c
> Reviewed-on: https://chromium-review.googlesource.com/1171510
> Reviewed-by: Shahbaz Youssefi <[email protected]>
> Reviewed-by: Jamie Madill <[email protected]>
> Commit-Queue: Jamie Madill <[email protected]>

[email protected],[email protected],[email protected],[email protected]

Change-Id: Ie047289c9bf23a842c3cbb9692c811da0534991c
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: angleproject:2763
Reviewed-on: https://chromium-review.googlesource.com/1228893
Reviewed-by: Yuly Novikov <[email protected]>
Commit-Queue: Yuly Novikov <[email protected]>
2018-09-17 19:40:29 +00:00
Till Rathmann a49f60fee7 D3D11: Resolve multisampled EGL surfaces at eglSwapBuffers
Support for multisampled EGL surfaces was added in
151d5de (2017-04-13, "Enable MSAA for texture client buffers")
but the resolve step was missing because it was not needed for
EGL_ANGLE_d3d_texture_client_buffer. However, when using MSAA
with a regular EGL surface then resolving is required to get
an antialiased image.
Please note that the new test case CreateSurfaceWithMSAA does
actually not test the newly added resolve step because the
resolve is performed by the glReadPixels() call there.
So it is rather a general test if MSAA works for EGL surfaces.

TEST=angle_end2end_tests.EGLSurfaceTest.CreateSurfaceWithMSAA

Change-Id: Ieafd6877fa510d5e16c0d9c6872c31fa73efa86c
Reviewed-on: https://chromium-review.googlesource.com/1181138
Reviewed-by: Geoff Lang <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
Commit-Queue: Geoff Lang <[email protected]>
2018-09-17 17:55:05 +00:00
Jamie Madill 57ff6f95f1 Inline and micro-optimize more for perf tests.
Using a custom array instead of std::vector speeds up the resource
manager. One reason is because calls to size() are implemented in many
implementations as a difference between two pointers. This sub size
implementations are slower than storing a simple size variable in a
custom class.

Also includes more inlining of hot spots functions.

Also includes a small unit test class for ResourceMap. And an unrelated
but small test fix for TextureLimisTest. Also a small unrelated fix for
a Transform Feedback test.

Increase the scores of the draw call perf test with texture and buffer
bindings and the buffer binding perf test.

Bug: angleproject:2763
Change-Id: I41c327987db27ac45e6a62579f01e1cdc22e396c
Reviewed-on: https://chromium-review.googlesource.com/1171510
Reviewed-by: Shahbaz Youssefi <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
Commit-Queue: Jamie Madill <[email protected]>
2018-09-17 13:50:00 +00:00
jchen10 bb2f2c43dc Squash State dirty bits for CHROMIUM_path_rendering
Currently we limit the maximum of State bits to 64 for performance
consideration. To accommodate new ES31 states, we have to pick and
squash some existing bits which are less hot.

Bug: angleproject:2814

Change-Id: I8fc19286bbf8d8273949da8d986a8b1587fa105e
Reviewed-on: https://chromium-review.googlesource.com/1227069
Reviewed-by: Jie A Chen <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
Commit-Queue: Jie A Chen <[email protected]>
2018-09-17 09:36:04 +00:00
Qin Jiajia 017bda4296 Fix the ASSERT error
This change adds shader type checking before entering
initializeOutputVariables.

BUG: angleproject:2821
Change-Id: Ib931031f2fc187f1f2a1821a09664bbe172a5e90
Reviewed-on: https://chromium-review.googlesource.com/1226229
Commit-Queue: Jiajia Qin <[email protected]>
Reviewed-by: Corentin Wallez <[email protected]>
2018-09-17 09:15:31 +00:00
Courtney Goeltzenleuchter 62114aae85 glBufferSubData: Exit early if size is zero
glBufferSubData is calling vkMapMemory with a size of zero is invalid.
Check for that and exit early if found.

Bug: angleproject:2790

Change-Id: I965badeb3aa2cec1adc24dd7ff5695f8aa3e553d
Reviewed-on: https://chromium-review.googlesource.com/1194610
Commit-Queue: Courtney Goeltzenleuchter <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
Reviewed-by: Yuly Novikov <[email protected]>
2018-09-14 20:27:44 +00:00
Jamie Madill 4230d4847f Finish fixing EGL enums.
This removes the temporary defines now that Chromium is up-to-date.

Bug: angleproject:2806
Change-Id: I8e3308d6b80e49c2b2a7a698ee5d8ad40f442475
Reviewed-on: https://chromium-review.googlesource.com/1227031
Reviewed-by: Jamie Madill <[email protected]>
Commit-Queue: Jamie Madill <[email protected]>
2018-09-14 19:01:41 +00:00
Jamie Madill 3f3b358f0c Vulkan: Fix cube map attachment clears and readpixels.
These were both missing the correct layer offset. Cache the layer
inside the RenderTargetVk for easy access.

Bug: angleproject:2470
Change-Id: I690dbf0702d7ec52f44ba0a9429b6ef0e51baf6b
Reviewed-on: https://chromium-review.googlesource.com/1225910
Commit-Queue: Jamie Madill <[email protected]>
Reviewed-by: Shahbaz Youssefi <[email protected]>
Reviewed-by: Yuly Novikov <[email protected]>
2018-09-14 19:01:09 +00:00
Jamie Madill 7f2329398f Run git cl format on several files.
Bug: angleproject:2763
Change-Id: Idcb8a714a6dccdff3dd953679e17a7314866a37d
Reviewed-on: https://chromium-review.googlesource.com/1214206
Commit-Queue: Jamie Madill <[email protected]>
Reviewed-by: Shahbaz Youssefi <[email protected]>
Reviewed-by: Frank Henigman <[email protected]>
2018-09-13 22:04:01 +00:00
Jamie Madill 8a5619147a Pack SamplerState into small struct.
Is much faster for completeness cache checks in syncProgramTextures.

Bug: angleproject:2763
Change-Id: Iffdacbb8a4f6640caa5051643c379a7b4c3311b6
Reviewed-on: https://chromium-review.googlesource.com/1171508
Commit-Queue: Jamie Madill <[email protected]>
Reviewed-by: Shahbaz Youssefi <[email protected]>
Reviewed-by: Yuly Novikov <[email protected]>
2018-09-13 22:03:11 +00:00
Jamie Madill 097d3c0cb1 Make SamplerState a contained class.
This will more easily allow us to use a cached completeness comparison
value. The cached value only gets updated on certain setters.

Bug: angleproject:2763
Change-Id: Ib80db8517560617087ae8360f7af69d6c2392b76
Reviewed-on: https://chromium-review.googlesource.com/1171507
Reviewed-by: Shahbaz Youssefi <[email protected]>
Reviewed-by: Frank Henigman <[email protected]>
Commit-Queue: Jamie Madill <[email protected]>
2018-09-13 22:00:20 +00:00
Courtney Goeltzenleuchter f0d258c32b Vulkan: Emulate eglSwapBuffersWithDamage with full swap
Android expects to use eglSwapBuffersWithDamage so implement that
for Vulkan backend.

BUG=angleproject:2464

Change-Id: I8d599e70e6c8fee92b530d472dc97e3996630458
Reviewed-on: https://chromium-review.googlesource.com/1220066
Commit-Queue: Courtney Goeltzenleuchter <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
2018-09-13 18:50:03 +00:00
Jamie Madill f4d429c1cb Fix EGL enum allocation.
The following enums had a small typo causing them to be takend from an
unused block:

EGL_CONTEXT_WEBGL_COMPATIBILITY_ANGLE
EGL_CONTEXT_BIND_GENERATES_RESOURCE_CHROMIUM
EGL_DISPLAY_TEXTURE_SHARE_GROUP_ANGLE

Fix this by temporarily defining a secondary enum. Once Chromium is
fixed upstream we can remove the temporary enum.

Reported by [email protected].

Bug: angleproject:2806
Change-Id: I2ce1dec0a30d5e83f2bec0ae243fd860cbcea4fc
Reviewed-on: https://chromium-review.googlesource.com/1220371
Commit-Queue: Jamie Madill <[email protected]>
Reviewed-by: Yuly Novikov <[email protected]>
2018-09-13 16:19:36 +00:00
Jamie Madill 17dff6d2f9 Vulkan: Update LineLoopTest expectations.
One test was working but the suppression was not lifted. The other test
had no issue filed.

Bug: angleproject:2802
Change-Id: I88cd082b2edeca30ec4a8406809af749bb6ce152
Reviewed-on: https://chromium-review.googlesource.com/1200367
Reviewed-by: Jamie Madill <[email protected]>
Commit-Queue: Jamie Madill <[email protected]>
2018-09-13 16:17:38 +00:00
Jamie Madill 16e28fd3f2 More micro-optimization for draw call validation.
Mostly inlining checks on the hot draw call path.
Slight increase in draw call validation performance. (Up to 13%)

Bug: angleproject:2747
Change-Id: I34c4d7f412c3bca5e559e9bfb5689c0618bb7536
Reviewed-on: https://chromium-review.googlesource.com/1171506
Reviewed-by: Shahbaz Youssefi <[email protected]>
Reviewed-by: Yuly Novikov <[email protected]>
Commit-Queue: Jamie Madill <[email protected]>
2018-09-13 15:28:05 +00:00
Jamie Madill 526a6f6b9f Cache valid draw modes for draw calls.
This optimizes some of our dynamic switching. It uses packed enum maps.

Bug: angleproject:2747
Change-Id: Ibd2f9306d066f2fd9eb64c99a25668b7ba5c009c
Reviewed-on: https://chromium-review.googlesource.com/1171505
Commit-Queue: Jamie Madill <[email protected]>
Reviewed-by: Frank Henigman <[email protected]>
2018-09-13 15:25:39 +00:00