|
da066657
|
2017-06-21T11:33:48
|
|
Fix invalid storage recovery on FL 9_3.
This problem was uncovered when I inadvertently changed TextureD3D to
delete its storage before its images. Small mips of compressed
textures must use a nullptr argument to CopySubResource, otherwise
the runtime complains about un-aligned sizes.
Also change the class to delete the Images before the Storage again
so we don't wastefully recover the images before deleting them. Also
change the Image pointers to use std::array and std::unique_ptr.
BUG=angleproject:1156
BUG=angleproject:2077
Change-Id: Idb2e53835b7a9b973285ff0781f70b25f05c77aa
Reviewed-on: https://chromium-review.googlesource.com/543438
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
6be3d4cd
|
2017-06-16T15:54:15
|
|
Fix incorrect format set being used for destination copy formats.
This validation matches Chrome's.
BUG=angleproject:1932
Change-Id: I2dc75c21924231ab75000dff92ef92cbc12adf55
Reviewed-on: https://chromium-review.googlesource.com/538956
Reviewed-by: Geoff Lang <geofflang@chromium.org>
|
|
e7bd218c
|
2017-06-16T16:13:13
|
|
Accept GL_FRAGMENT_SHADER_DERIVATIVE_HINT in ES3 contexts.
BUG=angleproject:2070
TEST=deqp/functional/gles3/shaderderivate_dfdx
TEST=deqp/functional/gles3/shaderderivate_dfdy
TEST=deqp/functional/gles3/shaderderivate_fwidth
Change-Id: I4e10343036a813c122ca41913324051b5c02e785
Reviewed-on: https://chromium-review.googlesource.com/538861
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
914b79a6
|
2017-06-19T16:03:19
|
|
Fix parsing GLSL loop conditions that declare a variable
Now the variable declaration is included in the AST, so that the loop
body may refer to the variable. The variable declaration is placed in
a block that wraps the loop. This way we can still only have
TIntermTyped loop conditions in the AST, which keeps the code dealing
with loops fairly simple and type safe.
This change includes reversing the return value of executeInitializer,
so that it returns true on success and false on error. This is more in
line with other ParseContext member functions.
BUG=angleproject:2073
TEST=angle_end2end_tests
Change-Id: I5c4ecbf1b438d3fff6d6237c0dcf191e2a19664c
Reviewed-on: https://chromium-review.googlesource.com/539639
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
|
|
8700a98e
|
2017-06-13T10:15:13
|
|
Fix missing return statement in VertexFormat validation.
BUG=angleproject:2063
Change-Id: Idc1c7b42ed0a2545d9ad4f3c645d0dea2c85c11e
Reviewed-on: https://chromium-review.googlesource.com/533273
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Geoff Lang <geofflang@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>
|
|
35bcad42
|
2017-06-06T15:12:27
|
|
Optimize builtin function emulator class.
This refactor uses a generator to produce static arrays instead of
using a bunch of std::map inserting statements. It speeds up shader
translation because every shader compile would create and tear down
this table.
Currently it is implemented as a flat array, but in the future we
could use compile-time hashing to implement faster lookup.
BUG=chromium:697758
Change-Id: I689f7de4d9b2c8c76095bb313f4c040116fc61d2
Reviewed-on: https://chromium-review.googlesource.com/521226
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Olli Etuaho <oetuaho@nvidia.com>
|
|
a71a98ee
|
2017-06-19T15:15:00
|
|
Allow '\' characters in shader source for WebGL2.
TEST=deqp/data/gles3/shaders/preprocessor.html
BUG=angleproject:2016
Change-Id: Ia5240a1ff65ebadc15604a5c3eb63042953c43a5
Reviewed-on: https://chromium-review.googlesource.com/540198
Commit-Queue: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
|
|
672f7f3f
|
2017-06-15T17:42:17
|
|
WebGL Compat: forbid client side arrays, even unused
BUG=angleproject:2064
Change-Id: I9a9c2df9a158799dbdc490446352cdf30fb87ca6
Reviewed-on: https://chromium-review.googlesource.com/537812
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
6260b7aa
|
2017-06-19T11:07:19
|
|
Fix kResourceTypeNames initialization
Due to a missing comma the kResourceTypeNames array contained a single
long (concatenated) string instead of NumResourceTypes independent
strings.
This incorrect initialization caused a crash in out-of-memory
situations, but this was only noticed on VC++ 2017 for some reason.
This fix adds the missing comma and uses a static_assert to ensure that
the array is initialized correctly.
BUG=chromium:727671,728226,731089
Change-Id: I9f0f3d3725b9f773505506513afb6c349db3a7fb
Reviewed-on: https://chromium-review.googlesource.com/539536
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
3cd0dd37
|
2017-06-06T14:43:30
|
|
Don't expose non-conformant multisampling modes on GL
Some NVIDIA GL drivers expose non-conformant multisampling modes. The
conformance of multisampling modes can be queried using the extension
NV_internalformat_sample_query. Use it to filter out the
non-conformant modes from the modes that are exposed by ANGLE.
The MAX_SAMPLES value and other similar values stored in caps also
need to be lowered to match the maximum number of samples exposed
for required formats.
There seems to be an NVIDIA driver bug related to querying
STENCIL_INDEX8 multisample format. Work around this by querying
DEPTH24_STENCIL8 instead.
There's also some confusion around whether RGB9_E5 should be
renderable. Once the floating point texture extensions got rolled
into the core GL spec, it was eventually made clear that RGB9_E5
is intended not to be renderable. The extension specs that predate
float textures in the core spec do suggest that it would be
renderable, but in practice drivers that advertise the extension
strings don't reliably implement RGB9_E5 as renderable. Solve this
by disabling it as a renderable format and adding an explanatory
comment.
BUG=chromium:682815
TEST=angle_end2end_tests,
dEQP-GLES31.functional.state_query.internal_format.renderbuffer.*
Change-Id: I2218e3a23ea7b48a0615fea77a91897dc7d5fe9e
Reviewed-on: https://chromium-review.googlesource.com/525515
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
|
|
30ca54f4
|
2017-06-19T11:45:06
|
|
D3D11: Fix mingw64 build.
Two small build errors were breaking ming64.
BUG=angleproject:2071
Change-Id: Ia5c8e629e77c09f151b888364e92475b4c3f1709
Reviewed-on: https://chromium-review.googlesource.com/539796
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
125e220e
|
2017-06-19T13:23:18
|
|
Track LevelInfoGL per cube map face.
When transitioning between formats in cube maps, tracking of luma
workaround information would become incorrect because it was only tracked
per-level.
There are no failing tests due to this because once the cube map is
complete again, the tracking is correct.
TEST=conformance/more/conformance/quickCheckAPI-S_V.html
BUG=angleproject:2074
Change-Id: If4e1e94061208f0cf3668b2bd6be59a9a21e42b6
Reviewed-on: https://chromium-review.googlesource.com/539956
Commit-Queue: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
|
|
fe54834f
|
2017-06-19T11:13:24
|
|
Proliferate gl::Context.
This enables a few small things: it will enable making the platform
a property of the Display rather than a global. The same goes for the
global logging annotator. Also it ensures all back-end implementations
have access to the GL / EGL state when available.
Also introduces a smart pointer helper class to angleutils for objects
that prefer to be destroyed with a context (gl::Context/egl::Display)
parameter. We were using std::unique_ptr in a few places that would
not work well with these objects.
BUG=angleproject:1156
Change-Id: I59e288a3d6f766ff8a0f4b48ff3a1fbf7489daba
Reviewed-on: https://chromium-review.googlesource.com/529706
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
|
|
61e16b44
|
2017-06-19T11:13:23
|
|
Context: Bind current display/surface.
Looking at the EGL spec, it says for eglGetCurrentDisplay:
"The display for the current context in the calling thread, for the
current rendering API, is returned."
This implies that MakeCurrent binds a display to a Context. There's
also pretty clear language for the read/draw Surface as well, that
they can only be bound to one Context/thread at a time. Hence we
don't need to duplicate this storage in the egl::Thread structure,
merely storing a pointer to the current Context, which has access
to the read/draw Surface and current Display.
BUG=angleproject:1156
Change-Id: Ia3b99d50b3591012c43e851834c1af02ff62a33f
Reviewed-on: https://chromium-review.googlesource.com/538865
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
12b0b399
|
2017-05-30T13:22:31
|
|
Clean up ValidateOutputs
Remove the validateOutputs method from Compiler and replace it with a
static method alongside the traverser. This encapsulates the
ValidateOutputs implementation better.
TEST=angle_unittests
BUG=angleproject:2068
Change-Id: I1788cb9726db41ca35fd0e746f8d48ced7fee74f
Reviewed-on: https://chromium-review.googlesource.com/535477
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
bb1b19b6
|
2017-06-16T16:59:00
|
|
Generate INVALID_OPERATION when the copy texture destination level is missing.
TEST=conformance2/textures/misc/tex-image-with-bad-args-from-dom-elements
BUG=angleproject:1932
Change-Id: I6e0e9213d86a72aa092131189ecaefa60afa4194
Reviewed-on: https://chromium-review.googlesource.com/538864
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Geoff Lang <geofflang@chromium.org>
|
|
638c7277
|
2017-06-13T15:50:26
|
|
Implement EGL_KHR_surfaceless_context for D3D, GL and NULL backends.
Skip all config attributes that have the value of EGL_DONT_CARE. From the
EGL 1.5 spec: "If EGL_DONT_CARE is specified as an attribute value, then
the attribute will not be checked.".
BUG=angleproject:1651
Change-Id: I30c95a1970543fb6f1d4b02d2babf3df61cad543
Reviewed-on: https://chromium-review.googlesource.com/533937
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Geoff Lang <geofflang@chromium.org>
|
|
e72595b4
|
2017-06-06T15:12:26
|
|
Rename EOpFaceForward to EOpFaceforward.
This mirrors the spec naming and makes auto-gen a little easier.
BUG=chromium:697758
Change-Id: I9bcbc2c874b9a93a6d542aedf2b239f01ee708ce
Reviewed-on: https://chromium-review.googlesource.com/526393
Reviewed-by: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
d04908bc
|
2017-06-09T14:15:35
|
|
Refactor ProgramBinary entry points.
These will need to set dirty bits for the program, and this is best
done via the Context.
BUG=angleproject:747
Change-Id: I1379d2d4be0e94206c0aa7cb1546aa1a591f23ff
Reviewed-on: https://chromium-review.googlesource.com/529767
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
2648d929
|
2017-06-15T11:36:47
|
|
Fix scanForWantedComponents not ignoring attribute values of 0.
Slightly refactor scanForWantedComponents to not iterate over every
attribute and only check the needed ones.
BUG=angleproject:2069
Change-Id: I77bab7764552093f79472809aad3594be351831a
Reviewed-on: https://chromium-review.googlesource.com/537132
Commit-Queue: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
165dcf15
|
2017-06-07T15:05:14
|
|
Allow CHROMIUM_copy_texture to copy to non-zero mips.
Fix some errors in the GL backend related to source and destination mipmap
targets.
BUG=angleproject:1356
Change-Id: I030529c8626f3bc30dbb4f7f859a02ba56e315e3
Reviewed-on: https://chromium-review.googlesource.com/527653
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Geoff Lang <geofflang@chromium.org>
|
|
8d471f90
|
2017-06-13T16:05:35
|
|
Make distinct header guards for anglebase.
BUG=angleproject:2065
Change-Id: I7783d4866a2e16e0cee79aecccb6d5ee1b74165d
Reviewed-on: https://chromium-review.googlesource.com/533724
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
97ee6548
|
2017-06-07T17:06:05
|
|
Shunt more code to StateManager11.
Previously the Renderer11 would call directly into the state manager
sync methods. Instead make a single updateState method, and make
several state sync methods private to the manager. Also rename them
to clarify they're for syncing state, not for direct use.
BUG=angleproject:1156
Change-Id: I94880a744e7ade3895fa2a312a2436ba4ef38dba
Reviewed-on: https://chromium-review.googlesource.com/529705
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Jamie Madill <jmadill@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>
|
|
c174db3a
|
2017-06-13T15:44:00
|
|
D3D11: Apply a non-null blendstate in masked depth clear.
In https://chromium-review.googlesource.com/c/453888/, we changed how
blendstates were applied in masked clears. This change would apply a
null blendstate when all color channels were disabled, but this seems
to have an issue on Intel Cherry View drivers. Work around this issue
by restoring the prior functionality of making a simple masked blend
state.
Also clean up some of the code style in the Clear11 class.
BUG=chromium:730126
Change-Id: I9a4044201b2f07e9483525513a59e19bb2a8bcd3
Reviewed-on: https://chromium-review.googlesource.com/533684
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
dbcced8e
|
2017-06-06T15:55:54
|
|
When validating image size, use format for SubImage calls.
internalFormat is GL_NONE when validating these calls for glTexSubImage
and leads to an expected minimum size of 0.
Add extra unsized formats that are never supported to the format tables.
These are needed for determining the size of input data.
BUG=angleproject:2054
Change-Id: Ic827a279a246ff92c9f279232574521692b1c6f2
Reviewed-on: https://chromium-review.googlesource.com/526356
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Geoff Lang <geofflang@chromium.org>
|
|
f18b8606
|
2017-06-13T15:39:40
|
|
Attempt to fix gyp build RangeChecks error.
This puts explicit dependencies from white_box_tests and perftests
on libANGLE. There may be one or two other places where it is
necessary.
BUG=None
Change-Id: Iaa7ea2cade8313c00a396a38f99b5bc8006105db
Reviewed-on: https://chromium-review.googlesource.com/533676
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
d222d454
|
2017-06-06T17:48:35
|
|
Use HashingMRUCache in InputLayoutCache.
This simplifies the state management code inside this manager. Also
it should improve the speed of lookups due to using hashing instead
of a tree lookup.
BUG=angleproject:1156
BUG=angleproject:2044
Change-Id: I19ea8dbac6f2dfd7d30dd403d77b66ba0aa85d73
Reviewed-on: https://chromium-review.googlesource.com/527693
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
|
|
34ca4f5b
|
2017-06-13T11:49:39
|
|
Remove Shader::getSemanticIndex.
This method doesn't really belong to GL, and was only used by the D3D
back-end to compute some attribute indexes. Simplify the code by
moving it into ProgramD3D. Also add the ability for the ShaderImpl to
assert that any pending compiles have resolved.
BUG=angleproject:1156
Change-Id: I0af3d3082ff8c908e6a87b9734989efbefd28808
Reviewed-on: https://chromium-review.googlesource.com/526336
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
cabdd1a0
|
2017-06-09T08:33:07
|
|
Clean up coding style issues in InstancingTest.cpp
This patch intends to clean up all coding style issues in
InstancingTest.cpp.
1. Replace SHADER_SOURCE by std::string
2. Use (expected, actual) as the order of the parameters
in ASSERT_NE
3. Replace C-style type cast operators into C++ ones.
4. Use ANGLE_GL_PROGRAM to build shader programs
5. Use constexpr when necessary
6. Other format changes done by 'git cl format'
BUG=angleproject:2005
Change-Id: I37d866c5df681160a66226bf5927dd6e00a6d6b2
Reviewed-on: https://chromium-review.googlesource.com/528649
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
|
|
dd5f27ee
|
2017-06-07T10:17:09
|
|
Make VertexBinding's member variables private
The patch decorates all members in VertexBinding as private and limits
access to them only through getters and setters. This makes it easier to
debug and keep track of any assignments to the class members.
BUG=angleproject:2062
TEST=angle_end2end_tests
Change-Id: Iddd49063d060f136bc9cf11c313a5af0931d433c
Reviewed-on: https://chromium-review.googlesource.com/530786
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
|
|
cdadb3ff
|
2017-06-09T15:13:30
|
|
Decouple ANGLETest functionality and test parameters
ANGLETest provides useful functionality for end2end tests, but it
cannot be used for tests which take other test parameters than the
platform. The patch introduces another level of abstraction by moving
all of ANGLETest's functionality to another class - ANGLETestBase -
which does not inherit from ::testing::TestWithParam<>. New tests can
either inherit from ANGLETest as before to have only platform
parameters, or they can inherit from ANGLETestBase and add handling
of custom test parameters.
Example:
// The new parameter type must inherit from PlatformParameters.
struct MyCustomParameters : PlatformParameters
{
bool mWorkaroundState;
};
class MyTest : public ANGLETestBase,
public ::testing::TestWithParam<MyCustomParameters>
{
protected:
void overrideWorkaroundsD3D(
angle::WorkaroundsD3D *workaroundsD3D) override
{
workaroundsD3D->myCustomWorkaround = GetParam().mWorkaroundState;
}
};
ANGLE_INSTANTIATE_TEST(MyTest, MyCustomParameters(ES3_D3D11(), false),
MyCustomParameters(ES3_D3D11(), true));
BUG=angleproject:2062
TEST=angle_end2end_tests
Change-Id: Ia36e429cff8c4c291fc87a286a1d1a3004d6fad6
Reviewed-on: https://chromium-review.googlesource.com/530945
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
9f01a0d4
|
2017-06-12T10:54:53
|
|
Fix RewriteElseBlocks using a non-prefixed struct name
RewriteElseBlocks used to have an issue where it could add an
unprefixed struct name to the AST in a TIntermRaw node, as opposed to
the prefixed name that the struct would be defined with. Use a proper
return statement node instead of a raw node to fix this issue and make
the code more robust.
BUG=angleproject:2061
TEST=angle_unittests
Change-Id: I3993b5093646983f038268f3a5ffe26ccdae66e8
Reviewed-on: https://chromium-review.googlesource.com/530785
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
|
|
4f86d053
|
2017-06-05T12:59:26
|
|
Introduce MemoryProgramCache.
This class will manage GPU binary programs in memory. It will be
owned by the Display, and shared between Contexts. Currently this
CL just refactors the Program binary saving and loading into static
members of this new class.
BUG=angleproject:1897
Change-Id: I34f5afb2c02416f6fd80dd65ba3827a8637ce190
Reviewed-on: https://chromium-review.googlesource.com/522873
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
|
|
9cf9e871
|
2017-06-05T12:59:25
|
|
Move LinkResult to the gl:: namespace.
This is a derived type from gl::Error so makes sense to be there.
Also makes it more accessible than in ProgramImpl.h
BUG=angleproject:1897
Change-Id: Id41b13e5a072745d8c361057f5bef8f152e0452b
Reviewed-on: https://chromium-review.googlesource.com/522872
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
83418fb1
|
2017-06-05T12:59:24
|
|
Don't allow for error in ProgramImpl::save.
Refactoring cleanup patch only.
BUG=angleproject:1897
Change-Id: I6d12de5dab16ead9684886a1cf15b570e3c98156
Reviewed-on: https://chromium-review.googlesource.com/522871
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
88323761
|
2017-06-09T12:48:32
|
|
Introduce SizedMRUCache.
This class is an MRU cache for sized objects, like Textures or
Program binaries. It is based on the base::HashingMRUCache type,
and evicts objects automatically.
BUG=angleproject:2044
Change-Id: I83859a0388f984e872fb9209e4c9efbf5d6c93f1
Reviewed-on: https://chromium-review.googlesource.com/517380
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
c084de14
|
2017-06-05T14:28:52
|
|
ProgramD3D: only broadcast when the GL_EXT_draw_buffers is enabled
The behavior is undefined in GL ES when multiple attachments are used
with gl_FragColor but WebGL clarifies that:
- If the extension is enabled, broadcast happens
- If the extension isn't enabled, only the first attachment is written
BUG=angleproject:2048
Change-Id: I6d85ba91df77d42fb8863a03f1faa006cd7817bf
Reviewed-on: https://chromium-review.googlesource.com/523809
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
|
|
0492d447
|
2017-06-07T13:45:15
|
|
Move murmurhash to src/common/third_party
Bug: chromium:697758
Change-Id: I8a3a990b14cde0fdd45319d593040bfc571abf3e
Reviewed-on: https://chromium-review.googlesource.com/527602
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
60f6eb20
|
2017-05-08T15:34:46
|
|
Add WebGL test that draws to missing attachment.
In WebGL one can Clear, DrawArrays, and DrawElements to a framebuffer
with a missing attachment with no error.
BUG=angleproject:1822
Change-Id: I4dece2fa8fad31c812e24ae18bdc380c2857a1f8
Reviewed-on: https://chromium-review.googlesource.com/502967
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Frank Henigman <fjhenigman@chromium.org>
|
|
4cdac9eb
|
2017-05-08T11:01:20
|
|
ES31: Add atomic counter for GLSL parsing
This makes shader compiler support the new basic type 'atomic_uint'
and validate its layout qualifiers properly.
BUG=angleproject:1729
TEST=angle_unittests:AtomicCounterTest
angle_deqp_gles31_tests:dEQP-GLES31.functional.atomic_counter.layout.invalid*
angle_deqp_gles31_tests:dEQP-GLES31.functional.debug.negative_coverage.*.atomic*
Change-Id: Ia237eadf6ea72314f436a0abbb93a05598e71eba
Reviewed-on: https://chromium-review.googlesource.com/500088
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
2cd45629
|
2017-06-08T20:14:13
|
|
D3D11: Consolidate Vertex Buffer application.
With this change, IASetVertexBuffers is only called from a single
code site in StateManager11. All other classes call through to here.
This will make adopting the dirty bits for InputLayouts and VBs much
simpler.
BUG=angleproject:2052
Change-Id: I6e7b6146deb7f80f5f0e75dd0aff18eb4cc2bfc2
Reviewed-on: https://chromium-review.googlesource.com/524232
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
863b6236
|
2017-06-08T11:18:49
|
|
Refactor redefineImage and track dirty images properly.
Several issues showed up in testing with WebGL:
* Images should only be forcefully re-defined when there is no data to
upload.
* After an image is marked dirty, a later call to subImage would cause
assertion failures because the texture storage would try to verify that
the image was not dirty, don't try to copy directly to storage in this
case.
BUG=angleproject:1635
Change-Id: I9e5d83850d743b7d4d2db938312ee5c35a3a79ee
Reviewed-on: https://chromium-review.googlesource.com/527348
Commit-Queue: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
982f6e01
|
2017-06-07T14:33:04
|
|
Improvements to the gl::Range class.
Make this a proper class, fix the extends method (previously did not
work as expected), add a contains method, and add tests. Also add an
iterator helper class so we can iterate over the range with range-for
loops.
This also fixes the shader resource unsetting code, which was not
actually unsetting all the possible applied textures.
BUG=angleproject:2052
Change-Id: I2a6fa97f96ccb612ad01a5e3f24dc869c54c967b
Reviewed-on: https://chromium-review.googlesource.com/527318
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
165361ca
|
2017-06-07T14:56:57
|
|
Entry point refactoring
Refactor texStorage2D and texStorage3D.
BUG=angleproject:747
Change-Id: Id5ab6bbff5ce6debc84318e28b12683bf8b106b1
Reviewed-on: https://chromium-review.googlesource.com/526371
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
5ea762a6
|
2017-06-07T14:59:51
|
|
Consolidate base:: imports.
This merges the mrucache and numerics into one folder, to prevent
having to make two identical versions of logging.
BUG=angleproject:2044
Change-Id: Iba6dab05b21eb9ba0de44f27a90579c590a9a7fd
Reviewed-on: https://chromium-review.googlesource.com/522870
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
c4d18aac
|
2017-03-09T18:45:02
|
|
Use ErrorStream everywhere
Eliminates one more usage of FormatString and its static initializer.
Add more ErrorStream types
and replace gl::Error and egl::Error with them.
BUG=angleproject:1644
Change-Id: Ib498d0ae4b81a332ec71aed7cf709993b154e6bb
Reviewed-on: https://chromium-review.googlesource.com/505429
Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
79460702
|
2017-06-06T15:30:45
|
|
Don't discard the storage on forceRelease, simply mark the image as dirty.
It was overkill to always destroy the storage, especially for cube maps.
Instead, just make sure the image thinks it's dirty when robust resource
init is enabled so that it is always copied to the storage after
redefinition.
BUG=angleproject:1635
Change-Id: Ieba065d1873ca66a216bd05f4f8afa9c75349ff9
Reviewed-on: https://chromium-review.googlesource.com/526295
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Geoff Lang <geofflang@chromium.org>
|
|
966cb898
|
2017-06-05T16:08:27
|
|
D3D11: Don't dirty all uniforms on program change. (2/2)
Second patch for addressing missed comments.
BUG=angleproject:2053
Change-Id: I1268d571913f8ce7efa7b94a5d4e47cf9a80c3c0
Reviewed-on: https://chromium-review.googlesource.com/526275
Reviewed-by: 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>
|
|
07b36365
|
2017-06-05T16:08:27
|
|
D3D11: Don't dirty all uniforms on program change.
Only dirty the uniforms if the uniforms are dirty. This gives about a
20% reduction in ANGLE overhead on a targeted micro-benchmark. It
probably won't have that large of an impact on most real-world
applications, but it was strictly unnecessary work.
Something that came up when investigating the internal program binary
cache in ANGLE D3D11.
BUG=angleproject:2053
Change-Id: I2d55c010c29ce9627a9001dd2abe6e549f0b7e8c
Reviewed-on: https://chromium-review.googlesource.com/524297
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
10bed9fc
|
2017-06-05T12:59:22
|
|
Minor optimizations to DynamicHLSL.
This makes us use std::ostringstream in more places, instead of
string concatenation.
BUG=chromium:697758
Change-Id: Ifdcaa2e7e119664fc9cfdc566ea13b519a294714
Reviewed-on: https://chromium-review.googlesource.com/521729
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
|
|
bb1e750c
|
2017-06-05T16:40:09
|
|
Validate that structure names match when linking uniforms.
GLSL 1.017 4.2.4:
Structures must have the same name, sequence of type names, and
type definitions, and field names to be considered the same type.
TEST=conformance/glsl/misc/shaders-with-uniform-structs
BUG=angleproejct:2013
Change-Id: Ieedaaca2d28ef4e1cc0b5480f413ebd513c1dc1f
Reviewed-on: https://chromium-review.googlesource.com/524036
Commit-Queue: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
f2a06035
|
2017-06-05T14:07:36
|
|
Force-release images on redefine when robust resource init is enabled.
If the user repreatedly calls glTexImage with null data and the same size,
it is expected that the texture would re-fill itself with zero'd data.
TextureD3D and ImageD3D would no-op these calls when the texture is
already the right size.
TEST=conformance2/rendering/blitframebuffer-filter-outofbounds
BUG=angleproject:1635
Change-Id: I810b15922759a4acfc0ef7da198f068b81e9efc4
Reviewed-on: https://chromium-review.googlesource.com/524436
Commit-Queue: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
|
|
93a540fc
|
2017-06-05T14:26:47
|
|
D3D11: Reset the TF binding offsets when glBeginTransformFeedback is called.
BUG=angleproject:2051
Change-Id: I09e8548ef76b7d824743d06b0bba21633bc40a24
Reviewed-on: https://chromium-review.googlesource.com/523671
Commit-Queue: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
|
|
bd044ed8
|
2017-06-05T12:59:21
|
|
Defer shader compiles when possible.
When using the program binary memory cache inside ANGLE, this will
give a potential fast path. If the user doesn't query the shader
compile status or info log before calling LinkProgram, then we can
check the program cache before translating the program, and if it
finds a hit, we don't even need to call the translator.
To preserve the shader settings at compile time, a reference to the
current shader translator is kept in a binding pointer on the call
to compile. This mirrors a similar implementation in Chromium's
command buffer. Also the compile options and source are cached at
compile to preserve the correct shader state.
BUG=angleproject:1897
Change-Id: I3c046d7ac8c3b5c8cc169c4802ffe47f95537212
Reviewed-on: https://chromium-review.googlesource.com/517379
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
dc0fa46a
|
2017-02-01T14:44:43
|
|
preprocessor: Check for line number overflow
Also remove dead code in Tokenizer.l
BUG=chromium:668842
Change-Id: Ice18313a64f0bb2242299993bfaa882a6578ad54
Reviewed-on: https://chromium-review.googlesource.com/435042
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
|
|
80cdc376
|
2017-04-18T13:27:30
|
|
DisplayWGL: try all GL context version from the highest
The only way to get a core profile context of the highest version using
CreateContextAttrib is to try creationg contexts in decreasing version
numbers. It might look that asking for a core context of version (0, 0)
works on some driver but it create a _compatibility_ context of the highest
version instead which might not be supported on some drivers.
BUG=angleproject:1994
Change-Id: Ic8a33243909c54ea5940ee81c9c866b141bea420
Reviewed-on: https://chromium-review.googlesource.com/480739
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
63fa2e94
|
2017-06-01T17:11:41
|
|
D3D11: Consolidate Query allocation.
This compiles the resource refactor for D3D11. The only remaining
non-smart handles are for things like SwapChains and ID3D11Blob.
This might be more easily managed by using angle::ComPtr or
similar smart pointers instead of the Resource Manager class.
BUG=angleproject:2034
Change-Id: I53c753a1c19b05c4e72859dd5046e3ed10866847
Reviewed-on: https://chromium-review.googlesource.com/506777
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
0fd806f1
|
2017-06-01T17:11:40
|
|
D3D11: Consolidate Shader allocation.
Similar to the InputLayout init, this adds a small helper type to act
as a wrapper around shader init data (binary and size).
This also adds error trapping to the blit shader compilation. It also
removes the LazyResource2 class, and the CompileXS helper methods.
BUG=angleproject:2034
Change-Id: I3fd718393c8a0250e4263890f00d0e9147ec9567
Reviewed-on: https://chromium-review.googlesource.com/506776
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
fccbac2c
|
2017-05-28T17:29:26
|
|
Validate precision in uniform blocks for WebGL.
In WebGL mode turn on checking that precision qualifiers match in
corresponding vertex/fragment uniform blocks. Add test for this behavior.
BUG=angleproject:2015
Change-Id: Ie035138e8c46e430bdcf8fb5bbc3e0a3ab7d6391
Reviewed-on: https://chromium-review.googlesource.com/517724
Commit-Queue: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
2f348d2a
|
2017-06-05T10:50:59
|
|
Make gl::Compiler reference-counted.
This is helpful for implementing program binary caching in ANGLE.
in order to maintain the current behaviour in Chrome, we will need
to defer shader compilation until link time. Since WebGL allows the
app layer to enable and disable extensions explicitly, the app can
enable or disable an extension between the calls to glCompileShader
and glLinkProgram. Then, if we're deferring shader compilation, we
will have to preserve the extension settings at the time of the call
to compile, not the current settings at the time of link. Making the
compiler reference-counted gives us a pretty simple and robust
solution.
This also changes the Context class to lazily init the shader
compiler. Lazy init prevents any unexpected nulls, and also ensures
the releaseShaderCompiler does exactly that: just releases the shader
compiler, and does not immediately re-initialize it.
BUG=angleproject:2044
Change-Id: I0f0eeb4eb94dc4eee238f92482804a0921c77df0
Reviewed-on: https://chromium-review.googlesource.com/522868
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
168d5e80
|
2017-02-01T12:18:56
|
|
compiler: Regenerate parser with latest flex and bison
Flex version is 2.6.4
Bison version is 3.0.4
BUG=chromium:668842
Change-Id: Ia05ae338c9b9e588534f8346ff5c59ed747c56bf
Reviewed-on: https://chromium-review.googlesource.com/435553
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
5978e28d
|
2017-06-02T11:49:31
|
|
D3D11: Consolidate InputLayout allocation.
This introduces a helper type to act as the initialization data type
for input element arrays. A WrappedArray class acts as a helper class
to wrap a C array and size into a C++ class, similar to std::array
but without the data storage.
Also move resource deallocation memory counting into a single code
path.
BUG=angleproject:2034
Change-Id: I5e108254777f0df65f5f60fe26e760c71b95b542
Reviewed-on: https://chromium-review.googlesource.com/506775
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
8d4db1fa
|
2017-06-02T14:32:01
|
|
Fix format info for unsized RG texture formats.
The unsized GL_RED and GL_RG formats are only usable with the
EXT_texture_rg extension and are always renderable.
BUG=720325
Change-Id: I813662f6c90f1a6a640be747ae40b81727e58cdc
Reviewed-on: https://chromium-review.googlesource.com/523023
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Geoff Lang <geofflang@chromium.org>
|
|
6e898aa3
|
2017-06-02T11:17:26
|
|
Allow sized GL_RGB[A]_32F to be used for TexImage2D with the chromium extensions.
GL_CHROMIUM_color_buffer_float_rgb[a] allows these sized formats to be
used in TexImage2D even in ES2. With this patch, the
conformance/extensions/oes-texture-float and
conformance/extensions/oes-texture-half-float tests now pass for WebGL1
and WebGL 2 contexts.
BUG=angleproject:1958
Change-Id: I568dea5da42ba310463d2690c3e764c48598311b
Reviewed-on: https://chromium-review.googlesource.com/522349
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Geoff Lang <geofflang@chromium.org>
|
|
e7557744
|
2017-06-01T13:09:57
|
|
WebGL compatibility: remove UB for draw buffers in the GL backend.
WebGL adds two rules:
- Fragment outputs declared but not written to should default to black.
- FBO attachments for outputs not declared in the shader should not be
written to (it is UB in OpenGL ES).
Fix the first one by using the SH_INIT_OUTPUT_VARIABLES compiler
options, and the second one by messing with glDrawBuffers so that the
enabled draw buffers are always a subset of the ones declared by the
shader.
BUG=angleproject:2048
Change-Id: I1d851c190959c1acfc3e41d837e6990aec1d4086
Reviewed-on: https://chromium-review.googlesource.com/521682
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
|
|
fff7a7dd
|
2017-06-02T10:39:17
|
|
Mark the S3TC SRGB formats as requiring exact block sizes.
TEST=conformance/extensions/webgl-compressed-texture-s3tc-srgb
BUG=angleproject:2049
Change-Id: I00d816299db914c078d140f791cd7c98c6428a54
Reviewed-on: https://chromium-review.googlesource.com/522762
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Geoff Lang <geofflang@chromium.org>
|
|
9ab5b822
|
2017-05-30T16:19:23
|
|
Validate that vertex shader input matches the vertex attribute types.
BUG=angleproject:2012
TEST=conformance2/rendering/attrib-type-match
Change-Id: Ic282e0933a5c3c377322dd484534fcc1dfcb3840
Reviewed-on: https://chromium-review.googlesource.com/517974
Commit-Queue: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Frank Henigman <fjhenigman@chromium.org>
|
|
b7d5e303
|
2017-06-01T16:04:46
|
|
D3D11: Default init all textures.
The resource manager factory methods will use ClearView or zero-filled
buffers to set initial data. It assumes there are no 3D depth/stencil
textures. This will lead to some wasteful re-creation of RTVs in some
cases.
This is a temporary measure until we can implement more efficient
lazy resource init strategies.
BUG=angleproject:1635
Change-Id: I590e76587d3d96a359beedb79e21d24930e5f2e0
Reviewed-on: https://chromium-review.googlesource.com/503254
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
c564c070
|
2017-06-01T12:45:42
|
|
Pass gl::Context to impl methods instead of ContextImpl.
In some cases we might have to call back into the GL layer, passing
the Context, and if we just have a ContextImpl pointer this isn't
possible. It also removes the need for SafeGetImpl.
BUG=angleproject:2044
Change-Id: I6363e84b25648c992c25779d4c43f795aa2866d6
Reviewed-on: https://chromium-review.googlesource.com/516835
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
fc32e8b7
|
2017-05-31T14:16:59
|
|
WebGL: Validate shader entry point names do not contain invalid characters.
Section 6.20 of the WebGL spec states that all shader-related entry points
that accept strings must validate that the string does not contain
characters that are not valid in ESSL.
TEST=conformance/misc/invalid-passed-params
BUG=2016
Change-Id: I220d9dd79c4b0e8e0195277093268b9e1e66f9d9
Reviewed-on: https://chromium-review.googlesource.com/519445
Commit-Queue: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
948bbe51
|
2017-06-01T13:10:42
|
|
Redesign robust resource init as a display extension.
Also correct the enum allocation to values that are available to ANGLE.
BUG=angleproject:1635
Change-Id: I443f5654aa6a5049b4a1ae4c253cd6473b4e446e
Reviewed-on: https://chromium-review.googlesource.com/520002
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
|
|
cae72d6a
|
2017-06-01T11:53:45
|
|
Call GetGlobalContext instead of GetValidGlobalContext for gl::GetError
If the context is lost due to an OUT_OF_MEMORY error, it was
impossible to check the error.
BUG=angleproject:1309
Change-Id: I50fbd46b139d44774dde804445f12b8d34d73e29
Reviewed-on: https://chromium-review.googlesource.com/521203
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Geoff Lang <geofflang@chromium.org>
|
|
cd930cf0
|
2017-05-31T13:36:32
|
|
EGLDevice: Fix edge-case memory leak.
This could happen if there was an error on device init.
Reported by Microsoft.
BUG=None
Change-Id: I059fd9308d0536b4120c28e684e37567d14b3fd5
Reviewed-on: https://chromium-review.googlesource.com/519642
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
|
|
e0cff190
|
2017-05-30T13:04:56
|
|
Validate that fragment shader output matches the draw buffer type.
TEST=conformance2/rendering/fs-color-type-mismatch-color-buffer-type
BUG=angleproject:1688
Change-Id: I17848baf40b6d32b5adc1458fe2369b850164da3
Reviewed-on: https://chromium-review.googlesource.com/518246
Commit-Queue: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Frank Henigman <fjhenigman@chromium.org>
|
|
311d9999
|
2017-05-30T15:38:54
|
|
Add Program Binary test for reinitialization.
This test tears down and recreates GL and re-uses the binary in
a new GL context. Was meant to reproduce a bug in ANGLE, but the
bug had been fixed previously.
BUG=angleproject:2010
Change-Id: Ic3a31ac044ef4d794dae14608877b6958452b55e
Reviewed-on: https://chromium-review.googlesource.com/519463
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
ea19b4ac
|
2017-05-25T14:48:34
|
|
Don't store Renderer in RenderStateCache.
Instead pass it around via methods. This makes the code a bit nicer.
BUG=angleproject:2044
Change-Id: I721e190a2ecde2b1a65e57debf419ee06a5dce29
Reviewed-on: https://chromium-review.googlesource.com/516385
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
|
|
9216a6e2
|
2017-05-24T15:53:20
|
|
Introduce MRUCache.
This library comes from Chromium's base, and is useful for many use
cases in ANGLE. It can replace the custom MRU code we use in the
RenderStateCache. It will also be useful for implementing a program
binary cache.
BUG=angleproject:2044
Change-Id: Iba166fe380d7ed4e3123428b0227b9d299f756d1
Reviewed-on: https://chromium-review.googlesource.com/516384
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
|
|
af713a24
|
2017-04-19T09:10:56
|
|
ES31: Implement binding layout for uniform blocks
The binding point of uniform blocks can be specified in shaders with
this CL. See spec ESSL 3.10, section 4.4.4, page 58 for more info.
dEQP-GLES31.functional.ubo.* still can't completely pass as
the missing of arrays-of-arrays feature. Neither can
dEQP-GLES31.functional.layout_binding.ubo.* due to the incomplete
implementation of program interface APIs.
TEST=angle_end2end_tests:UniformBufferTest
BUG=angleproject:1442
Change-Id: If95d468fc109834a132b9b817730d3fdc3a615da
Reviewed-on: https://chromium-review.googlesource.com/483848
Commit-Queue: Jie A Chen <jie.a.chen@intel.com>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
|
|
0ffc441e
|
2017-05-19T14:18:55
|
|
Initialize uninitialized globals in GLSL output
Initializing globals is done by the DeferGlobalInitializers AST
transformation, which makes sure that the global variable init
proceeds in the correct order. This is important since some global
variables may use other uninitialized globals in their initializers.
The global variable init is only done in case the WebGL shader spec is
being followed. This avoids adding global initializers twice in case
the same shader goes through multiple translations, assuming only one
of them is a WebGL shader translation.
BUG=angleproject:1966
TEST=angle_end2end_tests, WebGL conformance tests
Change-Id: Iea701d3ae40edc906abd87303f2aa27fd23bf55a
Reviewed-on: https://chromium-review.googlesource.com/509689
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
0a82f2fa
|
2017-05-30T15:42:00
|
|
D3D11: Don't copy SharedSRVs around.
This was causing a very large performance regression in Texture
re-binding. Instead pass by const &, which should be fine, since
values in std::map (and unordered_map) are not reallocated when the
map changes.
Also make the SharedResource type non-copyable, and add an explicit
makeCopy method for when we need to clone the shared pointer.
BUG=angleproject:2034
BUG=chromium:727318
Change-Id: I39508a6ca4b41e4da31fe68899caa4464138cada
Reviewed-on: https://chromium-review.googlesource.com/517670
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
|
|
df7d13eb
|
2017-05-30T13:53:45
|
|
Lift outdated NVIDIA test suppressions
Lift some test suppressions for bugs that have been fixed in the
NVIDIA driver a good while ago.
Also improve code style in some suppressions - prefer IsOSX() and
IsLinux() to using ifdefs.
BUG=angleproject:1305
TEST=angle_end2end_tests
Change-Id: Ia069f5b9696000c901956d2952801d5f5c339a11
Reviewed-on: https://chromium-review.googlesource.com/518168
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
|
|
63d8c266
|
2017-05-29T13:35:09
|
|
Re-use std::hash in RenderStateCache.
This will allow us to more easily take advantage of Chromium's
MRUCache class.
BUG=angleproject:2044
Change-Id: I3fad82fc825861dc1c2095f25da83159da76e76b
Reviewed-on: https://chromium-review.googlesource.com/517359
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
aa0a5446
|
2017-05-25T13:30:23
|
|
Ensure gl State structs are zero filled.
In some cases we would hash or memcmp against structs with bools or
other non-filled data. This could have implementation differences,
and may have been causing cache errors on Clang.
BUG=chromium:721648
BUG=angleproject:2044
Change-Id: I981a1e6e8d50a33f7fade568497b72b919accfce
Reviewed-on: https://chromium-review.googlesource.com/516383
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
80616218
|
2017-05-17T15:40:03
|
|
Support CHROMIUM_copy_texture for all formats on D3D11.
Adds a CPU readback and conversion path when the destination texture is
not renderable.
BUG=angleproject:1932
Change-Id: I71461ca991dc10dd636ff38e1ae20db2be0f8d63
Reviewed-on: https://chromium-review.googlesource.com/508308
Commit-Queue: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
98de826c
|
2017-05-29T13:01:02
|
|
Platform: Fix initialization order in tests.
Because of the platform refactor in abf38572062b91 we broke the way
the tests override the D3D workarounds for the tiny depth/stencil bug.
This change passes a pointer to the platform directly in the EGL init
logic, which solves this issue. It also removes all decltype code in
the platform header which might fix the UBSAN problem we were seeing
previously.
Also change a present mode selection error into a warning in the Vk
back-end, since this was being triggered on AMD, but is safe.
BUG=angleproject:2042
Change-Id: Ibbd0c69ce11a840cf4b33c616f56020001e553aa
Reviewed-on: https://chromium-review.googlesource.com/513519
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
20805650
|
2017-05-25T12:20:59
|
|
D3D11: Consolidate state allocation.
This cleans up the allocation and deallocation of Blend, DepthStencil,
Rasterizer, and Sampler states.
This patch introduces a LazyResource2 class, basically a replacement
for LazyResource, which will be removed once the refactor is done.
BUG=angleproject:2034
Change-Id: I4fa759ae479807ff69a629f89a08b01800ba3f66
Reviewed-on: https://chromium-review.googlesource.com/503627
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
|
|
857c09db
|
2017-05-16T15:55:04
|
|
Add missing completeness checks for texture attachments.
Texture attachments need to validate that the attached mip level is within
the [baseLevel,maxLevel] range and that the texture is complete if the
attached mip level is not the base level.
BUG=722684
Change-Id: I859766506b295638572b75a0e2e9fed168be047a
Reviewed-on: https://chromium-review.googlesource.com/506928
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Geoff Lang <geofflang@chromium.org>
|
|
9733ceef
|
2017-05-11T19:14:35
|
|
Initialize uninitialized locals in GLSL output
Guarantee that local variables are initialized before they are used
in GLSL output. In HLSL output all variables were already being
initialized.
Locals are initialized using an AST transform. The local variable init
can only be run after some simplification of the AST, so that it is
able to handle complex cases like:
for (int i[2], j = i[0]; i[0] < 3; ++i[0]) {
}
If we're dealing with ESSL 1.00 which lacks array constructors, in
this kind of case the uninitialized array initialization code needs to
be hoisted out of the loop init statement, and the code also needs to
make sure that j's initializer is run after i is initialized.
Another complex case involves nameless structs. This can be an issue
also in ESSL 3.00 and above:
for (struct { float f; } s; s.f < 1.0; ++s.f) {
}
Since the struct doesn't have a name, its constructor can not be used.
We solve this by initializing the struct members individually,
similarly to how arrays are initialized in ESSL 1.00.
Initializing local variables is disabled on Mac and Android for now.
On Mac, invalid behavior was exposed in the WebGL 2.0 tests when
enabling it. On Android, the dEQP test runs failed for an unknown
reason. Bugs have been opened to resolve these issues later.
BUG=angleproject:1966
TEST=angle_end2end_tests, WebGL conformance tests
Change-Id: Ic06927f5b6cc9619bc82c647ee966605cd80bab2
Reviewed-on: https://chromium-review.googlesource.com/504728
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
bdc1e2a2
|
2017-05-24T14:40:27
|
|
D3D11: Consolidate Buffer allocation.
We now allocate and release all buffer resources from a single place,
allowing us to allocate junk memory, clear on init, and track the
currently allocated buffer memory.
BUG=angleproject:2034
Change-Id: Id60b63a7f77bc369dfc494a7587ab06c8d34a8e2
Reviewed-on: https://chromium-review.googlesource.com/503253
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
a1b9d5a2
|
2017-05-18T11:22:27
|
|
Refactor multisample framebuffer completeness checks.
Re-land with protection against div-by-zero in samples compatibility
check.
BUG=722684
Change-Id: I3d5c310d1f2cb4d8b92d80492435855c3c4ad807
Reviewed-on: https://chromium-review.googlesource.com/517427
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Geoff Lang <geofflang@chromium.org>
|
|
95468d17
|
2017-05-04T11:14:34
|
|
Support multiview in ESSL 1.00 shaders
Support is added according to the proposal for WEBGL_multiview. When
the multiview extension is enabled in an ESSL 1.00 shader, num_views
can be specified using a layout qualifier. To support this, enabling
the multiview extension makes "layout" a keyword rather than an
identifier in ESSL 1.00.
The type of gl_ViewID_OVR is also different in case of ESSL 1.00: it
has to be a signed integer, since unsigned integers are not supported
in ESSL 1.00.
Some existing tests for multiview shaders are extended in this patch.
The changes make sure that vertex shader "in" qualifier is still
allowed in ESSL 3.00 multiview shaders, since this patch adds code to
disallow it in ESSL 1.00 multiview shaders.
BUG=angleproject:1669
TEST=angle_unittests
Change-Id: I65dbbbebabdb24cf0bb647d40aa80cebf713c4f7
Reviewed-on: https://chromium-review.googlesource.com/506088
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
|
|
7d79fe95
|
2017-05-26T20:50:45
|
|
Revert "Refactor multisample framebuffer completeness checks."
This reverts commit ff77c359221485886b8207e8afd23c11e0768cf4.
Reason for revert: Breaks FramebufferMixedSamplesTest on Android NVIDIA
BUG=angleproject:2045
Original change's description:
> Refactor multisample framebuffer completeness checks.
>
> BUG=722684
>
> Change-Id: Iebe6968ebd693e7f051394a040eac1cf6f539e6e
> Reviewed-on: https://chromium-review.googlesource.com/508221
> Reviewed-by: Geoff Lang <geofflang@chromium.org>
> Reviewed-by: Jamie Madill <jmadill@chromium.org>
> Commit-Queue: Geoff Lang <geofflang@chromium.org>
>
TBR=fjhenigman@chromium.org,geofflang@chromium.org,jmadill@chromium.org
# Not skipping CQ checks because original CL landed > 1 day ago.
BUG=722684
Change-Id: I1abab021ba73b218cbbe60d4e7bfdaae56955c64
Reviewed-on: https://chromium-review.googlesource.com/517390
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Geoff Lang <geofflang@chromium.org>
|
|
2c479d6e
|
2017-05-24T14:37:22
|
|
D3D11: Use TextureHelper11 everywhere.
This consolidates all texture allocation into ResourceManager11.
It removes a lot of error checking and resource management code.
In a few places we're storing some redundant information, like in
TextureStorage11, we might store the Format pointer in two places,
or the Texture's size.
BUG=angleproject:2034
Change-Id: I9369e76925a67632c444c662e5667c5ed7875547
Reviewed-on: https://chromium-review.googlesource.com/503252
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
a22aa4ed
|
2017-05-24T18:17:23
|
|
Mark some internal functions as not having side effects
Precision emulation rounding function calls and vector/matrix dynamic
indexing function calls now get a flag that indicates that running the
function body does not have side effects. This avoids triggering
asserts in OutputHLSL when these internal function calls end up on the
right hand side of a non-unfolded logical operator.
BUG=chromium:724870
TEST=angle_unittests
Change-Id: Id1a2b6b744f6a04c6cdb86a8f4109ccc12bc70b9
Reviewed-on: https://chromium-review.googlesource.com/516705
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
|
|
ff77c359
|
2017-05-18T11:22:27
|
|
Refactor multisample framebuffer completeness checks.
BUG=722684
Change-Id: Iebe6968ebd693e7f051394a040eac1cf6f539e6e
Reviewed-on: https://chromium-review.googlesource.com/508221
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Geoff Lang <geofflang@chromium.org>
|
|
26098cb2
|
2017-05-24T20:39:28
|
|
Add missing dependencies on exe_and_shlib_deps (angle)
BUG=chromium:723069
Change-Id: I2b3c9be297c2b65955e31f393756ca266cc7c60b
Reviewed-on: https://chromium-review.googlesource.com/514436
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
6811a316
|
2017-05-24T16:50:06
|
|
Use GetPlatformDisplay instead of GetPlatformDisplayEXT.
This will allow us to use EGLAttrib and pass pointers as Display
init parameters if necessary.
BUG=angleproject:2042
Change-Id: Ib0f85d71bc9d3dff2db9453012f40303f3c3bd7c
Reviewed-on: https://chromium-review.googlesource.com/513518
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|