|
15214423
|
2019-01-07T12:44:44
|
|
ES31: Add top_level_array_stride support
Bug: angleproject:1920
Change-Id: Id18c6cc1bb840c05f73a019156c462886f01d9eb
Reviewed-on: https://chromium-review.googlesource.com/c/1396745
Commit-Queue: Jiajia Qin <jiajia.qin@intel.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
|
|
ab2bfa81
|
2019-01-15T19:06:47
|
|
Enable Chromium clang style plugin for libANGLE.
This fixes a few style warnings:
* auto should not deduce to raw pointer type
* inlined virtual methods are not allowed
* non-trivial constructors and destructors should be explicit
* inlined non-trivial constructors should not be in-class
* missing override keywords
Bug: angleproject:3069
Change-Id: I3b3e55683691da3ebf6da06a5d3c729c71b6ee53
Reviewed-on: https://chromium-review.googlesource.com/c/1407640
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
|
|
8c78ce4b
|
2018-12-16T19:14:58
|
|
Use visitor pattern for Shader Variable APIs.
In many places in ANGLE we need to traverse a ShaderVariable tree. We
do this to store uniform offset and other information, to flatten the
tree of uniforms for the front-end, or to produce active variable lists
for uniform and shader storage blocks. In each case, we would write
separate tree traversal code.
This patch introduces a shared visitor pattern for all of the shader
variable tree traversal instances. With that get more common code. Also
it is easier to write new variable traversals. ProgramD3D and
ProgramLinkedResources in particular get nice simplificiations.
The visitor object recieves callbacks from the traversal when entering
structs, array elements, and new variables. The visitor can treat these
differently depending on the use case. A common visitor that constructs
full variable names is used as a base class in several places.
Also moves the 'isRowMajorLayout' from sh::InterfaceBlockField to
sh::ShaderVariable. This allows us to forgo using templates in several
call sites.
Bug: angleproject:3024
Change-Id: I472d81ec775e2eee92fb3d2eb0ca83860221ba2e
Reviewed-on: https://chromium-review.googlesource.com/c/1358722
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
|
|
b980c563
|
2018-11-27T11:34:27
|
|
Reformat all cpp and h files.
This applies git cl format --full to all ANGLE sources.
Bug: angleproject:2986
Change-Id: Ib504e618c1589332a37e97696cdc3515d739308f
Reviewed-on: https://chromium-review.googlesource.com/c/1351367
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
3fd614d0
|
2018-08-13T12:21:58
|
|
Refactor Context dependency for resolveCompile
The context parameter of Shader::resolveCompile method causes a bad
impact that many methods in Shader, Program etc. have to have a same
context parameter. By removing it, these methods can be decoupled
from Context.
BUG=chromium:849576
Change-Id: Ia5545ee9dce45794550f6086bc0e6c4707e1276e
Reviewed-on: https://chromium-review.googlesource.com/1172202
Commit-Queue: Jie A Chen <jie.a.chen@intel.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
e17b5ba5
|
2018-06-04T14:28:58
|
|
Vulkan: Keep unused uniforms list to fix glslang issues
We we're unable to cleanup the unused uniforms if we did not keep
a list of them while parsing them in ProgramLinkResource. Now
that we keep a history of them, we're able to clean them up and
fix a few dEQP tests.
Bug: angleproject:2582
Bug: angleproject:2585
Bug: angleproject:2587
Bug: angleproject:2589
Bug: angleproject:2590
Bug: angleproject:2593
Change-Id: Ic1f9151e356a3d05e83f1031cc7b187b370284e5
Reviewed-on: https://chromium-review.googlesource.com/1085644
Commit-Queue: Luc Ferron <lucferron@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
|
|
0c4e08e9
|
2018-05-08T11:00:36
|
|
Use ShaderMap in Caps - Part II
This patch is the last one in the series of putting resource limits
on each shader stage into ShaderMap. With this patch, all such values
are organized in the corresponding ShaderMap.
This patch also cleans up all the related code by using this new
type of data structure.
BUG=angleproject:2169
Change-Id: I440643fe44ab63acf7da0a1611643beed1ba66d1
Reviewed-on: https://chromium-review.googlesource.com/1077748
Commit-Queue: Jiawei Shao <jiawei.shao@intel.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
|
|
493f9571
|
2018-05-24T19:52:15
|
|
Add PrimitiveMode packed GLenum.
Bug: angleproject:2574
Change-Id: I3d7bd7ca0d69a364a611dc04799ea34906fc4a6c
Reviewed-on: https://chromium-review.googlesource.com/1067114
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
|
|
d4703d50
|
2018-05-24T17:31:43
|
|
Move packed enum code to common/
This makes it accessible in the utilities files.
Bug: angleproject:2574
Bug: angleproject:2169
Change-Id: I0fdd34b4233e72b7534cb2b09f451539c1a394cd
Reviewed-on: https://chromium-review.googlesource.com/1067110
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
|
|
8ceea819
|
2018-04-10T03:07:13
|
|
Refactor packed enum generation to support EGL enums.
Convert the very simple EGL texture type enum.
BUG=angleproject:1618
Change-Id: Ieea382a282a8f2544f2982627e8445e6e5cea826
Reviewed-on: https://chromium-review.googlesource.com/1019386
Commit-Queue: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
|
|
016105bb
|
2018-04-12T16:38:31
|
|
Store shader information in ShaderMap in class Program and Compiler
This patch is the first one in the series of using ShaderMap as
the container of the resources for each type of shader everywhere
in ANGLE.
This patch defines the new data structure ShaderMap and use it in
class Program and Compiler in ANGLE front-end.
The following work includes:
1. Use ShaderMap in D3D back-ends.
2. Use ShaderMap in Vulkan back-ends.
BUG=angleproject:2169
Change-Id: I1c284d95f5a071c45bb468901eabc15694fffe38
Reviewed-on: https://chromium-review.googlesource.com/1011722
Commit-Queue: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
|
|
385b3e03
|
2018-03-21T09:43:28
|
|
Use packed enums on shader types in ANGLE renderer
This patch uses a packed internal enum ShaderType everywhere we
need a shader type instead of the GLenum value of the shader type.
This patch also uses program::getAttachedShader(type) everywhere
we need to get gl::Shader from a program in ANGLE.
BUG=angleproject:2169
Change-Id: I28a7fa1cfe35622c57a486932911110688eaadec
Reviewed-on: https://chromium-review.googlesource.com/972844
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
|
|
44861c48
|
2018-03-23T14:36:39
|
|
Clarify aliasing rules in CHROMIUM_bind_uniform_location
The CHROMIUM_bind_uniform_location spec previously had some
conflicting information on when uniform location aliasing was
allowed. Now the section on uniform location aliasing makes it clear
that aliasing locations of two statically used uniforms is an error.
This guarantees compatibility between different compiler versions that
may treat a different subset of uniforms as active, depending on
optimizations. It follows the spirit of GLSL ES 3.00.6 spec section
12.46, that has similar rules for attributes.
The implementation is fixed to correctly follow the spec. When
flattening uniforms, static use is tracked separately from activeness.
BUG=angleproject:2262
TEST=angle_end2end_tests
Change-Id: I570fd384064aec66ef0380a53fa01ac5e43eec5a
Reviewed-on: https://chromium-review.googlesource.com/978144
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
|
|
107c7247
|
2018-03-20T15:45:35
|
|
ShaderVariable: separate fields for staticUse and active
Thus far the compiler has used the "staticUse" flag to mark variables
that should have rather been marked "active", meaning that the code
may actually execute in a way that accesses the variable. There's a
clear definition for this use of the term "active" in the GLES 3.0.5
spec, section 2.12.6, and in GLES 3.1 section 7.3.1.
Having separate fields for recording static use and "activeness" of a
variable is the first step to fixing this.
According to the spec, usually only active resources should be
considered when checking use against max limits. Also, only active
uniforms get assigned a location. libANGLE code now correctly checks
the active flag rather than the static use flag in these cases.
The static use field still mirrors the active field for now, since
some code in Chromium also needs to be fixed to use the active field
correctly before the two can diverge.
After Chromium is fixed, we can fix ANGLE so that static use
information is recorded earlier during compilation and will accurately
reflect whether variables are statically used. Currently the compiler
only records variables once some static use may already have been
pruned from the AST.
BUG=angleproject:2262
TEST=angle_unittests, angle_end2end_tests
Change-Id: I025bb71361246ae00c911a1f8b66ec045f665f29
Reviewed-on: https://chromium-review.googlesource.com/970962
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
|
|
0d88ec9f
|
2018-02-27T16:25:31
|
|
ES31: Add link validations on geometry shader uniforms
This patch adds the link validations on the uniforms defined in a
geometry shader.
1. Validate if there is any link mismatch between a geometry shader
uniform and a uniform defined in another shader in the current
graphics pipeline.
2. Validate if the number of images, samplers or atomic counters in
a geometry shader exceeds the related resource limit.
3. Validate if there is name contradiction between a geometry shader
uniform and a vertex shader attribute.
BUG=angleproject:1941
TEST=dEQP-GLES31.functional.shaders.linkage.es31.geometry.uniform.*
dEQP-GLES31.functional.geometry_shading.basic.*
dEQP-GLES31.functional.geometry_shading.conversion.*
dEQP-GLES31.functional.geometry_shading.emit.*
dEQP-GLES31.functional.geometry_shading.varying.*
dEQP-GLES31.functional.geometry_shading.instanced.geometry_*
dEQP-GLES31.functional.geometry_shading.instanced.invocation_output_*
dEQP-GLES31.functional.geometry_shading.instanced.draw_*
Change-Id: I365aee624a3a79658c3e4c7487a586cf9532b529
Reviewed-on: https://chromium-review.googlesource.com/939264
Commit-Queue: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
|
|
881b7bfa
|
2017-12-25T11:18:37
|
|
ES31: Refactor link mismatch error log
This patch intends to refactor the structure of logging link mismatch
errors to meet the new GLES 3.1 program link requirements and support
linking program with geometry shader.
This patch is mainly focusing on the following 4 issues:
1. There are totally 14 places that log the link mismatch errors
in almost same format.
2. A temporary string is created (STRUCT_NAME.FIELD_NAME) before
checking a field of a block, which is of no use if link succeeds.
3. LinkValidateVariablesBase needs to know "shaderTypes" if we support
geometry shader based on current structure. Since uniforms are
checked in the range of the whole program, it is unnecessary to
know in which shader a uniform is defined if link succeeds.
4. GLES 3.1 regards varyings with same location but different names
as matched, so it isn't enough to log errors only by one name.
This patch can solve all these issues by the following 3 changes:
1. Replace "infoLog" and "variableNames" by "mismatchedFieldName" (the
complete field name if the mismatch occurs on a field of a struct
or block).
2. Use enum LinkMismatchError as the return value of all linkValidate*
functions to reflect the detail of the link mismatch error.
3. Log all the link mismatch errors by InfoLog::logLinkMismatch where
we can get shader types instead of passing them into linkValidate*
functions.
BUG=angleproject:1941, angleproject:2144
TEST=angle_end2end_tests
Change-Id: I3ed876d61f812cc7a45a6a3c5fec0b4a88b9cc2c
Reviewed-on: https://chromium-review.googlesource.com/844215
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
|
|
cd3acf67
|
2017-12-05T16:27:25
|
|
ES31: Update block members static use
BUG=angleproject:1920
TEST=angle_end2end_tests
Change-Id: I90bcd3bf5a078623b3a739615fbc7b157b6fb94c
Reviewed-on: https://chromium-review.googlesource.com/808144
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
|
|
73618601
|
2017-12-20T15:47:15
|
|
ES31: Clean up Program::link
This patch intends to solve some structure and coding style issues
in Program::link to make it easier to support linking program with
geometry shader.
1. Move all the shader specific validations to linkValidateShaders.
Geometry shader related link validations can also be added here.
2. Rename functions with "VertexAndFragment" to "Graphics" because
these functions will also be responsible for the validations on
geometry shader.
3. Refer uniforms by pointer when validating uniforms.
4. Re-declare functions to 'static' if we can and capitialize the
first letter of all static functions in Program.h.
BUG=angleproject:1941
Change-Id: I46608e86bddc12d95cbbbf9a85803d07ccf843d8
Reviewed-on: https://chromium-review.googlesource.com/836149
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
94f1e89f
|
2017-11-20T12:14:32
|
|
ES31: Add atomic counter buffer data size
BUG=angleproject:1729
TEST=dEQP-GLES31.functional.ssbo.layout.*
dEQP-GLES31.functional.compute.basic.atomic_counter*
Change-Id: Ic78c0f089fd539c0b1064e8405d63505456dbc01
Reviewed-on: https://chromium-review.googlesource.com/777958
Commit-Queue: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
|
|
3c1da04e
|
2017-11-27T18:33:40
|
|
Isolate GlslangWrapper header from most of ANGLE.
Since we might want to use the ANGLE PoolAlloc in the Vulkan back-end,
we want to make completely sure that it doesn't show up in any header
that might be included with the Glslang headers, since this could
cause a conflict.
This change moves as much as possible to forward-declaring instead of
including headers directly in ProgramLinkedResources.h. This means
making several internal Program helper classes external. I.E. instead
of Program::Bindings, we have ProgramBindings.
It also redeclares a "using" in two places, since it isn't possible to
forward declare these, and it seemed overdesigned to put the using in
a separate header.
Bug: angleproject:2264
Change-Id: Idd08706580c927327dddf46e86acbcd2c4e3286f
Reviewed-on: https://chromium-review.googlesource.com/792270
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
465835d6
|
2017-09-26T13:34:10
|
|
Support arrays of arrays in the API
The ShaderVariable class that is used as an interface between the
compiler and the rest of the code gets arrays of arrays support.
Array of array variables are passed from the compiler just like any
other variables. However, when stored in Program state each innermost
array constitutes a separate variable. This is done to make the
implementation match the GLES specification for program interface
query APIs.
This will be tested more fully once support for parsing arrays of
arrays lands in the compiler.
TEST=angle_end2end_tests, angle_unittests
BUG=angleproject:2125
Change-Id: I0f7159000f039be92a87a52b3b68cd9a215a21cb
Reviewed-on: https://chromium-review.googlesource.com/684742
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
acf2f3ad
|
2017-11-21T19:22:44
|
|
Apply Chromium style fixes.
This addresses several minor code quality issues that are validated
in Chromium, but not yet applied to ANGLE:
* constructors and destructors must be defined out-of-line
* auto is not allowed for simple pointer types
* use override everywhere instead of virtual
* virtual functions must also be defined out-of-line
Slightly reduces binary size for me (~2k on Win, 150k on Linux).
Bug: angleproject:1569
Change-Id: I073ca3365188caf5f29fb28d9eb207903c1843e6
Reviewed-on: https://chromium-review.googlesource.com/779959
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
3a9090fa
|
2017-09-27T14:37:04
|
|
ES31: Add BUFFER_VARIABLE and SHADER_STORAGE_BLOCK program interfaces
This patch collects the shader storage block members information.
It implements getShaderStorageBlockMemberInfo and getShaderStorageBlockSize
for OpenGL backend. Meanwhile, it implements BUFFER_VARIABLE and SHADER_STORAGE_BLOCK
interfaces for program query.
BUG=angleproject:1920
TEST=angle_end2end_tests:ProgramInterfaceTest*
dEQP-GLES31.functional.layout_binding.ssbo*
dEQP-GLES31.functional.compute.basic.empty
dEQP-GLES31.functional.compute.basic.ssbo_rw*
dEQP-GLES31.functional.compute.basic.ssbo_local_barrier*
dEQP-GLES31.functional.compute.basic.copy_image_to_ssbo_small
dEQP-GLES31.functional.compute.basic.copy_ssbo_multiple_groups
dEQP-GLES31.functional.compute.basic.copy_ssbo_multiple_invocations
dEQP-GLES31.functional.compute.basic.copy_ssbo_single_invocation
dEQP-GLES31.functional.compute.basic.copy_ssbo_to_image_small
dEQP-GLES31.functional.compute.basic.shared_var*
dEQP-GLES31.functional.compute.basic.ubo_to_ssbo*
dEQP-GLES31.functional.compute.basic.write_multiple_arr*
dEQP-GLES31.functional.compute.shared_var.basic_type.*
dEQP-GLES31.functional.compute.shared_var.work_group_size.*
dEQP-GLES31.functional.atomic_counter.*
Change-Id: Ie8b81fde5a2e919aab77adb3d137c9ff2f193409
Reviewed-on: https://chromium-review.googlesource.com/712235
Reviewed-by: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
7af0de52
|
2017-11-06T17:09:33
|
|
Rename UniformLinker.cpp/h to ProgramLinkedResources.
A more general name for a file that will house a collection of pogram
variable related linking code.
BUG=angleproject:2208
Change-Id: I82710f6abadd2df58fb58a3c4179989fe956e7e4
Reviewed-on: https://chromium-review.googlesource.com/755858
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|