|
4167cc91
|
2013-01-11T04:11:53
|
|
Incorporated BSD-licensed changes implementing array bounds clamping.
BUG=none
TEST=ran associated WebKit layout tests in Chromium
Review URL: https://codereview.appspot.com/6999052
git-svn-id: https://angleproject.googlecode.com/svn/branches/dx11proto@1701 736b8ea6-26fd-11df-bfd4-992fa37f6226
|
|
043da138
|
2012-12-20T21:12:22
|
|
Provide an API for accessing the uniform array.
TRAC #22239
Signed-off-by: Daniel Koch
Signed-off-by: Shannon Woods
Author: Nicolas Capens
git-svn-id: https://angleproject.googlecode.com/svn/branches/dx11proto@1625 736b8ea6-26fd-11df-bfd4-992fa37f6226
|
|
0aa3b5a2
|
2012-11-28T19:43:24
|
|
Implement user-defined name hashing.
ANGLEBUG=315
Review URL: https://codereview.appspot.com/6818109
git-svn-id: https://angleproject.googlecode.com/svn/branches/dx11proto@1469 736b8ea6-26fd-11df-bfd4-992fa37f6226
|
|
c23f4611
|
2012-11-28T19:42:57
|
|
Interface design for user-defined name hashing.
1) We use BuiltInResources to pass the hash function to
ANGLE, deciding whether we applies hash function or not.
2) We use 64 bits hashing function, because 64 bits is 16
bytes using hex representation, plus the "webgl_" prefix,
we can keep the names under 128 (WebGL allows 5 levels of
nesting in structures). If chooseing 128 bits, we will
go beyond 128 characters, and some drivers can't handle
that safely.
ANGLEBUG=315
Review URL: https://codereview.appspot.com/6822077
git-svn-id: https://angleproject.googlecode.com/svn/branches/dx11proto@1466 736b8ea6-26fd-11df-bfd4-992fa37f6226
|
|
8d804799
|
2012-10-17T21:33:48
|
|
Add Variable Packing checks to ANGLE
BUG=373
TEST=unit tests
git-svn-id: https://angleproject.googlecode.com/svn/trunk@1317 736b8ea6-26fd-11df-bfd4-992fa37f6226
|
|
430f5e0c
|
2012-06-08T17:47:59
|
|
Add the SH_CSS_SHADERS_SPEC flag.
Review URL: https://codereview.appspot.com/6270050/
git-svn-id: https://angleproject.googlecode.com/svn/trunk@1145 736b8ea6-26fd-11df-bfd4-992fa37f6226
|
|
77222c97
|
2012-06-04T21:06:05
|
|
Apply SH_TIMING_RESTRICTIONS to all samplers.
Issue: 332
Review URL: https://codereview.appspot.com/6273044/
git-svn-id: https://angleproject.googlecode.com/svn/trunk@1131 736b8ea6-26fd-11df-bfd4-992fa37f6226
|
|
66ebd014
|
2012-05-30T22:18:11
|
|
Add the SH_TIMING_RESTRICTIONS compile flag and dependency graph implementation.
Description of the algorithm:
http://code.google.com/p/mvujovic/wiki/ShaderControlFlowAnalysis
This flag is one potential solution to timing attacks on textures containing cross-domain content
or user agent data.
This kind of analysis could be useful for both WebGL and CSS Shaders.
The SH_TIMING_RESTRICTIONS flag will reject a shader if it uses texture dependent data to affect
control flow.
Other ways of affecting shader timing such as using NaNs in basic arithmetic operations or using
built-in functions (e.g. atan) with different inputs are still under investigation.
Issue=329
Review URL: http://codereview.appspot.com/6195062/
git-svn-id: https://angleproject.googlecode.com/svn/trunk@1101 736b8ea6-26fd-11df-bfd4-992fa37f6226
|
|
b9f64aae
|
2012-01-20T00:35:15
|
|
Use a global ref-counted singleton for long name map.
This makes sure the same varying/uniform variables maps to the unique name in vertex/fragment shader.
BUG=
TEST=webgl conformance tests
Review URL: https://codereview.appspot.com/5556065
git-svn-id: https://angleproject.googlecode.com/svn/trunk@950 736b8ea6-26fd-11df-bfd4-992fa37f6226
|
|
9996b8e6
|
2012-01-19T01:43:55
|
|
Rollback r942.
MapLongVariableNames inherits from TIntermTraverser, and TIntermTraverser uses ANGLE's memory allocator, thus the memory is released per compilation. Our design is for MapLongVariableNames to be a singleton across all compilations, thus, this is not working.
BUG=
TEST=
TBR=kbr
Review URL: https://codereview.appspot.com/5556053
git-svn-id: https://angleproject.googlecode.com/svn/trunk@949 736b8ea6-26fd-11df-bfd4-992fa37f6226
|
|
4625d27b
|
2012-01-13T00:29:21
|
|
Long name mapping needs to be consistent between vertex/fragment shaders.
For example: varying variables, uniforms.
This CL makes MapLongVariableNames a ref-counted singleton and therefore, the map is shared by all shaders.
Also, function/variable names changes from Varying to Global because uniforms also need to be consistent, not just varying variables.
ANGLEBUG=279
TEST=webgl conformance tests, especially invalid-passed-params.html and glsl-long-variable-names.html
Review URL: http://codereview.appspot.com/5539046
git-svn-id: https://angleproject.googlecode.com/svn/trunk@942 736b8ea6-26fd-11df-bfd4-992fa37f6226
|
|
46974d29
|
2011-09-27T21:26:19
|
|
Fix memory corruption in ANGLE shader translator.
The bug is that within each compilation cycle, all the memory allocated through T* types are freed to be reused. So if certain information is meant to outlive the cycle, it should use the std type instead of the T* type:
1) emulated function vector
2) mapped long names map
BUG=none
TEST=webgl conformance test conformance/glsl/glsl-feature-mod-gentype.html does not crash in Win Debug.
Review URL: http://codereview.appspot.com/5137047
git-svn-id: https://angleproject.googlecode.com/svn/trunk@773 736b8ea6-26fd-11df-bfd4-992fa37f6226
|
|
32e97315
|
2011-08-24T01:03:11
|
|
Emulate certain buil-in functions to work around driver bugs.
This is implemented by adding a new compile option SH_EMULATE_BUILT_IN_FUNCTIONS. The emulated functions are names as webgl_originalName_emu so there will never be naming conflicts.
At the moment only three functions are emulated: normalize, abs, sign. Also, the compile option will emulate all three. However, the mechanism to emulate only a selected subset is also imeplemented. It can be turned on easily.
ANGLEBUG=196
TEST=with this option, the failed test with abs.frag passes.
Review URL: http://codereview.appspot.com/4916043
git-svn-id: https://angleproject.googlecode.com/svn/trunk@738 736b8ea6-26fd-11df-bfd4-992fa37f6226
|
|
b1762df4
|
2011-07-30T02:04:23
|
|
Detect function recursion and reject a shader if detected.
ANGLEBUG=191
TEST=shaders with function recursion are rejected.
Review URL: http://codereview.appspot.com/4808061
git-svn-id: https://angleproject.googlecode.com/svn/trunk@711 736b8ea6-26fd-11df-bfd4-992fa37f6226
|
|
5601ea0d
|
2011-06-10T18:23:25
|
|
Implement ES2 backend for Angle translator.
With this CL, we have the option to select a code output backend: GLSL, GLSL ES, or HLSL.
Note that we always emit the highest supported float precision for fragment shader due to anglebug 168. Although this is a temporary solution, it's not against GLSL ES spec, because it's ok for implementation to upgrade precision.
Tested with WebGL conformance test suite, GLES2 conformance test suite (only failed 2/1198), and a few webgl demos, including worlds of webgl, aquarium, etc.
anglebug=81
test=translator emitting correct GLSL ES code when ES2 backend is selected.
Review URL: http://codereview.appspot.com/4550129
git-svn-id: https://angleproject.googlecode.com/svn/trunk@687 736b8ea6-26fd-11df-bfd4-992fa37f6226
|
|
24c08c4e
|
2011-05-27T17:40:48
|
|
Fix the bug that long varying varibales are mapped into different names in fragment/vertex shaders.
ANGLEBUG=144
TEST=the same long varying variable name in fragment/vertex shaders map to the same shortened name if using the same translator.
Review URL: http://codereview.appspot.com/4547063
git-svn-id: https://angleproject.googlecode.com/svn/trunk@660 736b8ea6-26fd-11df-bfd4-992fa37f6226
|
|
5cb728c5
|
2011-05-17T18:34:24
|
|
Add missing newlines to source files
Issue=154
git-svn-id: https://angleproject.googlecode.com/svn/trunk@653 736b8ea6-26fd-11df-bfd4-992fa37f6226
|
|
fd747b86
|
2011-04-23T01:30:07
|
|
Implement shader identifier name mapping.
The name mapping happens when an identifier is longer than 32 characters. The name mapping is behind a flag, so it won't happen by default. Also, functions to query the mapped names are added.
The purpose of this CL is for the drivers that can't handle long names. For example, linux NVIDIA driver can't handle 256 character name, whereas WebGL spec requires that.
This CL also fixes the issue that some of the TIntermSymbols' ids are 0s.
ANGLEBUG=144
TEST=test manually with shaders with long identifier names.
Review URL: http://codereview.appspot.com/4428058
git-svn-id: https://angleproject.googlecode.com/svn/trunk@619 736b8ea6-26fd-11df-bfd4-992fa37f6226
|
|
83921386
|
2011-01-08T05:46:00
|
|
rewrite buffers implementation to support static buffers more efficiently
Bug=89
Trac #13565
Signed-off-by: Daniel Koch
Author: Nicolas Capens
git-svn-id: https://angleproject.googlecode.com/svn/trunk@526 736b8ea6-26fd-11df-bfd4-992fa37f6226
|
|
b59a778c
|
2010-11-24T18:38:33
|
|
Implemented validation for loop and indexing limitations specified by GLSL ES spec 1.0 Appendix A Section 4 and 5.
A couple of things to note:
- This CL only validates the "form" of loop and indexing. It does not detect number-of-iterations or out-of-bound access. This will require more involved analysis/heuristics.
- I haved combined SH_VALIDATE_CONTROL_FLOW and SH_VALIDATE_INDEXING into one flag - SH_VALIDATE_LOOP_INDEXING. Validating both together is much easier.
BUG=48
Review URL: http://codereview.appspot.com/3225041
git-svn-id: https://angleproject.googlecode.com/svn/trunk@491 736b8ea6-26fd-11df-bfd4-992fa37f6226
|
|
bafcbaa3
|
2010-11-23T19:07:43
|
|
Moved the global-pool-allocator to TCompiler so that all memory allocated by the compiler can be de-allocated. Earlier the global-pool-allocator kept accumulating memory from all compilers (symbol-table in particular). The memory was only de-allocated when gpu-process exited or ShFinalize() was called. This was a problem for Chromium which keeps the GPU process around for the browser session. Now the memory is de-allocated as soon as the compiler is deleted, which happens when a tab is closed.
BUG=58808 (crbug.com)
Review URL: http://codereview.appspot.com/3280041
git-svn-id: https://angleproject.googlecode.com/svn/trunk@489 736b8ea6-26fd-11df-bfd4-992fa37f6226
|
|
9ecf3950
|
2010-10-13T19:28:25
|
|
GLSL backend now emits "#version 120" to legally access invariant keyword and gl_PointCoord built-in variable.
BUG=35
Review URL: http://codereview.appspot.com/2341043
git-svn-id: https://angleproject.googlecode.com/svn/trunk@448 736b8ea6-26fd-11df-bfd4-992fa37f6226
|
|
4888ceb6
|
2010-10-01T21:13:12
|
|
Made the API of shader translator library consistent.
- We recently started using OpenGL-type enums. This CL makes all old enums consistent with the new scheme.
- Renamed TBuiltInResource to ShBuiltInResources to have a consistent prefix
BUG=46
Review URL: http://codereview.appspot.com/2328041
git-svn-id: https://angleproject.googlecode.com/svn/trunk@443 736b8ea6-26fd-11df-bfd4-992fa37f6226
|
|
07620a58
|
2010-09-23T17:53:56
|
|
- Moved the implementation for ShCompile to the compiler class so that internal details about compiler can be encapsulated. Now we do not need to expose built-in symbol table.
- Fixed a few const violations.
- Added CollectAttribsUniforms class.
BUG=26
Review URL: http://codereview.appspot.com/2263041
git-svn-id: https://angleproject.googlecode.com/svn/trunk@437 736b8ea6-26fd-11df-bfd4-992fa37f6226
|
|
ad771eb2
|
2010-09-07T17:36:23
|
|
Added mechanism to predefine associated macros for extensions. Also refactored the way extension behavior is initialized and updated.
Please note that I still need to add validation that appropriate extensions are enabled before using an extension function.
BUG=25
Review URL: http://codereview.appspot.com/2139042
git-svn-id: https://angleproject.googlecode.com/svn/trunk@413 736b8ea6-26fd-11df-bfd4-992fa37f6226
|
|
e4249f02
|
2010-07-26T18:13:52
|
|
Refactored the way symbol tables are initialized and stored. This was done in response to the addition of EShSpec.
Symbol table entries depend on three things - language, spec (not now but may eventually), and built-in resources.
We used to build two global symbol-tables - one for each language. During each compile, one of the symbol table was
copied and resource-specific stuff was added. I have moved the symbol table to TCompiler that gets initilized when
compiler is created and reused for each compile. This makes it much cleaner and extensible in case a spec requires
special entries to be added to the symbol table.
PS: Sorry for the long CL, but all of it needed to be done in one CL. I have verified that everything still compiles
and passes all conformance tests.
Review URL: http://codereview.appspot.com/1864044
git-svn-id: https://angleproject.googlecode.com/svn/trunk@351 736b8ea6-26fd-11df-bfd4-992fa37f6226
|
|
774d7063
|
2010-07-21T18:55:45
|
|
Cleaned up translator API. Deleted unsupported dead code.
BUG=9
Review URL: http://codereview.appspot.com/1665050
git-svn-id: https://angleproject.googlecode.com/svn/trunk@348 736b8ea6-26fd-11df-bfd4-992fa37f6226
|
|
613ef31a
|
2010-07-21T18:54:22
|
|
Added checks for webgl_ and _webgl_ reserved identifiers. This currently only checks variable and function names. Struct names and field names will be added in the another CL.
BUG=11
Review URL: http://codereview.appspot.com/1674050
git-svn-id: https://angleproject.googlecode.com/svn/trunk@346 736b8ea6-26fd-11df-bfd4-992fa37f6226
|
|
29cd91af
|
2010-07-16T19:30:45
|
|
Added an option for specifying language specification in preparation for supporting WebGL in addition to GLES2. This CL just replaces unused debugOptions variable with EShSpec variable.
BUG=11
Review URL: http://codereview.appspot.com/1692051
git-svn-id: https://angleproject.googlecode.com/svn/trunk@344 736b8ea6-26fd-11df-bfd4-992fa37f6226
|
|
bbf56f75
|
2010-04-20T18:52:13
|
|
Use directory qualified #include files
Trac #11408
Signed-off-by: Andrew Lewycky
Signed-off-by: Nicolas Capens
git-svn-id: https://angleproject.googlecode.com/svn/trunk@165 736b8ea6-26fd-11df-bfd4-992fa37f6226
|
|
76b82085
|
2010-03-24T17:59:39
|
|
Added GLSL backend for ESSL translator.
Review URL: http://codereview.appspot.com/698041
git-svn-id: https://angleproject.googlecode.com/svn/trunk@69 736b8ea6-26fd-11df-bfd4-992fa37f6226
|
|
ea0e1af4
|
2010-03-22T19:33:14
|
|
Minor reshuffling of directory structure in preparation of ESSL to GLSL compiler work.
1. Added include/GLSLANG which includes compiler API
2. Deleted src/include and moved the header files to the same directory as the corresponding source files
3. Modied include path to be relative to src/. I have only fixed paths for files I moved. We should fix it for all new files at least. It is much easier to see where an included file is coming from.
I noticed that a few libGLESv2 source files include headers from libEGL project, which seems wrong. I think we should address this issue. Next step: move compiler source files to compiler/frontend and create two new projects compiler/glsl_backend and compiler/hlsl_backend.
Review URL: http://codereview.appspot.com/662042
git-svn-id: https://angleproject.googlecode.com/svn/trunk@62 736b8ea6-26fd-11df-bfd4-992fa37f6226
|
|
acc51130
|
2010-03-17T13:12:17
|
|
mv Compiler/* -> src/compiler/*
Trac #11406
Signed-off-by: Nicolas Capens
git-svn-id: https://angleproject.googlecode.com/svn/trunk@37 736b8ea6-26fd-11df-bfd4-992fa37f6226
|