This test appears to be flaky.
Bug: angleproject:2896
Change-Id: Ib0c0ac9ab170edf0f31506f847307bee9b78f770
Reviewed-on: https://chromium-review.googlesource.com/c/1286913
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
This allows us to view the timeline of events in the trace event
browser. We can extend this to do GPU timestamp queries and analyze
when work is actually in flight.
The trace is enabled in standalone ANGLE only using the flag
--enable-trace with angle_perftests. You can also optionally specify
the trace output file with --trace-file <blah>. The default file is
ANGLETrace.json.
Bug: angleproject:2781
Change-Id: I871f28545d9bf18220b55aaf69e9554dcb4c834d
Reviewed-on: https://chromium-review.googlesource.com/c/1259763
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
A semaphore pool is implemented to allow dynamic allocation of
semaphores as needed when breaking up a frame with flushes. The pool is
used both for acquiring the next image and for chaining mid-frame
submissions.
RendererVk::flush() is changed so that instead of taking the wait/signal
semaphores as parameters, it would use the last known signaled semaphore
as wait semaphore and allocates a semaphore for signaling. It would
additionally wait for any extra semaphore provided externally (i.e. the
surface's image acquire semaphore).
Bug: angleproject:2504
Change-Id: Iecd2d5535230c48b26a6b7d078710af8730121da
Reviewed-on: https://chromium-review.googlesource.com/c/1276805
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Vulkan wrapper functions are fairly straightforward. They call the
Vulkan function and return immediately. The specialized macros
introduced in this commit take care of the final return for brevity of
the warpper.
Additionally, this commit gets rid of ANGLE_EMPTY_STATEMENT in favor of
the more robust macro definition using do {} while (0).
Bug: none
Change-Id: Ia7c68962d1aeee2c06ef210122b345b1a2e54f08
Reviewed-on: https://chromium-review.googlesource.com/c/1262020
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
A bug in clang is preventing the use of link time optimization.
Bug: angleproject:2892
Change-Id: Ibe845e82f0db48233f8590189163fd8a5a8df634
Reviewed-on: https://chromium-review.googlesource.com/c/1263905
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Sequences of many frames with uniform updates could lead to a bug where
we attempt to delete descriptor sets that are still in use. To trigger
the bug we need to write enough uniform data to trigger a descriptor
set to be freed. This would correctly trigger refresh sets in the
Program. But if there was a second program idle in the background that
also allocated descriptors from the old pool, the bug would manifest.
Fix this by storing a shared handle to the descriptor pool in the
Program. The dynamic descriptor pool won't recycle descriptor pools
internally unless there are zero outstanding references to the pool.
We could also improve this in a resource sharing situation by keeping
a single shared dynamic descriptor pool per share group.
Includes a contribution from tobine@google.com that adds a test to
cover the bug.
Bug: angleproject:2863
Change-Id: Id585b85f33f8cfa3772ceff3af512d1e4fb0b75a
Reviewed-on: https://chromium-review.googlesource.com/c/1271919
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Re-land skips ProgramInterfaceTestES31.GetProgramInterface/ES3_1_D3D11 to pass
the bots. In fact, ProgramInterfaceTestES31.GetProgramInterface/ES3_1_D3D11 is
not a regression. The reverted CL added more SSBO features and triggered the
failure. To enable ProgramInterfaceTestES31.GetProgramInterface/ES3_1_D3D11,
we should support SSBO in render pipeline. This needs to bind SSBO to UAV
registers in link time instead of compile time since output variables also
occupies the UAVs. Let's enable this test when we support SSBO in render
pipeline. Currently, we shouldn't block the SSBO implementation in some common
features.
Bug: angleproject:1951
Change-Id: Ic339e8327e79335e6db1d86bedf0072635976f5f
Reviewed-on: https://chromium-review.googlesource.com/c/1282277
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jiajia Qin <jiajia.qin@intel.com>
The enum VertexFormatType is redundant with angle::FormatID. The Vulkan
back end has already eschewed VertexFormatType, this change updates the
D3D back ends.
BUG=angleproject:2531
Change-Id: I67ea2203ca80be828f4c757a37810fe67a279364
Reviewed-on: https://chromium-review.googlesource.com/c/1263899
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Frank Henigman <fjhenigman@chromium.org>
The query nodes now output BeginQuery or EndQuery based on the node's
function, instead of just Query.
Bug: angleproject:2379
Change-Id: I6ba38031c40b88e8927b31cdf14e4fdc2474624e
Reviewed-on: https://chromium-review.googlesource.com/c/1277485
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
This patch implements the translation of textureGather[Offset] on
integer and unsigned integer format textures on D3D11.
According to MSDN, Gather[Red|Green|Blue|Alpha] can be used on integer
and unsigned integer format textures with float texture coordinates:
https://docs.microsoft.com/en-us/windows/desktop/direct3dhlsl/dx-graphics-hlsl-to-gather
Currently the dEQP tests on TextureGather[Offset] on cube map textures
in integer or unsigned formats still cannot pass. This issue is under
investigation.
Bug: angleproject:2826
Test: dEQP-GLES31.functional.texture.gather.basic.2d.*
dEQP-GLES31.functional.texture.gather.basic.2d_array.*
dEQP-GLES31.functional.texture.gather.offset.min_required_offset.2d.*
dEQP-GLES31.functional.texture.gather.offset.min_required_offset.2d_array.*
dEQP-GLES31.functional.texture.gather.offset.implementation_offset.2d.*
dEQP-GLES31.functional.texture.gather.offset.implementation_offset.2d_array.*
Change-Id: If049dc395fb17cd34dec902630e3a1154e5d4806
Reviewed-on: https://chromium-review.googlesource.com/c/1271926
Commit-Queue: Jiawei Shao <jiawei.shao@intel.com>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
glGetVertexAttribIuiv previously returned an incorrect value
for GL_VERTEX_ATTRIB_ARRAY_DIVISOR, because the divisor was
treated as an integer even though it is an unsigned integer.
BUG=angleproject:2281
Change-Id: I4d1c9df15244db855c6a000fc8fb6cc786bfcb85
Reviewed-on: https://chromium-review.googlesource.com/c/1273300
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Geoff Lang <geofflang@chromium.org>
This reverts commit 671809e62e.
Reason for revert: Regresses angle_end2end_test:
ProgramInterfaceTestES31.GetProgramInterface/ES3_1_D3D11
Warning: compileToBinary(232):
C:\fakepath(36,21-40): error X4509: UAV registers live in the same name space as outputs, so they must be bound to at least u1, manual bind to slot u0 failed
The new test and this CL landed at nearly the same time. This CL breaks the test but it wasn't run on the CQ.
Failure link:
https://ci.chromium.org/p/chromium/builders/luci.chromium.ci/Win10%20FYI%20Release%20%28NVIDIA%29/2717
Original change's description:
> ES31: Add vector and matrix support in SSBO for D3D
>
> Bug: angleproject:1951
>
> Change-Id: I19d4218b28770464e4cb38027cce694e2a817b5b
> Reviewed-on: https://chromium-review.googlesource.com/c/1269827
> Commit-Queue: Jiajia Qin <jiajia.qin@intel.com>
> Reviewed-by: Geoff Lang <geofflang@chromium.org>
TBR=geofflang@chromium.org,jmadill@chromium.org,cwallez@chromium.org,jiajia.qin@intel.com
Change-Id: I54cda962e1361372f06e9e3bd667fa9c0ecf38dc
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: angleproject:1951
Reviewed-on: https://chromium-review.googlesource.com/c/1278102
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
This change collects shader storage blocks info for d3d backend. With this
change, program interface APIs can get correct SSBO information for D3D.
Bug: angleproject:1920
Change-Id: I6e2414494d0e8240bcb1d0ddc3d9a292eb7158ee
Reviewed-on: https://chromium-review.googlesource.com/c/1269824
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Jiajia Qin <jiajia.qin@intel.com>
After validation, the enums are simply forwarded to the native
drivers. The BPTC formats are supported on both OpenGL and D3D.
The included test coverage covers the API quite well, but only has
basic coverage for correct decoding of texture data. More coverage for
texture data could be added later.
BUG=angleproject:2869
TEST=angle_end2end_tests
Change-Id: I3de37972dcf13c6fa3fc1bc429a2627523a4a082
Reviewed-on: https://chromium-review.googlesource.com/c/1261675
Commit-Queue: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
This gives the same or slightly better performance in the ProgramDraw
perf test. Also only set the Program object as dirty when there are
dirty bits set in the Program itself.
Bug: angleproject:2877
Change-Id: I07b428b40d3e3c24e0a42c970524756b6dc3a30e
Reviewed-on: https://chromium-review.googlesource.com/c/1271475
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
This method is only called in one place. Inlining reduces the need to
make a jump and push/pop variables from the stack.
It also adds a specialized error handler for validation errors. This
reduces the amount of code generated for errors. The prior method
generates a lot of code when dealing with string streams.
Improves performance of the binding performance test.
Bug: angleproject:2763
Change-Id: I52af7046b398072975bf5bda583efac9a9b9a8cb
Reviewed-on: https://chromium-review.googlesource.com/c/1270219
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Yuly Novikov <ynovikov@google.com>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Also don't return errors from the object release methods. Not returning
errors reduces the amount of code generated. Also we shouldn't be
exiting early from destructor type functions.
Increases object binding performance.
Bug: angleproject:2877
Change-Id: Ieb8120d885b946915e355419825e1f52f31d7b49
Reviewed-on: https://chromium-review.googlesource.com/c/1270218
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
//build/config/gcc:rpath_for_built_shared_libraries was supposed to be
used to add . to rpath (which affected only release. I didn't
investigate how it was affecting debug). This resulted in
libVkICD_mock_icd.so not being found and vulkan_null tests being
ignored.
Change-Id: I71fb8578f873e4bed602b2c3dcf6d93240dcf30e
Reviewed-on: https://chromium-review.googlesource.com/c/1272496
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
This can be used to mask out inappropriate local dirty bits.
Bug: angleproject:2763
Change-Id: Ie46e464df0dc719c963ff9f7066d42eb5a028262
Reviewed-on: https://chromium-review.googlesource.com/c/1264062
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Yuly Novikov <ynovikov@google.com>
This switch can be cached in a very fast packed map. The map contents
only change if different extensions are exposed. This reduces the
number of instructions we hit in ValidateBindTexture.
Bug: angleproject:2763
Change-Id: I6ba8a4124d85e4c193d0dee3e03e50713d51b1f4
Reviewed-on: https://chromium-review.googlesource.com/c/1262739
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Yuly Novikov <ynovikov@google.com>
The old implementation missed considering compute program would also enter
into applyActiveAttribLocationsMask. However, there was no bindVertexArray
before updateAttribEnabled which resulted the previous VAO state was modified
in unknown. And that's why ComputeBoids example wouldn't work correctly.
This change adds a checking to not enter propagateProgramToVAO if it's a
compute program since compute shader doesn't have vertex attributes. And
an ASSERT is added to make sure that the right VAO is bound when
updateAttribEnabled is called in applyActiveAttribLocationsMask.
Bug: angleproject:2810
Change-Id: I6e77853498a527ef3b755bbb1da5826a9134b164
Reviewed-on: https://chromium-review.googlesource.com/c/1226227
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Jiajia Qin <jiajia.qin@intel.com>
This covers most of the hot paths used in draw calls. Gives in the
order of a 5% reduction in draw call overhead.
Bug: angleproject:2491
Change-Id: I2d53afb1163eaceed61fb9cd9ce6c1267c85c0fa
Reviewed-on: https://chromium-review.googlesource.com/c/1258149
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Replace these with ANGLE_CHECK_*_ALLOC and ANGLE_CHECK_*_MATH depending
on the specific error type.
Bug: angleproject:2491
Change-Id: Ic4395101fe701c563ae2b92aa2c55c93b934a7de
Reviewed-on: https://chromium-review.googlesource.com/c/1262737
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Frank Henigman <fjhenigman@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
To minimize system impact, have feature configuration utility
live in it's own library.
Bug=angleproject:2418
Change-Id: Ic8e3862965e515ded7e1a6078a7b9f8b92878818
Reviewed-on: https://chromium-review.googlesource.com/c/1269822
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Yuly Novikov <ynovikov@google.com>
Commit-Queue: Courtney Goeltzenleuchter <courtneygo@google.com>
Begin and end queries insert an execution barrier in the command graph
to ensure the commands around them are not reordered w.r.t to the query.
Also, these commands cannot be recorded in separate secondary command
buffers. Therefore, special-function nodes are created to perform the
begin and end query calls on the final primary command buffer.
Bug: angleproject:2855
Change-Id: Ie216dfdd6a2009deaaf744fd15d2db6899dd93e9
Reviewed-on: https://chromium-review.googlesource.com/c/1259762
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Some of these are targeting our workaround for a mac bug. The bug was
that the driver was somehow modifying output attachments that the
program wasn't writing to. A new test shows a bug where we wouldn't
re-sync the state properly after a clear.
Also adds more pretty printing for GLColor.
Bug: angleproject:2872
Change-Id: I5485893b5f1b269c5407678db27978a789f7acc6
Reviewed-on: https://chromium-review.googlesource.com/c/1269255
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
To match behavior of ALOGV in Android system code, disable output
in release builds.
Bug=angleproject:2418
Change-Id: I657ec366249f9d5defe9b05fe298099c47389580
Reviewed-on: https://chromium-review.googlesource.com/c/1269819
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Ian Elliott <ianelliott@google.com>
Commit-Queue: Courtney Goeltzenleuchter <courtneygo@google.com>
If the Vulkan backend is available, use it on Android.
This way ANGLE built for the ANGLE apk always uses Vulkan.
ANGLE built for use in Chrome keeps GL. At least for now.
Bug=angleproject:2418
Change-Id: Ic7796c74821a44b856a596d31b3de09e7ca47ede
Reviewed-on: https://chromium-review.googlesource.com/c/1265504
Reviewed-by: Ian Elliott <ianelliott@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Yuly Novikov <ynovikov@google.com>
Commit-Queue: Courtney Goeltzenleuchter <courtneygo@google.com>
Some dead code and duplicate data are cleaned up from the compiler.
Several parameters can be accessed directly from ShBuiltInResources
instead of creating a copy in TCompiler.
This also encapsulates some TCompiler member functions as private and
changes the remaining unprefixed TCompiler member variable names to
start with the m prefix.
BUG=angleproject:2068
TEST=angle_unittests
Change-Id: I6690aaf538b17e0f45460660272a21f82f1808a0
Reviewed-on: https://chromium-review.googlesource.com/c/1267503
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
When EOpIndexDirect/EOpIndexIndirect/EOpIndexDirectStruct/TIntermSwizzle
appear in [] in ssbo access chain, we should transfer the process of them to
OutputHLSL.
For example:
instance.v[gl_GlobalInvocationID.x] = data;
// becomes
float_Store(dx_instance, 0 + 16 * gl_GlobalInvocationID.x, _data);
instance.v[s.index[0].x] = data;
// becomes
float_Store(dx_instance, 0 + 16 * _s.index[0].x, _data);
Bug: angleproject:1951
Change-Id: I333e238400a10a799a6294f8759cf9c4ef2451c8
Reviewed-on: https://chromium-review.googlesource.com/c/1250661
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Jiajia Qin <jiajia.qin@intel.com>
This patch implements translating textureGather[Offset] into HLSL
when the sampler is a shadow sampler. The related HLSL function
should be GatherCmp().
According to the definition of textureGatherOffset():
([ESSL 3.1] Chapter 8.9.3 Page 138)
- gvec4 textureGatherOffset(gsampler2D sampler, vec2 P,
ivec2 offset, [,int comp])
- vec4 textureGatherOffset(sampler2DShadow sampler, vec2 P,
float refZ, ivec2 offset)
We need to add parameter "refZ" before "offset" when the sampler
is a shadow sampler.
Bug: angleproject:2826
Test: dEQP-GLES31.functional.texture.gather.basic.2d.depth32f.*
dEQP-GLES31.functional.texture.gather.basic.2d_array.depth32f.*
dEQP-GLES31.functional.texture.gather.basic.cube.depth32f.*
dEQP-GLES31.functional.texture.gather.offset.min_required_offset.2d.depth32f.*
dEQP-GLES31.functional.texture.gather.offset.min_required_offset.2d_array.depth32f.*
dEQP-GLES31.functional.texture.gather.offset.implementation_offset.2d.depth32f.*
dEQP-GLES31.functional.texture.gather.offset.implementation_offset.2d_array.depth32f.*
Change-Id: I9a7d095dd3cfa41aaefd14d012ed1f309abfc6d5
Reviewed-on: https://chromium-review.googlesource.com/c/1244081
Commit-Queue: Jiawei Shao <jiawei.shao@intel.com>
Reviewed-by: Jiajia Qin <jiajia.qin@intel.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
The default framebuffer is initialized with just one drawbuffer slot
so the number of drawbuffers needs to be validated before checking if
a buffer is attached.
BUG=angleproject:2831
TEST=angle_end2end_tests
Change-Id: I960c39357853d1cd4575b06a992cff33223ab3df
Reviewed-on: https://chromium-review.googlesource.com/c/1264518
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Using x = {}; before filling out each field, we can be sure any missing
field is 0 initialized. This in turn helps us not have to specify
certain fields that are generally unused (at the moment), such
as pNext.
Bug: angleproject:2860
Change-Id: Ia1fa2db3ecfb316673a02ac0c5e13e47e055a19f
Reviewed-on: https://chromium-review.googlesource.com/c/1259764
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Correctly sized void arrays can be needed after parsing has recovered
from an error and the code is trying to evaluate the constant value of
a node. Since now we just have a generic EOpConstruct op instead of
different ops for different types, we can simply remove the special
handling for void arrays in CreateZeroNode to create the arrays in the
correct size.
BUG=chromium:890581
TEST=angle_unittests
Change-Id: I48d96c9ef1d695cd8583a845fd4bd24a7aaf535c
Reviewed-on: https://chromium-review.googlesource.com/c/1264515
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Instead of returning a small struct from LinkProgram calls we use
angle::Result. Linking can have 3 cases:
- the link was successful -> angle::Result::Continue
- the link failed -> angle::Result::Incomplete
- there was an internal error -> angle::Result::Stop
Note that any unexpected Incomplete is still an error. Each function
that accepts Incomplete must check explicitly.
This is the last user of ErrorOrResult.
Bug: angleproject:2491
Change-Id: Idba23be27efe4b561720a4bdd8fe486b40779497
Reviewed-on: https://chromium-review.googlesource.com/c/1255645
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Yuly Novikov <ynovikov@google.com>
This adds GLES3 API support for EXT_blend_func_extended. The patch
includes the API entrypoints, validation and also implementation on
the desktop GL backend.
Instead of having built-in fragment color variables, ESSL 3.00 has
custom output variables, which can now be bound to either primary or
secondary output color locations. The "index" set to a custom output
variable determines whether it's used a primary or secondary blending
source color.
The shader layout qualifier takes precedence over the bind call. This
is not specified in the EXT spec, but is specified in desktop OpenGL
specs.
BUG=angleproject:1085
TEST=angle_end2end_tests
Change-Id: Ia24e8e5dadcc165e5e8fbd7c653c7fab6217db88
Reviewed-on: https://chromium-review.googlesource.com/c/1249361
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
This saves a lot of extra work when updating a Texture.
Bug: angleproject:2763
Change-Id: I87e310ef4f847713123bd24711e1166949ff95d2
Reviewed-on: https://chromium-review.googlesource.com/c/1254043
Reviewed-by: Yuly Novikov <ynovikov@google.com>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>