This is blocking the revert of the geometric constant folding
patch, which is breaking gpu_unittests and blocking the roll.
BUG=angleproject:817
This reverts commit b07aba0798.
Change-Id: Ia00fc45b1ddd9d3c079742dea0627aa12304f93b
Reviewed-on: https://chromium-review.googlesource.com/275321
Reviewed-by: Jamie Madill <[email protected]>
Tested-by: Jamie Madill <[email protected]>
Add a wrapper function that handles creating the folded node and setting the
right parameters on it, so that the folding function handles only
calculating the folded values.
This will fix the precision set to constant folded values in some cases.
Previously the precision was always set to be equal to one of the operands
to the binary operation, but now both operands are taken into account.
Folding binary operations is now in a separate function from folding unary
operations.
TEST=dEQP-GLES3.functional.shaders.constant_expressions.*
BUG=angleproject:817
Change-Id: Id97e765173c6110f49607e21c3fb90019b1ebac7
Reviewed-on: https://chromium-review.googlesource.com/274001
Reviewed-by: Jamie Madill <[email protected]>
Tested-by: Olli Etuaho <[email protected]>
This change adds constant folding support for following geometric
built-ins:
- length, distance, dot, cross, normalize, faceforward,
reflect and refract.
BUG=angleproject:913
TEST=angle_unittests, dEQP Tests
dEQP-GLES3.functional.shaders.constant_expressions.builtin_functions.geometric.*
(56 tests started passing with this change)
Change-Id: I973689554bb8c30ee3ebdf71f1b8a051ceb5e0cf
Reviewed-on: https://chromium-review.googlesource.com/273097
Reviewed-by: Zhenyao Mo <[email protected]>
Tested-by: Olli Etuaho <[email protected]>
pow(x, y) when y is a certain kind of a constant vector can cause issues on
NVIDIA 331 series drivers. Add an option to replace pow(x, y) with
exp2(y * log2(x)) when y is a constant to work around this issue.
This is done with an AST traverser instead of BuiltInFunctionEmulator, since
there's no mechanism in BuiltInFunctionEmulator to apply the replacements
only to calls where the second parameter is constant.
TEST=WebGL conformance tests
BUG=chromium:477306
Change-Id: Ifb327d72659fca36868439f24705203014b3ce53
Reviewed-on: https://chromium-review.googlesource.com/274279
Tested-by: Olli Etuaho <[email protected]>
Reviewed-by: Zhenyao Mo <[email protected]>
BUG=angleproject:1002
Changed since last failed 16-bit patch:
- Disabled usage of 16-bit DXGI textures on all Intel cards
- Added DXGI->GL conversion entries for 16-bit formats, which
fixes FBO readback issues. The ES CTS and dEQP tests which
failed with the last patch now pass.
Change-Id: Ib66abf73f23dbb4329f0a32d7f3dafbbc23e6c08
Reviewed-on: https://chromium-review.googlesource.com/273712
Tested-by: Austin Kinross <[email protected]>
Reviewed-by: Geoff Lang <[email protected]>
Like textures, renderbuffers don't become real objects until they are
bound. If the renderbuffer is never bound before being attached to a
framebuffer, it would generate an INVALID_OPERATION.
Fixes:
* conformance/textures/tex-input-validation.html
* conformance/renderbuffers/renderbuffer-initialization.html
BUG=angleproject:886
Change-Id: I639b9e2d9ae694dce29f20ed5f95077ae02d471e
Reviewed-on: https://chromium-review.googlesource.com/273533
Reviewed-by: Corentin Wallez <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
Tested-by: Geoff Lang <[email protected]>
Clean up extra semicolons and braces from loops and conditional statements
and extra braces from function definitions.
This makes the HLSL output considerably easier to read.
TEST=angle_unittests, angle_end2end_tests, dEQP-GLES3.functional.shaders.*,
WebGL conformance tests
BUG=angleproject:1013
Change-Id: I8180bab7b3d4bda1cdb8e4fb51cf9d8e384dd797
Reviewed-on: https://chromium-review.googlesource.com/273607
Reviewed-by: Jamie Madill <[email protected]>
Tested-by: Olli Etuaho <[email protected]>
All child nodes of selection should be sequence nodes, so that they will
output braces and extra braces can be removed from HLSL output.
Also make RewriteElseBlocks to reuse common IntermTraverser functionality
to simplify the code.
TEST=WebGL conformance tests on D3D9
BUG=angleproject:1013
Change-Id: Iafdc05468b22d110abcd020cf52c646dd98fb4a0
Reviewed-on: https://chromium-review.googlesource.com/273608
Tested-by: Olli Etuaho <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
Reviewed-by: Zhenyao Mo <[email protected]>
GLX Pbuffers are not bindable so implementing bindable pbuffers would
have to be one of the following:
- Implement Pbuffer as GLXPixmaps, with complication arising in the
initialization.
- Implement Pbuffers as GL textures, which would require a large change
of the EGL implementation.
- Fake bindable Pbuffers with glCopyTexImage2D, with obvious
performance problems.
BUG=angleproject:892
Change-Id: I7d9cd5a4aa2d35343244be3cbe55fc1e492f6928
Reviewed-on: https://chromium-review.googlesource.com/273056
Reviewed-by: Geoff Lang <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
Tested-by: Corentin Wallez <[email protected]>
When binding a vertex array object, it was not changing the tracked index
buffer binding. This was causing the buffer bindings to sometimes not be
updated between index and non-indexed draw calls.
Fixes:
* Intermittent crashes in chromium startup.
* conformance/rendering/many-draw-calls.html
* conformance/rendering/framebuffer-switch.html
* conformance/attribs/gl-bindAttribLocation-aliasing.html
* conformance/attribs/gl-vertex-attrib-render.html
* conformance/buffers/index-validation-verifies-too-many-indices.html
BUG=angleproject:883
Change-Id: I34ed1ebc65b339329c0f9ab9c28a392f552ed3d8
Reviewed-on: https://chromium-review.googlesource.com/273300
Reviewed-by: Brandon Jones <[email protected]>
Reviewed-by: Kenneth Russell <[email protected]>
Tested-by: Geoff Lang <[email protected]>
If a texture is bound to a framebuffer before any data is set on it, the
texture does not have a type because it has never been bound. This
generates an INVALID_OPERATION because the attachment type cannot be
validated.
Fixes:
* Many generated GL_INVALID_OPERATIONs in chromium
BUG=angleproject:884
Change-Id: I4f36f80fecc5a772b6522f8f82e0be9d3758e524
Reviewed-on: https://chromium-review.googlesource.com/273324
Tested-by: Geoff Lang <[email protected]>
Reviewed-by: Brandon Jones <[email protected]>
Reviewed-by: Kenneth Russell <[email protected]>
This is done by declaring a temporary variable which is passed as the
array out parameter defined by ArrayReturnValueToOutParameter.
SeparateExpressionsReturningArrays takes care of transforming the rest of
the cases where a function call returns an array into form that
ArrayReturnValueToOutParameter can handle.
BUG=angleproject:971
TEST=WebGL 2 conformance tests, dEQP-GLES3.functional.shaders.arrays.*
Change-Id: I70c07712ba5cd91efb4c2e575ecc49b9ef71bfd7
Reviewed-on: https://chromium-review.googlesource.com/273111
Tested-by: Olli Etuaho <[email protected]>
Reviewed-by: Zhenyao Mo <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
BuiltInFunctionEmulator gets destructed after the PoolAllocator has already
freed memory. That's why BuiltInFunctionEmulator can't hold any objects that
contain parts stored in the memory pool that would be accessed in its
destructor. Use only pointers to TType objects inside
BuiltInFunctionEmulator, so that the BuiltInFunctionEmulator destructor doesn't
access TStrings which have data in the memory pool.
Also fix style issues in BuiltInFunctionEmulator.
BUG=angleproject:1010
TEST=dEQP-GLES3.functional.shaders.builtin_functions.*
Change-Id: Ic35caf80bf125d0427c2ed2024e98657756103b6
Reviewed-on: https://chromium-review.googlesource.com/272738
Tested-by: Olli Etuaho <[email protected]>
Reviewed-by: Zhenyao Mo <[email protected]>
Make sure that user-defined bit stays in place when copying function call
nodes, and that mInFunctionWithArrayReturnValue gets reset correctly in
ArrayReturnValueToOutParameter.
BUG=angleproject:971
TEST=WebGL 2 conformance tests
Change-Id: I385f4ce4990597e44ddad4f0fa6db23b661771dc
Reviewed-on: https://chromium-review.googlesource.com/273110
Tested-by: Olli Etuaho <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
Reviewed-by: Zhenyao Mo <[email protected]>