Commit Graph
152 Commits
Author SHA1 Message Date
Jamie Madill 83418fb19d 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 <[email protected]>
Commit-Queue: Jamie Madill <[email protected]>
2017-06-12 17:58:51 +00:00
Jamie Madill 982f6e0125 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 <[email protected]>
Reviewed-by: Geoff Lang <[email protected]>
Commit-Queue: Jamie Madill <[email protected]>
2017-06-08 18:22:40 +00:00
Yuly Novikov c4d18aac0a 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 <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
2017-06-07 20:48:52 +00:00
Geoff Lang bb1e750cb5 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 <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
2017-06-06 16:31:47 +00:00
Jamie Madill bd044ed8b1 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 <[email protected]>
Reviewed-by: Corentin Wallez <[email protected]>
Commit-Queue: Jamie Madill <[email protected]>
2017-06-05 20:45:48 +00:00
Frank Henigman fccbac2c08 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 <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
2017-06-05 17:53:49 +00:00
Corentin Wallez e755774407 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 <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
Reviewed-by: Geoff Lang <[email protected]>
2017-06-02 18:32:55 +00:00
Jamie Madill c564c070ff 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 <[email protected]>
Reviewed-by: Geoff Lang <[email protected]>
Commit-Queue: Jamie Madill <[email protected]>
2017-06-01 20:35:14 +00:00
Geoff Lang e0cff1901d 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 <[email protected]>
Reviewed-by: Frank Henigman <[email protected]>
2017-06-01 16:41:36 +00:00
jchen10 af713a2408 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 <[email protected]>
Commit-Queue: Corentin Wallez <[email protected]>
Reviewed-by: Olli Etuaho <[email protected]>
Reviewed-by: Corentin Wallez <[email protected]>
2017-05-31 15:47:35 +00:00
Jamie Madill c1d770e88a Refactor remaining GLES 2.0 entry points.
This will pave the way for several features, like auto-generation.

BUG=angleproject:747

Change-Id: Ic390ac412f4e6b61346629093f185a4c07ea0284
Reviewed-on: https://chromium-review.googlesource.com/474118
Commit-Queue: Jamie Madill <[email protected]>
Reviewed-by: Corentin Wallez <[email protected]>
2017-04-13 22:34:08 +00:00
jchen10 a9042d3c19 ES31: Add array element transformfeedback
This enhances the PackedVarying to be either one element of array, or
whole array. Correspondingly the VaryingPacking is expanded to pack it
properly.

BUG=angleproject:1950

Change-Id: I0529d7ac4367d42b2b433410fbf08351412aada8
Reviewed-on: https://chromium-review.googlesource.com/459115
Commit-Queue: Corentin Wallez <[email protected]>
Reviewed-by: Corentin Wallez <[email protected]>
2017-04-13 16:34:59 +00:00
Jamie Madill 20e005b2a1 Rename BitSetIterator.h to bitset_utils.h
BUG=angleproject:1814

Change-Id: I152ae13b6b7cf0ba72259967f0f124e199b20e07
Reviewed-on: https://chromium-review.googlesource.com/471826
Reviewed-by: Geoff Lang <[email protected]>
Reviewed-by: Corentin Wallez <[email protected]>
Commit-Queue: Jamie Madill <[email protected]>
2017-04-10 16:24:59 +00:00
jchen10 fd7c3b5207 ES31: Add glGetProgramResourceName API
Add API entry and validation checks(GLES 3.1 section 7.3).
Add the first 2 interfaces(PROGRAM_INPUT and PROGRAM_OUTPUT) implementation.

BUG=angleproject:1920

Change-Id: Ide7d5ad40a611a091c3dffab47fd31da57b69f1d
Reviewed-on: https://chromium-review.googlesource.com/457523
Commit-Queue: Geoff Lang <[email protected]>
Reviewed-by: Geoff Lang <[email protected]>
2017-03-31 14:36:04 +00:00
Yunchao He 61afff1460 ES31: Add PROGRAM_SEPARABLE to ProgramParameter and GetProgram
BUG=angleproject:1939
TEST=angle_end2end_tests

Change-Id: I97ad11360f7c015947a2c0cc7d4a47f994726834
Reviewed-on: https://chromium-review.googlesource.com/454264
Commit-Queue: Corentin Wallez <[email protected]>
Reviewed-by: Corentin Wallez <[email protected]>
2017-03-28 15:02:47 +00:00
Olli Etuaho 48fed63333 Set sampler uniform values from binding qualifiers
The usual set uniform call is used to set initial sampler uniform
values based on binding layout qualifiers. This is the simplest way to
ensure that the uniform values are set correctly in both internal data
structures of the Program class and on the different backends. This is
done as one of the last steps of program linking.

TEST=dEQP-GLES31.functional.uniform_binding.sampler*
BUG=angleproject:1442

Change-Id: I2f58c98e175f6a10a90042050f4fcbea77ad97ac
Reviewed-on: https://chromium-review.googlesource.com/456597
Reviewed-by: Jamie Madill <[email protected]>
Reviewed-by: Geoff Lang <[email protected]>
2017-03-28 14:11:08 +00:00
jchen10 15015f7f82 ES31: Add glGetProgramResourceIndex API
Add API entry and validation checks(GLES 3.1 section 7.3).
Add the first 2 interfaces(PROGRAM_INPUT and PROGRAM_OUTPUT) implementation.

BUG=angleproject:1920

Change-Id: Ib2dedded9fd79b315e9f38de7c27a5e4ec4c6066
Reviewed-on: https://chromium-review.googlesource.com/453085
Commit-Queue: Jamie Madill <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
Reviewed-by: Corentin Wallez <[email protected]>
2017-03-23 15:48:57 +00:00
jchen10 36e120ef73 Refactor the staticUse checks for attribute and output
Remove these needless checks as GetActiveShaderVariables in Shader.cpp has
filtered them already.

BUG=angleproject:1920

Change-Id: Ife85614a8f636768dd585a827bca81e2f15009c8
Reviewed-on: https://chromium-review.googlesource.com/454129
Commit-Queue: Geoff Lang <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
Reviewed-by: Geoff Lang <[email protected]>
2017-03-15 15:40:13 +00:00
Olli Etuaho b78707c8d0 Move default-block uniform linking to a separate file
The code is easier to understand when it's encapsulated better.

This change is pure refactoring with no functional changes.

BUG=angleproject:1442
TEST=angle_end2end_tests

Change-Id: I6128fd72c65ca7a87af596cda4866c74c2a66c48
Reviewed-on: https://chromium-review.googlesource.com/452502
Commit-Queue: Olli Etuaho <[email protected]>
Reviewed-by: Corentin Wallez <[email protected]>
2017-03-10 17:56:46 +00:00
Olli Etuaho 6ca2b65c43 Implement location layout qualifier for uniforms
This is a complete implementation of the uniform location layout
qualifier. Uniform location set in the shader is plumbed to shader
linking, which does several link-time checks for conflicts and
recursively applies the location to struct members.

Validate that location is consistent as specified in the table in
section 9.2.1 of the ESSL 3.10.4 spec. The location set in the shader
overrides the one set via the CHROMIUM_bind_uniform_location API.

Location conflicts must be checked even if the uniforms are not
statically used. Because of this unused uniforms are now recorded
during uniform linking. After linking checks are done, unused uniforms
are pruned from the program state.

Location is validated against the maximum number of uniform locations
at compile time as specified in section 4.4.3 of the ESSL 3.10.4 spec.

All dEQP uniform location tests don't yet pass due to unrelated bugs.

BUG=angleproject:1442
TEST=angle_end2end_tests, dEQP-GLES31.functional.uniform_location.*

Change-Id: I1f968e971f521fbc804b01e1a7c2b4d14f24d20f
Reviewed-on: https://chromium-review.googlesource.com/447942
Reviewed-by: Jamie Madill <[email protected]>
Reviewed-by: Geoff Lang <[email protected]>
Commit-Queue: Olli Etuaho <[email protected]>
2017-03-09 16:52:08 +00:00
Yuly Novikov 817232ef45 Validate invariance of built-in variables when linking
According to ESSL 1.00.17 paragraph 4.6.4

BUG=angleproject:1876

Change-Id: I61e142c31dce11eec28fe240a9bc9ce2c632daf6
Reviewed-on: https://chromium-review.googlesource.com/446870
Reviewed-by: Kenneth Russell <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
Commit-Queue: Yuly Novikov <[email protected]>
2017-03-06 22:02:51 +00:00
Olli Etuaho 547cbd461b Validate uniform binding at link time
GLSL ES Spec 3.10.4, section 4.4.5 has the rules for linking uniforms
with binding layout qualifiers. If a binding layout qualifier for a
uniform variable is specified in both vertex and fragment shaders, the
qualifiers must match.

BUG=angleproject:1893
TEST=dEQP-GLES31.functional.layout_binding.*binding_contradictory*

Change-Id: I0ae6a1a8967df818be8136510c22daee848b9da7
Reviewed-on: https://chromium-review.googlesource.com/447557
Reviewed-by: Corentin Wallez <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
Commit-Queue: Olli Etuaho <[email protected]>
2017-03-01 09:18:49 +00:00
Olli Etuaho 4a92cebc8f Clarify code around setting uniform locations
Use the name "uniformLocationBindings" for location information set by
the API instead of "uniformBindings", which can be easily confused
with binding layout qualifiers that can be set for some types of
uniforms. Also use more straightforward names throughout the
indexUniforms function.

BUG=angleproject:1442

Change-Id: I47d504479b36def696305f060e9c9bd3de3ade48
Reviewed-on: https://chromium-review.googlesource.com/445236
Reviewed-by: Corentin Wallez <[email protected]>
Commit-Queue: Olli Etuaho <[email protected]>
2017-02-22 10:01:10 +00:00
Jamie Madill 6c1f671b36 Add destroy hooks for several GL objects.
These hooks allow the back-end renderer to free object resources
without having to store pointers to shared device handles for
each and every object. This will allow us to save memory on
back-ends that really care about memory overhead.

There is a downside in that there is more boilerplate in passing
gl::Context handles around everywhere.

BUG=angleproject:1684

Change-Id: I89463bba8d23f92920e8956650cb73c7fc6d66b7
Reviewed-on: https://chromium-review.googlesource.com/426401
Commit-Queue: Jamie Madill <[email protected]>
Reviewed-by: Geoff Lang <[email protected]>
2017-02-15 01:29:47 +00:00
Jamie Madill 8ecf7f9b3d Vulkan: Implement shader compilation.
This hooks up the Vulkan GLSL, decorated with locations, to glslang,
and then pipes the SPIRV back to the Program implementation for later
use when making pipelines to run draw calls.

The program compilation tests work now, but don't really test
anything other than not generating Vulkan validation layer errors
during compilation and shader object generation.

BUG=angleproject:1576

Change-Id: I625e42219f4b4d1433dd3109b94e1a2f666ba4bd
Reviewed-on: https://chromium-review.googlesource.com/408519
Commit-Queue: Jamie Madill <[email protected]>
Reviewed-by: Geoff Lang <[email protected]>
2017-02-02 00:10:50 +00:00
Geoff Lang 4ddf5afb75 Refactor ResourceManager into separate managers per resource type.
BUG=angleproject:1639

Change-Id: I943f553cfb0e0feb57953770784b48e22fccc875
Reviewed-on: https://chromium-review.googlesource.com/423172
Commit-Queue: Geoff Lang <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
2017-01-30 19:26:41 +00:00
Jamie Madill ac4e9c3f99 Micro-optimize Uniform updates.
This saves a few re-computations of the same stuff.

BUG=angleproject:1671

Change-Id: I28f955cd880366a86c0bb22285a119e97661e2cb
Reviewed-on: https://chromium-review.googlesource.com/427326
Commit-Queue: Jamie Madill <[email protected]>
Reviewed-by: Geoff Lang <[email protected]>
2017-01-13 20:24:22 +00:00
Jamie Madill a4595b806f WebGL: Validate simple rendering feedback loops.
This adds the most basic form of rendering feedback loop detection:
when we're rendering to a texture that's also bound as an input. It
doesn't filter by selected mipmap level or 3D texture slice, or
do depth attachment validation. It also is missing checks for feedback
loops against the default Framebuffer.

BUG=angleproject:1685

Change-Id: Idb0ee2bfe1c35611544d132204c0da832c0f1c48
Reviewed-on: https://chromium-review.googlesource.com/425489
Commit-Queue: Jamie Madill <[email protected]>
Reviewed-by: Corentin Wallez <[email protected]>
2017-01-11 23:31:37 +00:00
Jamie Madill e7d8432d5e Move ProgramGL's sampler bindings to gl::Program.
This saves code duplication and makes the sampler validation a bit
simpler. In the future we might be able to use it to replace the
custom D3D logic for caching sampler info, but this relies on
some shader-specific non-merged data.

This also introduces some code duplication in Uniform1iv.

BUG=angleproject:1685

Change-Id: I258607a21886ca20766607bddf958cd511fac3f1
Reviewed-on: https://chromium-review.googlesource.com/426781
Reviewed-by: Corentin Wallez <[email protected]>
Commit-Queue: Jamie Madill <[email protected]>
2017-01-11 20:09:49 +00:00
He Yunchao acd1898e08 Replace Error(GL_NO_ERROR) with NoError().
In order to make the errors be consistent throughout ANGLE.

BUG=angleproject:1686

Change-Id: I0a2d86091d640aedeac94beae345c1fb6971b00d
Reviewed-on: https://chromium-review.googlesource.com/424835
Commit-Queue: Yunchao He <[email protected]>
Commit-Queue: Jamie Madill <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
2017-01-04 16:01:26 +00:00
Jamie Madill 192745a74e Add varying packing validation for WebGL.
This CL moves the varying packing from the D3D layer up to Program.
This is necessary for WebGL validation, and gives us consistency
for the various back-ends. There may be some additional cleanup work
on the VaryingPacking class, because it does some work that is D3D-
specific.

WebGL requires strict varying packing. Instead of allowing success
unconditionally, it's an explicit error to succeed to pack a set of
varyings that the sample algorithm would fail to pack.

Introduce a new packing mode option to the varying packing class to
handle this different packing style, while keeping our old more
relaxed packing method for ES code.

BUG=angleproject:1675

Change-Id: I674ae685ba573cc2ad7d9dfb7441efa8cb2d55fc
Reviewed-on: https://chromium-review.googlesource.com/423254
Commit-Queue: Jamie Madill <[email protected]>
Reviewed-by: Corentin Wallez <[email protected]>
2016-12-23 00:30:50 +00:00
Jamie Madill a7d12dc7f5 Store uniform block bindings in program binaries.
This affects all back-ends - we weren't saving this. Note that
bindings can only be set after program linking. The spec is fairly
clear in that any programs saved must be loadable and runnable under
the same set of state, which would include block bindings.

Also add validation for zero binary formats in GetProgramBinary.

Also add a workaround for AMD where the block bindings were not
applied properly after link, similarly to our original bug.

This CL also includes a few fixups for GLProgram (raii).

BUG=angleproject:1637

Change-Id: Iae068eb4e1e4c763aa9f9332c033e38708026c8f
Reviewed-on: https://chromium-review.googlesource.com/418393
Reviewed-by: Geoff Lang <[email protected]>
Reviewed-by: Corentin Wallez <[email protected]>
Commit-Queue: Jamie Madill <[email protected]>
2016-12-13 21:15:17 +00:00
Jamie Madill a2c7498568 Don't load binaries across client versions.
BUG=angleproject:523

Change-Id: Id54033dce15f01a0f2891533172acd8b99896e12
Reviewed-on: https://chromium-review.googlesource.com/418240
Commit-Queue: Jamie Madill <[email protected]>
Reviewed-by: Geoff Lang <[email protected]>
2016-12-12 17:09:04 +00:00
Jamie Madill eb979bfd37 Program: Small cleanup to linkAttributes.
The comment here was incorrect, and the signature passed some
redundant arguments.

Noticed this when I was looking at the code for Vulkan/glslang.

BUG=angleproject:1576

Change-Id: Ie9e7eb7cbe4b65503901b2550e95cd818b7c28c0
Reviewed-on: https://chromium-review.googlesource.com/412324
Reviewed-by: Corentin Wallez <[email protected]>
Commit-Queue: Jamie Madill <[email protected]>
2016-11-17 21:39:22 +00:00
Corentin Wallez 8b7d8144b4 Clamp "count" in glUniform* before passing to the backend
The OpenGL spec allows "count" to overflow safely implemented but some
drivers like the Intel Windows OpenGL driver don't handle this
correctly and crash on overflow tests.

BUG=661413

Change-Id: I10de9292c75daa375f002850900bb5e1cbfce3b6
Reviewed-on: https://chromium-review.googlesource.com/411387
Reviewed-by: Geoff Lang <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
Commit-Queue: Corentin Wallez <[email protected]>
2016-11-15 20:06:14 +00:00
Corentin Wallez 15ac534a96 Program: clamp the number of uniforms to be copied
Reland with a temporary test suppression.

BUG=661413

Change-Id: I552b64de754b326dcd499b84d9f337b9d015dc8e
Reviewed-on: https://chromium-review.googlesource.com/411473
Reviewed-by: Corentin Wallez <[email protected]>
Commit-Queue: Corentin Wallez <[email protected]>
2016-11-15 19:59:37 +00:00
Geoff Lang 399d1a17b2 Revert "Program: clamp the number of uniforms to be copied"
This reverts commit 9863a3ef18.

Change-Id: I840a735b49bc4f2319c8af5f620d7f52bb7eecf1
Reviewed-on: https://chromium-review.googlesource.com/411470
Reviewed-by: Geoff Lang <[email protected]>
2016-11-15 14:55:27 +00:00
Jamie Madill b0a838bff5 Program: Make LinkResult use gl::ErrorOrResult.
This simplifies the error handling code, and allows the use of the
ANGLE_TRY macro (and friends).

BUG=angleproject:1576

Change-Id: I3142388b10d0dd67a7f49a5c8c3d11102996be93
Reviewed-on: https://chromium-review.googlesource.com/411201
Commit-Queue: Jamie Madill <[email protected]>
Reviewed-by: Corentin Wallez <[email protected]>
Reviewed-by: Geoff Lang <[email protected]>
2016-11-14 22:52:40 +00:00
Corentin Wallez 9863a3ef18 Program: clamp the number of uniforms to be copied
BUG=661413

Change-Id: I1a146dae0d01edeb272a58610355261b0e23dec1
Reviewed-on: https://chromium-review.googlesource.com/406745
Reviewed-by: Jamie Madill <[email protected]>
Commit-Queue: Corentin Wallez <[email protected]>
2016-11-14 19:38:02 +00:00
Qin Jiajia 0350a64c3c Fixed the bug using uniform block array
At the beginning of Program::defineUniformBlock, getUniformBlockSize will call
getUniformBlockIndex on MacOS to check if the block is an active block with
giving blockName. However, it didn't distinguish array and non-array situations
and unified to use interfaceBlock.name as the blockName to call
getUniformBlockIndex. It would result that INVALID_INDEX was returned when
it's a block array. For example, using 'blockName' not 'blockName[0]'.

In OpenGL 4.3 spec, section 7.3.1, there are following descriptions:
If name exactly matches the name string of one of the active resources for
programInterface, the index of the matched resource is returned. Additionally, if
name would exactly match the name string of an active resource if "[0]" were
appended to name, the index of the matched resource is returned. Otherwise, name
is considered not to be the name of an active resource, and INVALID_INDEX is
returned.

So, for array block case, we use blockName appending [0] to check the activity.

BUG=angleproject:1543

Change-Id: I8189b62066b779f7d392a7dba1cf5cb02a31936d
Reviewed-on: https://chromium-review.googlesource.com/405830
Reviewed-by: Jamie Madill <[email protected]>
Reviewed-by: Geoff Lang <[email protected]>
Commit-Queue: Geoff Lang <[email protected]>
2016-11-04 23:32:59 +00:00
Jamie Madill 60e6edfa7f Make ASSERT reference the conditional expression.
This should prevent further unexpected bot breakage due to
unreferenced variables in the ASSERT expression.

Also remove the no longer needed variable referencing macro.

BUG=angleproject:1586

Change-Id: I127695165bdfe39c51fe8d17e00daf6bf2fa8252
Reviewed-on: https://chromium-review.googlesource.com/404948
Reviewed-by: Jamie Madill <[email protected]>
Commit-Queue: Jamie Madill <[email protected]>
2016-10-31 20:25:24 +00:00
Geoff Lang 6899b87f8c Implement the robust GetActiveUniformBlockiv entry point.
BUG=angleproject:1354

Change-Id: I2e8051910f50dc040f6be4922142364d36788c4e
Reviewed-on: https://chromium-review.googlesource.com/399041
Commit-Queue: Geoff Lang <[email protected]>
Reviewed-by: Corentin Wallez <[email protected]>
2016-10-20 01:19:48 +00:00
Jamie Madill ef300b153b Refactor some entry point stuff.
BUG=angleproject:747

Change-Id: I80634b5e6de8bae1433c49a56a92d3b19c24e11d
Reviewed-on: https://chromium-review.googlesource.com/395568
Commit-Queue: Jamie Madill <[email protected]>
Reviewed-by: Corentin Wallez <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
2016-10-08 00:33:36 +00:00
Corentin Wallez 054f7ed0d6 preprocessor: Miscellaneous cleanups
- Use full header paths in includes
- Use ASSERT instead of assert
- Use angle::NonCopyable instead of PP_DISALLOW_COPY_AND_ASSIGN
- Use range-for in a couple places
- Remove pp_utils.h

BUG=angleproject:1522

Change-Id: If107fef89e8465bca65cf664926d1051c5d1e232
Reviewed-on: https://chromium-review.googlesource.com/387212
Commit-Queue: Corentin Wallez <[email protected]>
Reviewed-by: Geoff Lang <[email protected]>
2016-09-26 19:25:29 +00:00
Martin Radev 4c4c8e7252 Add compute program compilation and linking support
Compute shaders can be now compiled and linked to create programs.
Some tests are added to verify successful and unsuccessful compute
shader linking.

The patch also replaces std::array<int, 3> with a custom struct
WorkGroupSize.

BUG=angleproject:1442

TEST=angle_end2end_tests
TEST=angle_unittests

Change-Id: I4ab0ac05755d0167a6d2a798f8d7f1516cf54d84
Reviewed-on: https://chromium-review.googlesource.com/366740
Reviewed-by: Jamie Madill <[email protected]>
Reviewed-by: Olli Etuaho <[email protected]>
Commit-Queue: Olli Etuaho <[email protected]>
2016-08-26 09:51:18 +00:00
Geoff Lang 3f6a398c7d Fix type conversion warnings.
BUG=angleproject:1382

Change-Id: Idee8882a7d7576faaa08418d9d399d836cec8fa7
Reviewed-on: https://chromium-review.googlesource.com/360903
Commit-Queue: Geoff Lang <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
2016-07-15 19:36:32 +00:00
Sami Väisänen 46eaa94624 Support CHROMIUM_path_rendering fragment operations
This brings two new APIs, BindFragmentInputLocation and
ProgramPathFragmentInputGen that together dictate how the
fragment shader varyings are used.

BUG=angleproject:1382

Change-Id: I4b52fd8a3555235a73aecd4f3dba2d500789cbb0
Reviewed-on: https://chromium-review.googlesource.com/357071
Reviewed-by: Geoff Lang <[email protected]>
Reviewed-by: Sami Väisänen <[email protected]>
Commit-Queue: Sami Väisänen <[email protected]>
2016-07-15 15:18:46 +00:00
Yuly Novikov a1f6dc95bb Varying invariance must match between shaders in ESSL 1.00
While in ESSL 3.00 invariant is allowed only for out varyings.
Verify that, and update test expectations.

BUG=angleproject:1293
TEST=GLSLTest*.Invariant*

Change-Id: I5cab6c68f2b94ea2179719119668d905fe7a9b3d
Reviewed-on: https://chromium-review.googlesource.com/352743
Reviewed-by: Geoff Lang <[email protected]>
Commit-Queue: Yuly Novikov <[email protected]>
2016-06-17 00:32:39 +00:00
Yuly Novikov cfa48d3744 Shader versions must match.
Per GLSL_ES_Specification_3.00.4 paragraph 3.3 Version Declaration:
"Shaders declaring version 3.00 of the shading language
cannot be linked with shaders declaring version 1.00."

BUG=angleproject:1361
TEST=GLSLTest_ES3.VersionMismatch

Change-Id: Icee672b798dcdb41a189e4a6459c4e643daf1fa6
Reviewed-on: https://chromium-review.googlesource.com/353182
Reviewed-by: Geoff Lang <[email protected]>
Commit-Queue: Yuly Novikov <[email protected]>
2016-06-17 00:25:11 +00:00
Jamie Madill dfde6abf9f Context: Remove mutable gl::State getter.
This will preserve layering - the API layer doesn't mutate the state
directly, it passes the API call through to the Context. Is also
removes the possiblity of any shenanigans of the Validation layer
changing the GL state.

Also, this CL refactors a few validation entry points to take
ValidationContext instead of Context. ValidationContext will be the
correct way to interact with the gl::Context in the Validation code.

Finally, additional refactorings make ContextState a proper class with
private data. This allows the ContextState itself to keep a mutable
pointer to the gl::State, so ValidationContext can modify it if
necessary (and it will be necessary for Framebuffer completeness
caching).

BUG=angleproject:1388

Change-Id: I86ab3561573caa9535c8d1b8aad4ab3d0e7cd470
Reviewed-on: https://chromium-review.googlesource.com/348954
Reviewed-by: Geoff Lang <[email protected]>
Reviewed-by: Corentin Wallez <[email protected]>
Commit-Queue: Jamie Madill <[email protected]>
2016-06-14 17:16:46 +00:00