Commit Graph
4041 Commits
Author SHA1 Message Date
Geoff Lang dd2eb50450 Always use the highest GL version available unless requested.
BUG=angleproject:890

Change-Id: I76a1b1c455cb4be02b4b5c52153f5c87f33d426d
Reviewed-on: https://chromium-review.googlesource.com/275008
Reviewed-by: Kenneth Russell <[email protected]>
Tested-by: Geoff Lang <[email protected]>
2015-06-05 16:45:12 +00:00
Geoff Lang e44e829d40 Document OpenGL ES and EGL features, formats and extensions.
Change-Id: I38fb5acc5e0824035ccba55c28d12c8980c5905e
Reviewed-on: https://chromium-review.googlesource.com/275311
Reviewed-by: Zhenyao Mo <[email protected]>
Reviewed-by: Kenneth Russell <[email protected]>
Tested-by: Geoff Lang <[email protected]>
2015-06-05 13:46:31 +00:00
Jamie Madill b3da45c12d Revert "Add constant folding support for geometric built-ins"
This is failing gpu_unittests on Mac:

ShaderTranslatorTest.BuiltInFunctionEmulation:
../../gpu/command_buffer/service/shader_translator_unittest.cc:314: Failure
Value of: strstr(translated_source.c_str(), "webgl_dot_emu") != NULL
Actual: false
Expected: true

Reverting until we can fix the overly-narrow test.

BUG=angleproject:913

This reverts commit b50788d11d.

Change-Id: I5bd9df83704e771e419339745eceaa43a20bd1e6
Reviewed-on: https://chromium-review.googlesource.com/275320
Reviewed-by: Jamie Madill <[email protected]>
Tested-by: Jamie Madill <[email protected]>
2015-06-04 19:44:18 +00:00
Jamie Madill aebd002d00 Revert "Make sure type gets set consistently in folded binary operations"
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]>
2015-06-04 19:43:58 +00:00
Geoff Lang c84e20ee15 Revert "Add a flush before looping to get the sync status."
Apparently even a flush isn't enough on some Intel drivers.

This reverts commit 73410e42c8.

Change-Id: Iafdd1cbb4e89d30ebe3be6404f0bf4e586d91b8d
Reviewed-on: https://chromium-review.googlesource.com/275305
Reviewed-by: Geoff Lang <[email protected]>
Tested-by: Geoff Lang <[email protected]>
2015-06-04 18:38:31 +00:00
Olli Etuaho b07aba0798 Make sure type gets set consistently in folded binary operations
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]>
2015-06-04 10:15:58 +00:00
Arun Patole b50788d11d Add constant folding support for geometric built-ins
* re-land after mac compilation fix (unsupported c++11 initializer) *

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: I236fc0c1af47a63f359564500c711e6bedf1c808
Reviewed-on: https://chromium-review.googlesource.com/274789
Reviewed-by: Jamie Madill <[email protected]>
Tested-by: Olli Etuaho <[email protected]>
2015-06-04 09:19:58 +00:00
Olli Etuaho 8f76bcc4ed Add unit test for RemovePow
Add two versions of the test - one with a single pow(), and another with
a nested pow().

TEST=angle_unittests
BUG=477306

Change-Id: Idb38e57a4b2522b7794996d6ea0f0456b349abf7
Reviewed-on: https://chromium-review.googlesource.com/274736
Reviewed-by: Jamie Madill <[email protected]>
Tested-by: Olli Etuaho <[email protected]>
2015-06-04 08:25:08 +00:00
Geoff Lang 73410e42c8 Add a flush before looping to get the sync status.
Intel GPUs enter an infinite loop unless told to flush.

BUG=angleproject:1038

Change-Id: I7c3d9dd08bf1ee09cb163dd859f817379a72cd65
Reviewed-on: https://chromium-review.googlesource.com/274942
Reviewed-by: Corentin Wallez <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
Tested-by: Geoff Lang <[email protected]>
2015-06-03 20:28:32 +00:00
Geoff Lang 27359ff758 Read the proper uniform location instead of assuming location 0.
Fixes MipMapTest on Intel/OpenGL.

BUG=angleproject:1038

Change-Id: I19a0704969ef03d5d2ee3c9092daf4bd3a9818f7
Reviewed-on: https://chromium-review.googlesource.com/274818
Reviewed-by: Corentin Wallez <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
Tested-by: Geoff Lang <[email protected]>
2015-06-03 20:27:24 +00:00
Geoff Lang 2469dad944 Load the framebuffer and vertex array object extensions.
BUG=angleproject:879
BUG=angleproject:1038

Change-Id: Idd2ad36707c17d13c45bc4fc131ec1ebfc45e0a5
Reviewed-on: https://chromium-review.googlesource.com/274817
Reviewed-by: Corentin Wallez <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
Tested-by: Geoff Lang <[email protected]>
2015-06-03 20:26:40 +00:00
Olli Etuaho 5bdb8472b2 Remove unused QualifierAlive traverser
This class is not used anywhere in the code.

TEST=angle_unittests

Change-Id: Ib59573203636a669b136e3823d0abea8120f448e
Reviewed-on: https://chromium-review.googlesource.com/274896
Tested-by: Olli Etuaho <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
Reviewed-by: Zhenyao Mo <[email protected]>
2015-06-03 17:26:36 +00:00
Geoff Lang 19fafa4b08 Fix incorrect value being synced for the alpha blend equation.
Fixes angle_end2end_test BlendMinMaxTest with the blend_minmax extension
enabled.

BUG=angleproject:883

Change-Id: Iae2441d11a3c4c497a1ddc4d250120fd85175d52
Reviewed-on: https://chromium-review.googlesource.com/274802
Reviewed-by: Jamie Madill <[email protected]>
Tested-by: Geoff Lang <[email protected]>
2015-06-03 13:59:40 +00:00
Jamie Madill 2f4823bf44 Revert "Add constant folding support for geometric built-ins"
Breaks Mac build because of C++11 init syntax:

FAILED: /b/build/goma/gomacc ../../third_party/llvm-build/Release+Asserts/bin/clang++ -MMD -MF obj/third_party/angle/src/tests/compiler_tests/angle_unittests.ConstantFolding_test.o.d -DV8_DEPRECATION_WARNINGS -D__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORE=0 -DCHROMIUM_BUILD -DCR_CLANG_REVISION=238013-3 -DCOMPONENT_BUILD -DTOOLKIT_VIEWS=1 -DUSE_LIBJPEG_TURBO=1 -DENABLE_ONE_CLICK_SIGNIN -DENABLE_PRE_SYNC_BACKUP -DENABLE_REMOTING=1 -DENABLE_WEBRTC=1 -DENABLE_MEDIA_ROUTER=1 -DUSE_PROPRIETARY_CODECS -DENABLE_PEPPER_CDMS -DENABLE_CONFIGURATION_POLICY -DENABLE_NOTIFICATIONS -DENABLE_HIDPI=1 -DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE -DDONT_EMBED_BUILD_METADATA -DDCHECK_ALWAYS_ON=1 -DENABLE_TASK_MANAGER=1 -DENABLE_EXTENSIONS=1 -DENABLE_PLUGIN_INSTALLATION=1 -DENABLE_PLUGINS=1 -DENABLE_SESSION_SERVICE=1 -DENABLE_THEMES=1 -DENABLE_AUTOFILL_DIALOG=1 -DENABLE_BACKGROUND=1 -DENABLE_GOOGLE_NOW=1 -DCLD_VERSION=2 -DENABLE_PRINTING=1 -DENABLE_BASIC_PRINTING=1 -DENABLE_PRINT_PREVIEW=1 -DENABLE_SPELLCHECK=1 -DENABLE_CAPTIVE_PORTAL_DETECTION=1 -DENABLE_APP_LIST=1 -DENABLE_SETTINGS_APP=1 -DENABLE_SUPERVISED_USERS=1 -DENABLE_SERVICE_DISCOVERY=1 -DENABLE_WIFI_BOOTSTRAPPING=1 -DV8_USE_EXTERNAL_STARTUP_DATA -DFULL_SAFE_BROWSING -DSAFE_BROWSING_CSD -DSAFE_BROWSING_DB_LOCAL -DSAFE_BROWSING_SERVICE -DGTEST_HAS_POSIX_RE=0 -DGTEST_LANG_CXX11=0 -DGL_APICALL= -DGL_GLEXT_PROTOTYPES= -DEGLAPI= '-DANGLE_PRELOADED_D3DCOMPILER_MODULE_NAMES={ "d3dcompiler_47.dll", "d3dcompiler_46.dll", "d3dcompiler_43.dll" }' -DANGLE_TRANSLATOR_STATIC -DUSE_LIBPCI=1 -DUSE_OPENSSL=1 -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DWTF_USE_DYNAMIC_ANNOTATIONS=1 -Igen -I../.. -I../../third_party/angle/include -I../../third_party/angle/src -I../../third_party/angle/src/compiler/preprocessor -I../../third_party/angle/src/tests -Igen/angle -I../../testing/gmock/include -I../../testing/gtest/include -isysroot /Applications/Xcode5.1.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk -O0 -gdwarf-2 -fvisibility=hidden -Werror -Wnewline-eof -mmacosx-version-min=10.6 -arch x86_64 -Wall -Wendif-labels -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wno-selector-type-mismatch -Wpartial-availability -Wheader-hygiene -Wno-char-subscripts -Wno-unneeded-internal-declaration -Wno-covered-switch-default -Wstring-conversion -Wno-c++11-narrowing -Wno-deprecated-register -Wno-inconsistent-missing-override -std=c++11 -fno-rtti -fno-exceptions -fvisibility-inlines-hidden -fno-threadsafe-statics -Xclang -load -Xclang /b/build/slave/GPU_Mac_Builder__dbg_/build/src/third_party/llvm-build/Release+Asserts/lib/libFindBadConstructs.dylib -Xclang -add-plugin -Xclang find-bad-constructs -Xclang -plugin-arg-find-bad-constructs -Xclang check-templates -fcolor-diagnostics -fno-strict-aliasing -fstack-protector-all -Wno-undefined-bool-conversion -Wno-tautological-undefined-compare  -c ../../third_party/angle/src/tests/compiler_tests/ConstantFolding_test.cpp -o obj/third_party/angle/src/tests/compiler_tests/angle_unittests.ConstantFolding_test.o
../../third_party/angle/src/tests/compiler_tests/ConstantFolding_test.cpp:210:43: error: no matching constructor for initialization of 'std::vector<float>'
    ASSERT_FALSE(constantVectorFoundInAST(std::vector<float>{1.0f, 1.0f, 1.0f}));
                                          ^                 ~~~~~~~~~~~~~~~~~~


BUG=angleproject:913

This reverts commit 2decb4b155.

Change-Id: Iaf3c61a0c0ed591c17f50f2e3eafe2debf588c95
Reviewed-on: https://chromium-review.googlesource.com/274917
Reviewed-by: Jamie Madill <[email protected]>
Tested-by: Jamie Madill <[email protected]>
2015-06-03 12:39:51 +00:00
Arun Patole 2decb4b155 Add constant folding support for geometric built-ins
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]>
2015-06-03 11:31:15 +00:00
Jamie Madill c7be82aef9 Change behaviour of string_utils, also fix file io.
File IO tested manually in a follow-up patch.

BUG=angleproject:998

Change-Id: I0bfa778d1787cdedfbf3cd68cd134477e6dcd23c
Reviewed-on: https://chromium-review.googlesource.com/274030
Reviewed-by: Geoff Lang <[email protected]>
Tested-by: Jamie Madill <[email protected]>
2015-06-02 16:36:18 +00:00
Jamie Madill 10eb591a43 D3D11: Optimize sample caps checks.
We don't need to check NPOT sample counts. This should save us some
time on eglInitialize.

BUG=angleproject:1014

Change-Id: Id3b0a440689746d5de9a7fbc3641ff9452b18601
Reviewed-on: https://chromium-review.googlesource.com/274430
Tested-by: Jamie Madill <[email protected]>
Reviewed-by: Geoff Lang <[email protected]>
2015-06-02 13:46:49 +00:00
Olli Etuaho 5c407bb7c9 Work around pow() issue in NVIDIA 331.x drivers
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]>
2015-06-02 10:40:42 +00:00
Geoff Lang 6bef4ff7e9 Revert "In D3D11, check for 16-bit texture support and use if possible"
Seeing failures on Win7 + Intel machines.

Example build:
https://build.chromium.org/p/chromium.gpu.fyi/builders/Win7%20Release%20%28Intel%29/builds/11756

This reverts commit 673115d9cc.

Change-Id: Ie2b6cc1ae9c4e83dde3a531e38252c95ac2e2a0a
Reviewed-on: https://chromium-review.googlesource.com/274450
Reviewed-by: Geoff Lang <[email protected]>
Tested-by: Geoff Lang <[email protected]>
2015-06-01 21:09:03 +00:00
Geoff Lang ae6584e609 Sync the scissor tests state before clearing.
Fixes:
 * conformance/rendering/gl-scissor-fbo-test.html
 * conformance/rendering/gl-scissor-canvas-dimensions.html

BUG=angleproject:883

Change-Id: Icd337894f1dbc7464a4566bfab9a30b70fd4bbfa
Reviewed-on: https://chromium-review.googlesource.com/274445
Reviewed-by: Jamie Madill <[email protected]>
Tested-by: Geoff Lang <[email protected]>
2015-06-01 20:36:07 +00:00
Austin Kinross fbd7820c2c Fix flaky WebGL point-sprites test when using instanced point sprites
Change-Id: I7d417016d9fa3a2e49806543d981ab98a3e71cbc
Reviewed-on: https://chromium-review.googlesource.com/273914
Tested-by: Austin Kinross <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
Reviewed-by: Geoff Lang <[email protected]>
2015-06-01 19:26:42 +00:00
Austin Kinross 673115d9cc In D3D11, check for 16-bit texture support and use if possible
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]>
2015-06-01 19:26:10 +00:00
Geoff Lang fd216c41f7 Support BGRA texture by remapping the internal format to RGBA.
The format is still passed as BGRA to the driver so that the data can be
properly unpacked.

BUG=angleproject:884

Change-Id: I767626c818ce1a3c5a4739f07aa623bf8a9ae377
Reviewed-on: https://chromium-review.googlesource.com/273162
Reviewed-by: Brandon Jones <[email protected]>
Reviewed-by: Kenneth Russell <[email protected]>
Tested-by: Geoff Lang <[email protected]>
2015-05-29 19:34:55 +00:00
Geoff Lang 6683032d06 Add remaining unsized formats to the GL format tables.
BUG=angleproject:884

Change-Id: I53e7ff9e35b820573691df0d23b41ef45e2a07d0
Reviewed-on: https://chromium-review.googlesource.com/273590
Tested-by: Geoff Lang <[email protected]>
Reviewed-by: Brandon Jones <[email protected]>
Reviewed-by: Kenneth Russell <[email protected]>
2015-05-29 19:34:36 +00:00
Shawn Hargreaves 7eabe51e3b Add ANGLE_REVISION sub-identifier to the DLL versioning scheme
Change-Id: Ie9df84957801def2db72a382f4860bbe4e06002f
Reviewed-on: https://chromium-review.googlesource.com/274051
Tested-by: Shawn Hargreaves <[email protected]>
Reviewed-by: Geoff Lang <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
2015-05-29 17:59:08 +00:00
Jamie Madill ce232678da Add a perf test for eglInitialize.
Also shutdown performance, since it's not easy to only test one.

BUG=angleproject:1014

Change-Id: I9d06426788ed336031271f8876589b111f1294b7
Reviewed-on: https://chromium-review.googlesource.com/273974
Tested-by: Jamie Madill <[email protected]>
Reviewed-by: Geoff Lang <[email protected]>
Reviewed-by: Brandon Jones <[email protected]>
2015-05-29 17:54:00 +00:00
Geoff Lang 4031b99416 Don't enable opengl on linux unless x11 is also available.
BUG=493682

Change-Id: I10d5b710fcc9b51160c3aff169d1af839212003c
Reviewed-on: https://chromium-review.googlesource.com/273976
Reviewed-by: Jamie Madill <[email protected]>
Tested-by: Geoff Lang <[email protected]>
2015-05-29 15:37:32 +00:00
Jamie Madill 57df19ce26 Add timing stats for Renderer11::initializeDevice.
This gives us insight to what we can optimize away.

BUG=angleproject:1014

Change-Id: I86208c5cbebe14905a05d0859b9e37368f4c25d4
Reviewed-on: https://chromium-review.googlesource.com/273862
Reviewed-by: Geoff Lang <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
Tested-by: Jamie Madill <[email protected]>
2015-05-28 17:58:44 +00:00
Geoff Lang c3ab9f7fe4 Disable UNIMPLEMENTED in ProgramGL::applyUniforms.
Disables lots of assertion failures in WebGL CTS.

BUG=angleproject:882

Change-Id: I407397a256955d608dbf1234e4e391704653bb5a
Reviewed-on: https://chromium-review.googlesource.com/273547
Reviewed-by: Jamie Madill <[email protected]>
Tested-by: Geoff Lang <[email protected]>
2015-05-28 17:56:27 +00:00
Geoff Lang 6db25f15e7 Always init gl_Position in vertex shaders in ShaderGL.
Fixes:
 * conformance/glsl/misc/empty_main.vert.html
 * conformance/glsl/misc/gl_position_unset.vert.html

BUG=angleproject:882

Change-Id: I92a465b58f319b14e4f697d9bb5b45427a6247c0
Reviewed-on: https://chromium-review.googlesource.com/273548
Reviewed-by: Jamie Madill <[email protected]>
Reviewed-by: Corentin Wallez <[email protected]>
Tested-by: Geoff Lang <[email protected]>
2015-05-28 17:55:38 +00:00
Geoff Lang bf6f48ff06 Bind renderbuffers as soon as they are generated.
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]>
2015-05-28 17:54:42 +00:00
Olli Etuaho 4785fec97a Clean up most common extra semicolons and braces in HLSL output
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]>
2015-05-28 17:43:08 +00:00
Olli Etuaho 4d59f3c6b7 Make false blocks produced by RewriteElseBlocks sequence nodes
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]>
2015-05-28 16:49:29 +00:00
bungeman 46ccef1992 Remove ref to intermediate.h.
With
https://chromium-review.googlesource.com/213300
b9b5c10579

the file intermediate.h was renamed Intermediate.h. However,
compiler.gypi now contains references to both, but the lower case
version doesn't exist anymore, so it should be removed.

Change-Id: I6b36bd561f110694daecd4ad911036c94300cd1f
Reviewed-on: https://chromium-review.googlesource.com/273593
Reviewed-by: Geoff Lang <[email protected]>
Tested-by: Geoff Lang <[email protected]>
2015-05-28 13:57:35 +00:00
Geoff Lang 08dcfed6a7 Encapsulate GL version and standard into a struct and enum.
Change-Id: I9f51971c1bfd51424605b2687b5fd107d58c9a67
Reviewed-on: https://chromium-review.googlesource.com/273139
Reviewed-by: Jamie Madill <[email protected]>
Tested-by: Geoff Lang <[email protected]>
Reviewed-on: https://chromium-review.googlesource.com/273572
Reviewed-by: Geoff Lang <[email protected]>
2015-05-27 21:21:53 +00:00
Geoff Lang 51d4f0443f Revert "Encapsulate GL version and standard into a struct and enum."
Linux didn't like compiling this.

This reverts commit 03f589122e.

Change-Id: Ifd0824caeb02791b4acc5e4bca330ecdc8164b11
Reviewed-on: https://chromium-review.googlesource.com/273583
Reviewed-by: Geoff Lang <[email protected]>
Tested-by: Geoff Lang <[email protected]>
2015-05-27 21:10:54 +00:00
Geoff Lang 03f589122e Encapsulate GL version and standard into a struct and enum.
Change-Id: Ib3c37627298976040d5a333f4c845a7b2620dd30
Reviewed-on: https://chromium-review.googlesource.com/273139
Reviewed-by: Jamie Madill <[email protected]>
Tested-by: Geoff Lang <[email protected]>
2015-05-27 21:01:12 +00:00
Corentin Wallez 51e2ad1457 Do not always use X11 for Linux builds, inherit Chromium's settings
This fixes project generation for Chromium for non-X11 builds

BUG=angleproject:1011

Change-Id: If528f63fb186d834d56a43ca379497d99e74777e
Reviewed-on: https://chromium-review.googlesource.com/273163
Reviewed-by: Geoff Lang <[email protected]>
Tested-by: Corentin Wallez <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
2015-05-27 17:13:29 +00:00
Corentin Wallez 44aedf377f Enable PbufferTest on Linux by not advertising bindable configs
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]>
2015-05-27 14:30:58 +00:00
Corentin Wallez 5c798fe97d Enable OcclusionQueriesTest on Linux
This includes an implementation of a cross platform Sleep function

BUG=angleproject:892

Change-Id: I1087a00ab204b37bafc5e95a9766962b194d97ef
Reviewed-on: https://chromium-review.googlesource.com/273133
Reviewed-by: Geoff Lang <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
Tested-by: Corentin Wallez <[email protected]>
2015-05-27 14:29:34 +00:00
Arun Patole 9d0b1f9b58 Constant fold vector relational built-ins
This change adds constant folding support for vector relational
built-ins.

BUG=angleproject:913
TEST=dEQP Tests
dEQP-GLES3.functional.shaders.constant_expressions.builtin_functions.vector_relational*
(Fixes all 138 tests)

Change-Id: I291e332f2afb3ce3d6596e634f509995dbf35164
Reviewed-on: https://chromium-review.googlesource.com/272344
Reviewed-by: Olli Etuaho <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
Tested-by: Jamie Madill <[email protected]>
2015-05-27 14:22:57 +00:00
Geoff Lang 8e7549bde2 Revert "In D3D11, check for 16-bit texture support and use if possible"
Causing failures on Windows 8 bots running ES CTS and Windows 7 Intel bot running angle tests.

Example failures:
https://build.chromium.org/p/chromium.gpu.fyi/builders/Win8%20Release%20%28NVIDIA%29/builds/14442
https://build.chromium.org/p/chromium.gpu.fyi/builders/Win7%20Release%20%28Intel%29/builds/11627

This reverts commit d63f08fcc3.

Change-Id: I841aee5fb0973432f249277126424b909d5b3e17
Reviewed-on: https://chromium-review.googlesource.com/273416
Reviewed-by: Geoff Lang <[email protected]>
Tested-by: Geoff Lang <[email protected]>
2015-05-27 14:05:26 +00:00
Geoff Lang 294cad9d70 When applying vertex array objects, update the currently applied index buffer.
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]>
2015-05-27 13:53:19 +00:00
Geoff Lang 90d98afac1 Bind a texture after creation so that it has a type.
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]>
2015-05-27 13:39:09 +00:00
Geoff Lang 851cd580d1 Check for null attribute buffers before binding.
Fixes:
 * Crash in conformance/extensions/oes-vertex-array-object.html

BUG=angleproject:880

Change-Id: I90eba9b26b2834644ce3ba0e78cab3417c2a7bd1
Reviewed-on: https://chromium-review.googlesource.com/273325
Tested-by: Geoff Lang <[email protected]>
Reviewed-by: Brandon Jones <[email protected]>
Reviewed-by: Kenneth Russell <[email protected]>
2015-05-27 13:17:09 +00:00
Olli Etuaho 4f1af7847f Handle function calls where returned array is not used
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]>
2015-05-27 12:48:12 +00:00
Olli Etuaho 950457b302 Fix destructing TStrings through BuiltInFunctionEmulator after free
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]>
2015-05-27 06:08:19 +00:00
Olli Etuaho c378cd8aeb Check that #version 300 es directive is on the first line
ESSL3.00 and 3.10 specs don't allow even newlines before the version
directive.

BUG=angleproject:1009
TEST=WebGL 2 conformance tests, angle_unittests

Change-Id: Id7967829077e35e03572c724e0eafffbed0c975b
Reviewed-on: https://chromium-review.googlesource.com/272719
Reviewed-by: Jamie Madill <[email protected]>
Tested-by: Olli Etuaho <[email protected]>
Reviewed-by: Zhenyao Mo <[email protected]>
2015-05-27 06:00:32 +00:00
Olli Etuaho a357236f48 Fix small issues in array related AST transformations
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]>
2015-05-27 06:00:11 +00:00
Geoff Lang 113bc73e8b Fix missing break statements.
Fixes:
 * conformance/glsl/functions/glsl-function*

BUG=angleproject:883

Change-Id: I22a528c6ba4c4077ba47269e14396b4117d1c849
Reviewed-on: https://chromium-review.googlesource.com/273169
Tested-by: Geoff Lang <[email protected]>
Reviewed-by: Brandon Jones <[email protected]>
2015-05-26 20:03:33 +00:00