Граф коммитов

303 Коммитов

Автор SHA1 Сообщение Дата
Shahbaz Youssefi f0dd087edf Move timer functionality from util/ to common/
The main timer functionality (get absolute time) is moved to common/ for
use in ANGLE itself (in upcoming overlay change).  util/Timer.h is no
longer an abstract class and uses this functionality to implement the
timer.

Bug: angleproject:3757
Change-Id: I3fe418778d80d1089c9bfe43a9e8098e43236f18
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1769061
Reviewed-by: Cody Northrop <cnorthrop@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
2019-08-30 17:05:57 +00:00
Stuart Morgan 9d737966ac Standardize copyright notices to project style
For all "ANGLE Project" copyrights, standardize to the format specified
by the style guide. Changes:
- "Copyright (c)" and "Copyright(c)" changed to just "Copyright".
- Removed the second half of date ranges ("Y1Y1-Y2Y2"->"Y1Y1").
- Fixed a small number of files that had no copyright date using the
  initial commit year from the version control history.
- Fixed one instance of copyright being "The ANGLE Project" rather than
  "The ANGLE Project Authors"

These changes are applied both to the copyright of source file, and
where applicable to copyright statements that are generated by
templates.

BUG=angleproject:3811

Change-Id: I973dd65e4ef9deeba232d5be74c768256a0eb2e5
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1754397
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2019-08-14 23:05:33 +00:00
James Darpinian 7e48c9eb99 Add explicit integer casts
WebKit uses the -Wshorten-64-to-32 flag which warns on these cases.

Bug: 3439
Change-Id: I8c1de60da0f173ca2036e2120e79b857f5f2775f
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1740866
Commit-Queue: James Darpinian <jdarpinian@chromium.org>
Reviewed-by: Kenneth Russell <kbr@chromium.org>
2019-08-14 00:52:47 +00:00
Cody Northrop a2129356e9 Vulkan: Add support for 2D array textures
Includes changes from jmadill to align with Vulkan backend design.

Correctly setting layer count and depth when the texture type is
2Darray. Vulkan requires depth of 1 for 2Darray textures.

Bug: angleproject:3189
Change-Id: I0d58c33fcd75b1d768ea0308ac6e54230d8cfcc5
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1721169
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
Commit-Queue: Cody Northrop <cnorthrop@google.com>
2019-07-26 19:05:13 +00:00
Jamie Madill deb43a31cc Vulkan: Store VkExtents3D in ImageHelper.
This makes the distinction between a gl::Extents (includes a depth
value for 2D array texture layer count) and a Vulkan extents (2D array
textures have a "1" for depth) clearer. Preparation refactor patch.

Bug: angleproject:3189
Change-Id: I9a13379c421e7f3c7856ac15b7a73013258ab9fe
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1709754
Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
Reviewed-by: Cody Northrop <cnorthrop@google.com>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2019-07-22 20:26:18 +00:00
Clemen Deng a71a8c6660 ANGLE tests loading wrong opengl32.dll
ANGLE tests try to load opengl32.dll from ANGLE directory instead of system
Bug: angleproject:3645
Change-Id: I3a8cea37252d13e915ff54ae6bbac920db16e4c4
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1688544
Commit-Queue: Clemen Deng <clemendeng@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
2019-07-04 20:40:21 +00:00
Jamie Madill 77c8496b5f Re-land "Cleanup angle_libs_suffix in BUILD.gn."
We can use output_name instead of repeating the libs suffix in the GN
files.

The re-land adds automatic suffix application on Android. This makes
the configuration a bit simpler and should detect future breakage. Also
cleans up some of the "angle_libraries" code.

Bug: angleproject:3611
Change-Id: I4971d1085ca67802c916655c30efb7df4001f040
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1679993
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2019-06-28 17:47:11 +00:00
Jamie Madill 3e6e70bba7 Revert "Cleanup angle_libs_suffix in BUILD.gn."
This reverts commit 625f5b2fbd.

Reason for revert: Seems to break the Android build with suffix:

~/chromium/src$ gn args out/Release64
Waiting for editor on "/usr/local/google/home/cnorthrop/chromium/src/out/Release64/args.gn"...
Generating files...
ERROR Unresolved dependencies.
//third_party/angle:compressed_symbols(//build/toolchain/android:android_clang_arm)
  needs //third_party/angle:libEGL_angle(//build/toolchain/android:android_clang_arm)
//third_party/angle:compressed_symbols(//build/toolchain/android:android_clang_arm)
  needs //third_party/angle:libGLESv1_CM_angle(//build/toolchain/android:android_clang_arm)

<snip>

Original change's description:
> Cleanup angle_libs_suffix in BUILD.gn.
> 
> We can use output_name instead of repeating the libs suffix in the GN
> files.
> 
> Bug: angleproject:3611
> Change-Id: Ic87c1378aac8be8e1aec695ddbe5c8ec2ed3187b
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1678403
> Commit-Queue: Jamie Madill <jmadill@chromium.org>
> Reviewed-by: Tim Van Patten <timvp@google.com>
> Reviewed-by: Geoff Lang <geofflang@chromium.org>

TBR=geofflang@chromium.org,timvp@google.com,jmadill@chromium.org

Change-Id: I532d9cf28c21ddf65d820d3fc323c87dbc844d96
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: angleproject:3611
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1679990
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2019-06-28 14:46:01 +00:00
Jamie Madill 625f5b2fbd Cleanup angle_libs_suffix in BUILD.gn.
We can use output_name instead of repeating the libs suffix in the GN
files.

Bug: angleproject:3611
Change-Id: Ic87c1378aac8be8e1aec695ddbe5c8ec2ed3187b
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1678403
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
2019-06-28 12:18:15 +00:00
Geoff Lang eef34e178f Don't request backend version in the sample application.
The major and minor versions in EGLPlatformParameters are for the backend
version (eg D3D 10 vs 10.1 vs 11.0), not the GLES version exposed.

BUG=angleproject:3499

Change-Id: I4bf89769b4eab397cdc2e3c51ed94c1e57c4d54b
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1643421
Commit-Queue: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
2019-06-05 18:30:11 +00:00
Mingyu Hu ebab670cb3 Adding new extension GL_OVR_multiview
GL_OVR_multiview functions exactly the same as GL_OVR_multiview2.
All GL_OVR_multiview2 tests now also repeat the same test using GL_OVR_multiview

Bug: angleproject:3341
Change-Id: I7e5294fb6bbf7692535174a15da6a42e1b5fc4e2
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1575904
Commit-Queue: Rafael Cintron <rafael.cintron@microsoft.com>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
2019-05-08 23:14:55 +00:00
Jamie Madill 3089f92e8a Move EGL Display config into EGLPlatformParameters.
This CL moves all of the EGLDisplay configuration into an EGL platform
struct. Consolidating display configuration in the struct allows us to
move configuration out of the test constructor. Then when we filter
test configs we don't need to wait for the individual test setup.

Bug: angleproject:3393
Change-Id: I5bd06dcdc9f2867ebc43c1d4984077ada35cafc8
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1574674
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
2019-05-01 21:07:47 +00:00
Jamie Madill 0659c99131 Set swap interval explicitly.
The swap interval can be changed independent of the Surface config.
Thus it makes more sense to set it explicitly in test setup. This
simplifies the test config.

Also updates some of the API for GLWindowBase. Return an explicit
error from makeCurrent.

Bug: angleproject:3393
Change-Id: Ic62b33018e872bc0e38f2848e2427ed898b60749
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1574672
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2019-05-01 14:50:20 +00:00
Mingyu Hu 7d64c4863d GL_ANGLE_multiview has been renamed to GL_OVR_multiview2.
changes include:
1) GL_OVR_multiview to GL_OVR_multiview2 extension directive change
2) Removal of all references to side by side. We no longer support multiple views in a single 2DTexture. Only 2DTextureArray's are supported
3) WebGL 2 (ES3) is required for multiview

Bug: angleproject:3341
Change-Id: Ie0c1d21d7610f8feebdb2e4d01c6947f57e69328
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1552023
Commit-Queue: Rafael Cintron <rafael.cintron@microsoft.com>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
2019-04-16 17:37:10 +00:00
Jamie Madill 0f566fc77c Introduce ConfigParameters test helper struct.
This allows us to more easily compare sets of parameters used in our
tests. The config parameters are stuff like the red / gree / blue bits
used in an EGL config. Or particular sets of extensions or other
EGL options.

This will more easily allow us to determine when we need to use a new
EGL display instead of reusing a prior.

Bug: angleproject:3261
Change-Id: Ia1f0ede988e0b4084fbb4d55097e94fd89ee4899
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1531535
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
2019-03-20 16:54:53 +00:00
Jamie Madill 7098cff5c5 Make BUILD.gn targets into templates.
This allows us to "globally" add and remove certain configs as long as
we use the new templates. This simplifies the logic of adding configs
for stuff like extra warnings and default include dirs. As well it
simplifies removing certain common unwanted configs.

Generally simplifies the logic in BUILD.gn. Will allow for easily
suppressing the clang-plugins config instead of using a global setting
in .gn. Then we can enable the additional warnings config-by-config.

Also fixes some warnings that turned up after we enabled the extra
warnings config in our tests. Also moves the dEQP tests main to be
consistent with the other test main files.

Bug: angleproject:3069
Change-Id: I5a8166cd0f5a7926822c171fcaf473fc86b3ffc1
Reviewed-on: https://chromium-review.googlesource.com/c/1409871
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
2019-01-16 00:35:58 +00:00
Jamie Madill ad398ee839 Free OSWindow and EGLWindow through helpers.
This cleans up any potential problems with allocating and freeing
resources in different shared objects or DLLs. Previously we were
using a dynamically linked allocation function and then calling
the standard delete function.

Also adds a base class helper for EGLWindow. Will base the WGL
Window class on this.

Needed for running ANGLE tests against native drivers.

Bug: angleproject:2995
Change-Id: Ic92b447649ebb32c547605c20086c07a601842f0
Reviewed-on: https://chromium-review.googlesource.com/c/1393443
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
2019-01-03 18:42:50 +00:00
Jamie Madill ba319ba31c Re-land "Load entry points dynamically in tests and samples."
Fixes the Android/ChromeOS/Fuchsia builds by using consistent EGL
headers.

This CL adds a dynamic loader generator based on XML files. It also
refactors the entry point generation script to move the XML parsing
into a helper class.

Additionally this includes a new GLES 1.0 base header. The new
header allows for function pointer types and hiding prototypes.

All tests and samples now load ANGLE dynamically. In the future this
will be extended to load entry points from the driver directly when
possible. This will allow us to perform more accurate A/B testing.

The new build configuration leads to some tests having more warnings
applied. The CL includes fixes for the new warnings.

Bug: angleproject:2995
Change-Id: I5a8772f41a0f89570b3736b785f44b7de1539b57
Reviewed-on: https://chromium-review.googlesource.com/c/1392382
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2019-01-01 18:56:45 +00:00
Yuly Novikov 9f088621eb Revert "Load entry points dynamically in tests and samples."
This reverts commit 03923558a7.

Reason for revert: fails compilation on Android, ChromeOS and Fuchsia during roll https://chromium-review.googlesource.com/c/chromium/src/+/1392624

Original change's description:
> Load entry points dynamically in tests and samples.
> 
> This CL adds a dynamic loader generator based on XML files. It also
> refactors the entry point generation script to move the XML parsing
> into a helper class.
> 
> Additionally this includes a new GLES 1.0 base header. The new
> header allows for function pointer types and hiding prototypes.
> 
> All tests and samples now load ANGLE dynamically. In the future this
> will be extended to load entry points from the driver directly when
> possible. This will allow us to perform more accurate A/B testing.
> 
> The new build configuration leads to some tests having more warnings
> applied. The CL includes fixes for the new warnings.
> 
> Bug: angleproject:2995
> Change-Id: I6726d4163f7a6e54d2482f094c0a952f59702a05
> Reviewed-on: https://chromium-review.googlesource.com/c/1359516
> Commit-Queue: Jamie Madill <jmadill@chromium.org>
> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>

TBR=ynovikov@chromium.org,jmadill@chromium.org,syoussefi@chromium.org

Change-Id: I902bec2d733c2b879be29c02ab52a0b7d4eaa077
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: angleproject:2995
Reviewed-on: https://chromium-review.googlesource.com/c/1392381
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
2018-12-29 20:46:23 +00:00
Jamie Madill 03923558a7 Load entry points dynamically in tests and samples.
This CL adds a dynamic loader generator based on XML files. It also
refactors the entry point generation script to move the XML parsing
into a helper class.

Additionally this includes a new GLES 1.0 base header. The new
header allows for function pointer types and hiding prototypes.

All tests and samples now load ANGLE dynamically. In the future this
will be extended to load entry points from the driver directly when
possible. This will allow us to perform more accurate A/B testing.

The new build configuration leads to some tests having more warnings
applied. The CL includes fixes for the new warnings.

Bug: angleproject:2995
Change-Id: I6726d4163f7a6e54d2482f094c0a952f59702a05
Reviewed-on: https://chromium-review.googlesource.com/c/1359516
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
2018-12-29 16:24:36 +00:00
Jamie Madill 4638dc9def Re-land "Load correct libGLESv2 on Linux and Mac."
Re-land fixes build to ensure commit_id is built before libEGL.

libEGL was implicitly loading libGLESv2 on startup. This is bad
because on platforms like Linux and Mac we could sometimes use the
incorrect rpath. This in turn meant we needed workarounds like using
"_angle" extensions to our shared objects to get the correct loading
behaviour.

Fix this by loading libGLESv2 dynamically in libEGL. We build the
loader automatically from egl.xml. The loader itself is lazily
initialized on every EGL entry point call. This is necessary because
on Linux, etc, there is no equivalent to Windows' DLLMain.

We also use an EGL.h with different generation options so we have the
proper function pointer types. A README is included for instructions
on how to regenerate EGL.h.

The entry point generation script is refactored into a helper class
that is used in the loader generator. Also adds the libGLESv2 versions
of the EGL entry points in the DEF file on Windows. This allows them to
be imported properly in 32-bit configurations.

Also fixes up some errors in ANGLE's entry point definitions. Also
includes a clang-format disable rule for the Khronos headers.

This CL will help us to run ANGLE tests against native drivers.

Bug: angleproject:2871
Bug: chromium:915731
Change-Id: I4192a938d1f4117cea1bf1399c98bda7ac25ddab
Reviewed-on: https://chromium-review.googlesource.com/c/1380511
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2018-12-18 18:54:44 +00:00
Jamie Madill 720ca44976 Pass GN header visibility check.
This fixes a few things:

* removes includes that weren't supposed to be present
* scopes some compiler code into white_box_perftests
* makes version.h/commit and angle_common id more visible
* roll zlib to a version that passes check

This should help prevent build problems from popping up in the
downstream Chromium build. We could also potentially look at
including gn check in our CQ recipe.

Bug: chromium:915429
Change-Id: I350f543e16de13c84eb2c43260f4966d47185114
Reviewed-on: https://chromium-review.googlesource.com/c/1380771
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2018-12-18 15:25:40 +00:00
Yuly Novikov 175d918a1f Revert "Load correct libGLESv2 on Linux and Mac."
This reverts commit dd815b623e.

Reason for revert: Broke https://luci-milo.appspot.com/p/chromium/builders/luci.chromium.ci/win-rel/8006

Original change's description:
> Load correct libGLESv2 on Linux and Mac.
> 
> libEGL was implicitly loading libGLESv2 on startup. This is bad
> because on platforms like Linux and Mac we could sometimes use the
> incorrect rpath. This in turn meant we needed workarounds like using
> "_angle" extensions to our shared objects to get the correct loading
> behaviour.
> 
> Fix this by loading libGLESv2 dynamically in libEGL. We build the
> loader automatically from egl.xml. The loader itself is lazily
> initialized on every EGL entry point call. This is necessary because
> on Linux, etc, there is no equivalent to Windows' DLLMain.
> 
> We also use an EGL.h with different generation options so we have the
> proper function pointer types. A README is included for instructions
> on how to regenerate EGL.h.
> 
> The entry point generation script is refactored into a helper class
> that is used in the loader generator. Also adds the libGLESv2 versions
> of the EGL entry points in the DEF file on Windows. This allows them to
> be imported properly in 32-bit configurations.
> 
> Also fixes up some errors in ANGLE's entry point definitions. Also
> includes a clang-format disable rule for the Khronos headers.
> 
> This CL will help us to run ANGLE tests against native drivers.
> 
> Bug: angleproject:2871
> Change-Id: Id6ecf969308f17b1be4083538428c9c1a1836572
> Reviewed-on: https://chromium-review.googlesource.com/c/1370725
> Commit-Queue: Jamie Madill <jmadill@chromium.org>
> Reviewed-by: Geoff Lang <geofflang@chromium.org>

TBR=ynovikov@chromium.org,geofflang@chromium.org,jmadill@chromium.org

Change-Id: I921b3c45435ab4f05cbc2d1c1172b4185d6257b0
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: angleproject:2871
Reviewed-on: https://chromium-review.googlesource.com/c/1378887
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
2018-12-16 19:53:36 +00:00
Jamie Madill dd815b623e Load correct libGLESv2 on Linux and Mac.
libEGL was implicitly loading libGLESv2 on startup. This is bad
because on platforms like Linux and Mac we could sometimes use the
incorrect rpath. This in turn meant we needed workarounds like using
"_angle" extensions to our shared objects to get the correct loading
behaviour.

Fix this by loading libGLESv2 dynamically in libEGL. We build the
loader automatically from egl.xml. The loader itself is lazily
initialized on every EGL entry point call. This is necessary because
on Linux, etc, there is no equivalent to Windows' DLLMain.

We also use an EGL.h with different generation options so we have the
proper function pointer types. A README is included for instructions
on how to regenerate EGL.h.

The entry point generation script is refactored into a helper class
that is used in the loader generator. Also adds the libGLESv2 versions
of the EGL entry points in the DEF file on Windows. This allows them to
be imported properly in 32-bit configurations.

Also fixes up some errors in ANGLE's entry point definitions. Also
includes a clang-format disable rule for the Khronos headers.

This CL will help us to run ANGLE tests against native drivers.

Bug: angleproject:2871
Change-Id: Id6ecf969308f17b1be4083538428c9c1a1836572
Reviewed-on: https://chromium-review.googlesource.com/c/1370725
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
2018-12-16 14:04:28 +00:00
Jamie Madill 35cd7332ab Refactor test shader style.
This change enforces a lot more consistency. We pass const char * to
the Compile functions instead of std::string. Also fixes the
indentation of C++11 block comments to be more consistent.

Bug: angleproject:2995
Change-Id: Id6e5ea94055d8cbd420df4ea2e81b2d96cb5ce78
Reviewed-on: https://chromium-review.googlesource.com/c/1357103
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2018-12-03 13:20:23 +00:00
Yizhou Jiang c4533eae08 Enable ANGLE_texture_multisample in glsl in es 3.0
Enable gsampler2dMS, texelFetch, textureSize in glslang in
es 3.0 if ANGLE_texture_multisample is supported.

Bug: angleproject:2275
TEST=SamplerMultisampleEXTTest.TextureMultisampleEXTEnabled

Change-Id: Ibfa367970db3ae790f3822e57eb50090843dc6db
Reviewed-on: https://chromium-review.googlesource.com/c/867521
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Yizhou Jiang <yizhou.jiang@intel.com>
2018-10-12 01:40:05 +00:00
Frank Henigman a7f97a27eb Gyp is dead. Long live gn.
Remove the gyp build.  The .gypi files were not renamed so that diff and
rebase would work on this change.  They will be renamed in a separate
change.

BUG=angleproject:1569

Change-Id: If8a217027633293664b820104f91a4ca5889b24e
Reviewed-on: https://chromium-review.googlesource.com/1187380
Commit-Queue: Frank Henigman <fjhenigman@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
2018-08-29 19:26:38 +00:00
Lingfeng Yang 0df813c375 GLES1: GL_OES_draw_texture
BUG=angleproject:2306

This implements GL_OES_draw_texture using a few bits of new state
in the renderer and adding a code path for it in the shader, using
gl_VertexID to draw the quad backing the texture draw. This allows us
to avoid allocating a separate vertex array for the texture draw and
reuses the current shader as much as possible, plugging in to the
existing multitexturing pipeline.

- Add unit test and sample
- No new test expectations, but advertising GL_OES_draw_texture makes
the DrawTex GLES1 conformance test non-trivial and actually test
glDrawTex*.

Change-Id: I1485098249fe44d46a01cab4bb7b2c39d0492923
Reviewed-on: https://chromium-review.googlesource.com/1135930
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Lingfeng Yang <lfy@google.com>
2018-07-23 15:16:49 +00:00
Olli Etuaho da41ac69b9 Fix decorating ViewID_OVR in HLSL output
ViewID_OVR should not be decorated in HLSL output since it is an
internal variable. Make sure that DecorateVariableIfNeeded() is used
for varyings instead of just Decorate() so that the internalness is
checked correctly and ViewID_OVR doesn't get decorated.

This avoids possible name conflicts between the internal ViewID_OVR
and any user-defined variables named ViewID_OVR.

BUG=angleproject:2062
TEST=angle_end2end_tests, angle_unittests

Change-Id: I9ed9876d4b2c760e7a11b0b270a2190993e840e5
Reviewed-on: https://chromium-review.googlesource.com/1143398
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
2018-07-19 16:49:45 +00:00
Luc Ferron 17cee57247 SampleApps: Refactor to use cli args the same way
Bug: angleproject:2669
Change-Id: Ica5b49e63e8af69595cdde3737b0aa1808d7d841
Reviewed-on: https://chromium-review.googlesource.com/1104377
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Luc Ferron <lucferron@chromium.org>
2018-06-18 16:40:40 +00:00
Lingfeng Yang a0cfa873bc GLES1: Shade model API
+ add sample

BUG=angleproject:2306

Change-Id: Ie0c391618ec2b771cc99b96db02b9008a86272b9
Reviewed-on: https://chromium-review.googlesource.com/1079992
Commit-Queue: Lingfeng Yang <lfy@google.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
2018-06-01 00:21:59 +00:00
Lingfeng Yang 1478afaf11 GLES1: Lighting and materials (renderer)
- Update test expectations
- Add gles1 sample app that shows simple lighting.

BUG=angleproject:2306

Change-Id: I545dcf860374abd9d628b0d554153cb634098f6d
Reviewed-on: https://chromium-review.googlesource.com/1065501
Commit-Queue: Lingfeng Yang <lfy@google.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2018-05-25 18:17:14 +00:00
Lingfeng Yang 461b09a824 GLES1: Renderer (minimal)
This is the renderer code for GLES1 that delivers basic vertex
attributes, matrices, and allows texturing for unit 0 only (more units
mean implementing the multitexturing pipeline).

+ Sample
+ Update test expectations for GLES1 conformance tests

BUG=angleproject:2554
BUG=angleproject:2306

Change-Id: I398edc764f982fbfc4c5e0f9d6bfef1e91aec47c
Reviewed-on: https://chromium-review.googlesource.com/1057356
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Lingfeng Yang <lfy@google.com>
2018-05-14 14:54:47 +00:00
Frank Henigman 66aafcb464 Revert "GLES1: Renderer (minimal)"
This reverts commit a69099212f.

Reason for revert: New tests failing on gpu fyi bot.  anglebug.com/2554

Original change's description:
> GLES1: Renderer (minimal)
> 
> This is the renderer code for GLES1 that delivers basic vertex
> attributes, matrices, and allows texturing for unit 0 only (more units
> mean implementing the multitexturing pipeline).
> 
> + Sample
> + Update test expectations for GLES1 conformance tests
> 
> BUG=angleproject:2306
> 
> Change-Id: Id5d5603c967e577290085e5946f2cb7a03d7e017
> Reviewed-on: https://chromium-review.googlesource.com/1023988
> Commit-Queue: Lingfeng Yang <lfy@google.com>
> Reviewed-by: Geoff Lang <geofflang@chromium.org>

TBR=geofflang@chromium.org,jmadill@chromium.org,cwallez@chromium.org,lfy@google.com

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: angleproject:2306
Change-Id: Ib6fd9db433cd1a13589d5a9e82cb2c40f3cf71ff
Reviewed-on: https://chromium-review.googlesource.com/1056229
Reviewed-by: Frank Henigman <fjhenigman@chromium.org>
Commit-Queue: Frank Henigman <fjhenigman@chromium.org>
2018-05-12 21:23:44 +00:00
Lingfeng Yang a69099212f GLES1: Renderer (minimal)
This is the renderer code for GLES1 that delivers basic vertex
attributes, matrices, and allows texturing for unit 0 only (more units
mean implementing the multitexturing pipeline).

+ Sample
+ Update test expectations for GLES1 conformance tests

BUG=angleproject:2306

Change-Id: Id5d5603c967e577290085e5946f2cb7a03d7e017
Reviewed-on: https://chromium-review.googlesource.com/1023988
Commit-Queue: Lingfeng Yang <lfy@google.com>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
2018-05-11 19:15:02 +00:00
Jamie Madill 0cb6dc4c4c Vulkan: Fix texture descriptor set alloc count.
We were reserving half the required descriptor sets for our pool. This
fixes the counting and ensures we won't regress by adding a test.

Also enables the cube map texture sample, and removes an UNIMPLEMENTED
warning that was spurious.

Bug: angleproject:2318

Change-Id: I371cd7c5b42e1ce980cce7bb0ef04885db72b614
Reviewed-on: https://chromium-review.googlesource.com/1014165
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Luc Ferron <lucferron@chromium.org>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
2018-04-16 19:44:11 +00:00
Yuly Novikov ad4f9642a6 Allow ANGLE libs to have arbitrary suffix.
In order to work with tools which intercept EGL and GLES calls.

BUG=angleproject:2343

Change-Id: I63aec7a56648dc4b3e7f4aff7f7d1608709ba118
Reviewed-on: https://chromium-review.googlesource.com/920652
Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2018-03-23 22:09:24 +00:00
Jamie Madill 2fe36e456a Vulkan: Enable SimpleVertexShader.
Required correct depth range implementation, matrix uniforms, etc.

Bug: angleproject:2403

Change-Id: I84d12aae0c9eb760645d6b953461122bce7d31d1
Reviewed-on: https://chromium-review.googlesource.com/967265
Reviewed-by: Geoff Lang <geofflang@chromium.org>
2018-03-16 21:28:19 +00:00
Jamie Madill 28060c436b Vulkan: Enable running SimpleTexture2D.
This completes the work for the simple texture sample.

Bug: angleproject:2167
Change-Id: I47c6794fa7cd59e295a98623d9ce8879ea1d3298
Reviewed-on: https://chromium-review.googlesource.com/952566
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2018-03-07 01:41:09 +00:00
Jamie Madill f618c9e5f9 Vulkan: Add depth/stencil surfaces.
This change lets us create egl::Surfaces from a D24S8 config. This is
a bit hacky, because the spec only mandates 24 -or- 32 bit depth
support, but not both or either individually. Will need follow-up work
for proper EGL config setup.

A single depth buffer is allocated for the entire set of swapchain
images and is used with each. This also might be a problem if we're
rendering to multiple frames at the same time. We'll likely have to
revisit this in the future as well.

This adds a new RenderTargetVk to the SurfaceVk class which points to
the Depth/Stencil image. Since ImageViews must refer to either the
depth or stencil, but not both, we'll need to address this when we
get to implementing depth/stencil texture reads in shaders.

Bug: angleproject:2357
Change-Id: Ibed0eed7e1d0efb272758dbfc79fa2c5aa93997f
Reviewed-on: https://chromium-review.googlesource.com/919761
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2018-02-16 00:25:21 +00:00
Frank Henigman 5b1180df68 Add gyp deprecation warning.
gyp_angle now prints a warning every time it is run.
All targets print the same warning as one of their build steps.
The DEPS change updates gypi_to_gn so it doesn't choke on
files with 'target_defaults' sections.

BUG=angleproject:1569

Change-Id: Ibdf277fcc14cf4ebc7b7db78270210752cd8ef9d
Reviewed-on: https://chromium-review.googlesource.com/711155
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Frank Henigman <fjhenigman@chromium.org>
2017-12-18 23:04:55 +00:00
Jiawei Shao bd924af173 ES31: Remove support of GL_OES_geometry_shader in compiler
This patch intends to remove the support of GL_OES_geometry_shader
in ANGLE compiler.

To make the implementation simpler, currently we decide to only
support "GL_EXT_geometry_shader" as the extension string of geometry
shader in ANGLE.

This patch also updates all the related shaders in angle_unittests
into R"()" format.

BUG=angleproject:1941
TEST=angle_unittests

Change-Id: Ife9858abeedfb46b02c5c2fb1cda16fa27198511
Reviewed-on: https://chromium-review.googlesource.com/773451
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2017-12-14 18:32:04 +00:00
Olli Etuaho 465835d61f 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>
2017-11-22 12:38:32 +00:00
Frank Henigman d0ef13a250 Stand-alone build with gn.
This should do the same things as the stand-alone gyp build, but with gn.
You should switch to gn as gyp support will go away.

You need a recent enough version of gn.  If yours is too old try this one:
  ./buildtools/linux64/gn

If "gclient sync" or anything fails with an ImportError on gyp stuff,
try running it with the following PYTHONPATH in the environment:
  PYTHONPATH=tools/gyp/pylib

BUG=angleproject:1569

Change-Id: I56d19bec2d8b649a7bd65062c656cbfc69ea3dd8
Reviewed-on: https://chromium-review.googlesource.com/642588
Reviewed-by: Frank Henigman <fjhenigman@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Frank Henigman <fjhenigman@chromium.org>
2017-10-18 17:02:13 +00:00
Corentin Wallez 8a9e0fc238 Fix standalone compilation on Mac
The std::pair constructor isn't constexpr there.

BUG=

Change-Id: I7711185c6c991fd5793cc6c785e9905710660cd9
Reviewed-on: https://chromium-review.googlesource.com/723849
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
2017-10-17 20:59:00 +00:00
Yunchao He 128e536ab6 Fix a small build issue.
Strcmp in SampleApplication.cpp is a cstring function. So some
compilers (at least the default gcc compiler in my Ubuntu 17.04)
would think that strcmp is not declared and lead to build failure,
even we have include <string> in header file.

Now that we use std::string variable in SampleApplication.h, it is
better to include <string> in that header file as what it is.
Then add <string.h> to include cstring functions in .cpp file to
fix the build issue.

BUG=angleproject:2180

Change-Id: Id97a6956480637c1218314c04d9b331031c7b911
Reviewed-on: https://chromium-review.googlesource.com/711396
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Geoff Lang <geofflang@chromium.org>
2017-10-11 13:37:35 +00:00
Jamie Madill 1fce3283f0 Samples: Add command line flag to select renderer.
This gives us the ability to test Vulkan without a special recompile,
and keeps the default setting to the default ANGLE renderer. Only
implemented for the hello_triangle sample currently.

Also includes an extra error message for missing EGL config, which is
where the Vulkan init fails right now, due to missing depth/stencil
support.

Also includes a hack to get Vulkan samples running without depth/
stencil.

BUG=angleproject:2167

Change-Id: I6925b9b84956fb69cbf602a828ea95d8c7125b68
Reviewed-on: https://chromium-review.googlesource.com/707688
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2017-10-10 14:58:03 +00:00
Olli Etuaho a20af6d7e8 Use C++11 raw string literals instead of SHADER_SOURCE macro
This is better in many ways:
1. It doesn't confuse clang format
2. \n doesn't need to be included after preprocessor directives like
   the version directive.
3. It's using built-in functionality instead of something custom.

Raw string literals should be the preferred way to include shader
source in C++ files going forward.

BUG=angleproject:2157
TEST=angle_end2end_tests

Change-Id: I8b236a6e2d5c25d920297e5bc5b5b143eddeba1f
Reviewed-on: https://chromium-review.googlesource.com/671046
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
2017-09-18 15:08:15 +00:00
Martin Radev 1aa66bc73d Add ANGLE_multiview sample
The patch adds a sample which makes use of the ANGLE_multiview
extension to draw the same scene to two views each having its
own camera matrix.

BUG=angleproject:2062
TEST=angle_end2end_tests

Change-Id: I4b765a189047bf219a05e98b032ad95efbb36905
Reviewed-on: https://chromium-review.googlesource.com/655166
Commit-Queue: Martin Radev <mradev@nvidia.com>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
2017-09-11 07:51:59 +00:00
Jiawei-Shao df7d7c9ec7 Split varyings into input and output varyings in compiler
This patch intends to split all vector<Varying> into two vectors
to store input and output varyings separately in the compiler.

This patch is a base of implementing the built-ins, inputs and
outputs of a geometry shader to ANGLE GLSL compiler. Unlike the
vertex shaders (their outputs are varyings) and fragment shaders
(their inputs are varyings), the inputs and outputs of geometry
shaders are all varyings, so we need two vector<Varying> to store
them correctly.

BUG=angleproject:1941

Change-Id: I9e8cc16045d5e29e9a80a09dc31b33a7ae39b345
Reviewed-on: https://chromium-review.googlesource.com/593347
Commit-Queue: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
2017-08-02 13:16:49 +00:00
Shao b5cc1198b8 ES31: Add Geometry Shader layout qualifiers in GLSL compiler
This patch intends to implement Geometry Shader layout qualifiers
required in OpenGL ES 3.1 extension GL_OES_geometry_shader in ANGLE
GLSL compiler.

1. Add support to the shader type GL_GEOMETRY_SHADER_OES.
2. Implement Geometry Shader layout qualifiers in the GLSL compiler:
(1) Add support to OpenGL ES 3.1 extension "GL_OES_geometry_shader".
(2) Add validations of the input and output primitive declarations
    in the Geometry Shader layout declarations.
(3) Add 'invocations' and 'max_vertices' support in the Geometry
    Shader layout declarations
3. Add unit tests to cover all the new features added in this patch.

BUG=angleproject:1941
TEST=angle_unittests

Change-Id: Ie693e11f8a00dab3552626ed63e9336c7fbd3cb8
Reviewed-on: https://chromium-review.googlesource.com/560647
Commit-Queue: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2017-07-26 20:50:54 +00:00
Olli Etuaho 0d2ecb4ea9 Output mapped name of shader variables in shader_translator
This makes understanding and debugging the mapped names in the
translator interface easier.

TEST=shader_translator -u

Change-Id: I2457142a6f0a8baa623e80b00cc86c8df90e6718
Reviewed-on: https://chromium-review.googlesource.com/579968
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2017-07-20 17:43:01 +00:00
Martin Radev c39a19aa93 Select viewport index in the GLSL/ESSL vertex shader
The patch enables viewport selection for multiview rendering in the
GLSL/ESSL vertex shader through the use of the GL_NV_viewport_array2
extension. The AST is modified only for GLSL and ESSL to include the
viewport selection expression after ViewID_OVR's initialization.

BUG=angleproject:2062
TEST=angle_unittests

Change-Id: Iee05bb5a4b687ed53ddbdd466f1572227b1f0cde
2017-07-11 18:32:28 +03:00
Martin Radev 69056a1ecf Declare and initialize ViewID_OVR and InstanceID
The patch modifies the vertex shader's AST to declare and initialize
the global variables ViewID_OVR and InstanceID. Every occurrence of
gl_ViewID_OVR gets replaced by ViewID_OVR and initialized in main
with a value dependent on gl_InstanceID and the number of views.
To guarantee correct results for instanced rendering, each occurrence
of gl_InstanceID is replaced with InstanceID and initialized similarly.

BUG=angleproject:2062
TEST=angle_unittests

Change-Id: I48be688605b5af869bc370758e70ccc209ea4419
Reviewed-on: https://chromium-review.googlesource.com/548596
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2017-06-30 10:27:19 +00:00
Ken Russell fcadd08ad7 Provide build target for angle_shader_translator sample.
This is useful for building the sample within Chromium rather than
in ANGLE's standalone build, which has other requirements like a
full Visual Studio installation.

BUG=angleproject:2095

Change-Id: I785d87ecb5166d8f640a5c8a5f321c3209017cc5
Reviewed-on: https://chromium-review.googlesource.com/553399
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2017-06-29 15:03:04 +00:00
Olli Etuaho 9733ceefa4 Initialize uninitialized locals in GLSL output
Guarantee that local variables are initialized before they are used
in GLSL output. In HLSL output all variables were already being
initialized.

Locals are initialized using an AST transform. The local variable init
can only be run after some simplification of the AST, so that it is
able to handle complex cases like:

for (int i[2], j = i[0]; i[0] < 3; ++i[0]) {
}

If we're dealing with ESSL 1.00 which lacks array constructors, in
this kind of case the uninitialized array initialization code needs to
be hoisted out of the loop init statement, and the code also needs to
make sure that j's initializer is run after i is initialized.

Another complex case involves nameless structs. This can be an issue
also in ESSL 3.00 and above:

for (struct { float f; } s; s.f < 1.0; ++s.f) {
}

Since the struct doesn't have a name, its constructor can not be used.
We solve this by initializing the struct members individually,
similarly to how arrays are initialized in ESSL 1.00.

Initializing local variables is disabled on Mac and Android for now.
On Mac, invalid behavior was exposed in the WebGL 2.0 tests when
enabling it. On Android, the dEQP test runs failed for an unknown
reason. Bugs have been opened to resolve these issues later.

BUG=angleproject:1966
TEST=angle_end2end_tests, WebGL conformance tests

Change-Id: Ic06927f5b6cc9619bc82c647ee966605cd80bab2
Reviewed-on: https://chromium-review.googlesource.com/504728
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2017-05-29 15:55:18 +00:00
Yunchao He f81ce4a374 Refactoring: replace NULL by nullptr for pointers (3rd CL).
This CL mainly handles passing/returning NULL to/from a function.

BUG=angleproject:2001

Change-Id: I34802f792e710e3d7ff697cbe4701dc1bf5ab009
Reviewed-on: https://chromium-review.googlesource.com/485060
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2017-04-25 14:32:47 +00:00
Andrei Volykhin a552707181 Add support for EXT_YUV_target
Add new sampler type "__samplerExternal2DY2YEXT"
to sample a YUV texture image and output color value
without any color conversion,
new additional type to specify color space standard formula and
built-in functions for yuv to rgb transformation.

Change-Id: I1780650fe84cd75191c1ca1e4118e89d585bfd92
Reviewed-on: https://chromium-review.googlesource.com/454697
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
2017-03-22 20:50:14 +00:00
Olli Etuaho 4336489ffc Parse binding layout qualifier for opaque types
This patch adds binding layout qualifier support for opaque types.
Binding layout qualifier on blocks is not yet supported.

This includes support for GLSL output and some minor simplification of
related functionality in ParseContext.

TEST=angle_unittests, dEQP-GLES31.functional.layout_binding.*
BUG=angleproject:1442

Change-Id: I53fb505b5a539bccee70613f3969fba81965ae84
Reviewed-on: https://chromium-review.googlesource.com/441586
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
2017-02-15 15:41:10 +00:00
Olli Etuaho 4be6c6ccd7 Add missing sampler types to shader_translator output
The types are organized as in the ESSL 3.10 spec.

BUG=angleproject:1681

Change-Id: If8e0ab2c604fcf9b61d3d89719e95854d494231c
Reviewed-on: https://chromium-review.googlesource.com/427843
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
2017-01-13 15:37:40 +00:00
Jamie Madill dcab56a1b8 Move some file utils to common.
Since common is shared through all ANGLE code (libANGLE/tests/samples)
this is the most general place for these utils, and will give libANGLE
access to them. We'll need them to get the current executable dir for
loading the Vulkan layers.

This also means we'll need to fix the global static variable use when
we have the ability.

BUG=angleproject:1319
BUG=chromium:677841

Change-Id: I7af61920635135b28a2f02f4a8d019ee88c9dd28
Reviewed-on: https://chromium-review.googlesource.com/425440
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2017-01-05 23:41:59 +00:00
JiangYizhou 4021932f25 translator: Add ES3.1 multisample texture support.
Implement shader objects, [iu]sampler2DMS, textureSize(gsampler2DMS).
as well as texelFetch(gsampler2DMS,P,sample) for the glsl.

BUG=angleproject:1590

TEST=angle_unittests
TEST=angle_end2end_tests

Change-Id: I781023f7bec34ad0264af69f34bb182b50bd1fbd
Reviewed-on: https://chromium-review.googlesource.com/423175
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2017-01-05 13:39:20 +00:00
Olli Etuaho 09b04a2ffc Add shader translator support for OVR_multiview
The OVR_multiview and OVR_multiview2 extensions add gl_ViewID_OVR to
shaders. gl_ViewID_OVR can be translated either as is in GLSL output
or as a uniform by setting the SH_TRANSLATE_VIEWID_OVR_AS_UNIFORM
compiler flag.

If WebGL output is selected, the shaders will be validated according
to proposed rules in the WEBGL_multiview spec.

BUG=angleproject:1669
TEST=angle_unittests

Change-Id: I19ea3a6c8b4edb78be03f1a50a96bfef018870d0
Reviewed-on: https://chromium-review.googlesource.com/422848
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
2016-12-22 12:10:08 +00:00
Corentin Wallez 922cbfcb8e common: Add a vector arithmetic helper classes
Change-Id: I2f96baedf10d346eaa150bab04f8f6ca3ba573b9
Reviewed-on: https://chromium-review.googlesource.com/414272
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
2016-12-02 15:28:39 +00:00
Corentin Wallez 1b896c6293 translator: remove code related to for-loop unrolling
For loop unrolling is not used and causes the translator fuzzer to find
a hang when unrolling tons of nested loops (duh).
Also remove MMap.h which was unused.

This is essentially a revert of https://codereview.appspot.com/4331048

BUG=chromium:665255

Change-Id: Id6940f7e306d4ed53bc992f751e9ffe733190f17
Reviewed-on: https://chromium-review.googlesource.com/412023
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
2016-11-18 21:53:38 +00:00
Corentin Wallez 7f07caa961 Rename the build/ directory.
GYP related files went in gypfiles/, and the gni went in gni/ this
changes frees up the build/ directory name for Chromium's build/
directory.

BUG=angleproject:1569

Change-Id: I76fe343d569239c2732ba87986fcf7debc21d417
Reviewed-on: https://chromium-review.googlesource.com/403029
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2016-11-08 14:48:42 +00:00
Jamie Madill acb4b81a95 translator: Put ShaderLang APIs in "sh" namespace.
Working with glslang in Vulkan means we are static linking libANGLE
with functions that have the same name as our translator APIs. We
can fix this by scoping our APIs. We don't need to scope the types
of the file, since they don't conflict.

This will require a follow-up patch to remove the unscoped APIs
once we switch over Chromium.

We also scope TCompiler and some related classes to avoid multiply
defined link errors with glslang.

BUG=angleproject:1576

Change-Id: I729b19467d2ff7d374a82044b16dbebdf2dc8f16
Reviewed-on: https://chromium-review.googlesource.com/408337
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2016-11-07 21:43:15 +00:00
Yuly Novikov e653403bae Remove component translator target and keep static_library.
Rename translator_static to translator and use it everywhere.

BUG=angleproject:1596

Change-Id: I36c990d54979d2460b1513a65cca0b82f8d65c80
Reviewed-on: https://chromium-review.googlesource.com/406668
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
2016-11-03 17:07:18 +00:00
Qiankun Miao 7ebb97fc9a Use 64-bits compile options
BUG=chromium:645071

Change-Id: I31825123bf4cb45fb37a93f538e8936487beb5ff
Reviewed-on: https://chromium-review.googlesource.com/382712
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2016-09-13 20:54:59 +00:00
Olli Etuaho 966456de40 Remove SH_TIMING_RESTRICTIONS compiler flag
The timing restrictions code is not in use and not updated for ESSL3,
so it is better to remove it to make refactoring the AST easier.

It can also be argued that perfect prevention of shader timing attacks
is not feasible due to factors that are not under control of ANGLE,
such as fixed function color compression in GPUs. Such color
compression may make the use of texture bandwidth and thus performance
dependent on the content of a texture regardless of whether a
compressed format is chosen through the API.

SH_DEPENDENCY_GRAPH flag that could only be active together with the
timing restrictions flag is also removed, along with all the code that
was supporting it. The newer CallDAG code is used for different
purposes and is kept.

BUG=angleproject:1490
TEST=angle_unittests

Change-Id: I2cd10e18df366e8e43f7c3af1ca12d2a4bfb2007
Reviewed-on: https://chromium-review.googlesource.com/384511
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2016-09-13 06:58:58 +00:00
Olli Etuaho 87d410c8db Disallow multiple locations on output variables
GLSL ES specs from version 3.00 to 3.20 all mention that output layout
location qualifier may appear at most once within a declaration.
Enforce this rule when parsing shaders.

Also set max draw buffers to 8 when compiling GLSL ES >= 3.00 in the
qualification order tests and shader translator sample, so that
parsing locations > 0 will succeed.

BUG=angleproject:1505
TEST=angle_unittests

Change-Id: I50fe409041385f5e10e695f43dc3a572433e9772
Reviewed-on: https://chromium-review.googlesource.com/381211
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
2016-09-12 14:21:48 +00:00
Jamie Madill d08163d704 Fix standalone build.
BUG=angleproject:1471

Change-Id: I52aadeb58f75d5b944421bd0cd4a5dddead3f6d1
Reviewed-on: https://chromium-review.googlesource.com/379916
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2016-09-01 20:47:12 +00:00
Kenneth Russell b962aab6ff Remove stray reference to SH_EMULATE_BUILT_IN_FUNCTIONS.
BUG=chromium:642227

Change-Id: Ie1d74c0abd355a0bddc3c2b700390a3a2a9c4823
Reviewed-on: https://chromium-review.googlesource.com/379875
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2016-09-01 17:55:58 +00:00
Qiankun Miao c2c5fc48e3 Remove CSS Shader related code
CSS shader has been removed from spec and chrome code base. Remove the
code in ANGLE.

BUG=chromium:233383

Change-Id: I93a35437f540e51ce7af9d49f21ca60d7c0b156a
Reviewed-on: https://chromium-review.googlesource.com/378739
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
2016-08-31 17:55:49 +00:00
Martin Radev 802abe0150 Add compute shader compilation support in the glsl compiler
Support is added for compute shader compilation. There is a small
extension to the parser so that 'local_size_x = ', 'local_size_y = '
and 'local_size_z = ' are supported as layout qualifiers.

A few shader compilation tests are added and one which checks the AST
whether the layout qualifiers are properly parsed.

BUG=angleproject:1442

TEST=angle_unittests
TEST=angle_end2end_tests

Change-Id: I67283797d1cf13fa4ac47faa2a6e66d93a2db867
Reviewed-on: https://chromium-review.googlesource.com/362300
Reviewed-by: Olli Etuaho <oetuaho@nvidia.com>
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
2016-08-09 16:04:13 +00:00
Martin Radev 1be913cff8 Add support for ES31 context creation
The dEQP test for context creation passes.

SH_WEBGL3_SPEC has been added, but it should be considered whether we
should keep it, remove it or rename it. It was added so that there is
a webgl mapping to es 310 shaders. Check Compiler.cpp. The bison file
has been modified so that some tokens from es3 can be also used in
es31 as well.

A separate macro ES3_1_ONLY is added so that some tokens are limited
only for es 310 shaders.

BUG=angleproject:1442
TEST=angle_unittests

Change-Id: I2e5ca227c96046c30dc796ab934f3fda9c533eba
Reviewed-on: https://chromium-review.googlesource.com/360300
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2016-07-20 12:58:19 +00:00
Olli Etuaho 9b4e8626f8 Redesign samplers in shaders on D3D11
Translation of samplers to HLSL on D3D11 is changed as follows:

Instead of passing around HLSL sampler and HLSL texture references in
shaders, all references to ESSL samplers are converted to constant
indices within the shader body. Each ESSL sampler is identified by an
unique index. In the code generated to implement ESSL texture functions,
these indices are used to index arrays of HLSL samplers and HLSL
textures to get the sampler and texture to use.

HLSL textures and samplers are grouped into arrays by their types. Each
unique combination of a HLSL texture type + HLSL sampler type gets its
own array. To convert a unique sampler index to an index to one of these
arrays, a constant offset is applied. In the most common case of a 2D
texture and a regular (non-comparison) sampler, the index offset is
always zero and is omitted.

The end goal of this refactoring is to make adding extra metadata for
samplers easier. The unique sampler index can be used in follow-up
changes to index an array of metadata passed in uniforms, which can
contain such things as the base level of the texture.

This does not solve the issues with samplers in structs.

The interface from the point of view of libANGLE is still exactly the
same, the only thing that changes is how samplers are handled inside the
shader.

On feature level 9_3, the D3D compiler has a bug where it can report that
the maximum sampler index is exceeded when in fact it is not. This can
happen when an array of samplers is declared in the shader. Because of
this the new approach can't be used on D3D11 feature level 9_3, but it
will continue using the old approach instead.

BUG=angleproject:1261
TEST=angle_end2end_tests,
     dEQP-GLES3.functional.shaders.texture_functions.* (no regressions)
     dEQP-GLES3.functional.texture.units.* (no regressions)

Change-Id: I5fbb0c4280000202dc2795a628b56bd8194ef96f
Reviewed-on: https://chromium-review.googlesource.com/320571
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Tryjob-Request: Olli Etuaho <oetuaho@nvidia.com>
2016-02-01 21:58:06 +00:00
Corentin Wallez 541591d509 Fix some override related warnings.
BUG=

Change-Id: I9e67ba2165ac87959f319fd2485fe385c60a8ea0
Reviewed-on: https://chromium-review.googlesource.com/324461
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Tested-by: Corentin Wallez <cwallez@chromium.org>
2016-02-01 18:55:56 +00:00
Jamie Madill f83cbc6531 Use std::random functions for test and samples RNG.
These standard functions are much more powerful than the C random()
routines. Use them to improve the random utils, and use a class
to clean things up further.

This fixes a problem I was having using random_utils where I was
having trouble generating random 32 bit unsigned integers.

BUG=angleproject:1290

Change-Id: I5081764053d0667a4e323553b7dea531256aa778
Reviewed-on: https://chromium-review.googlesource.com/323440
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Tryjob-Request: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>
2016-01-26 19:37:18 +00:00
Corentin Wallez 7acd7354a5 Revert "Revert "OSXWindow: fix window size and position computations""
This reverts commit 67d810449c.

Change-Id: I4fcaffeb161d22c1cea72fd764461b0c38024e01
Reviewed-on: https://chromium-review.googlesource.com/322214
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Tested-by: Corentin Wallez <cwallez@chromium.org>
2016-01-21 15:26:00 +00:00
Corentin Wallez 67d810449c Revert "OSXWindow: fix window size and position computations"
This reverts commit 3408753302.

Change-Id: Ide87d79791aa37095127f048929e1b7a925259ab
Reviewed-on: https://chromium-review.googlesource.com/322391
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Tested-by: Corentin Wallez <cwallez@chromium.org>
2016-01-19 15:29:19 +00:00
Corentin Wallez 3408753302 OSXWindow: fix window size and position computations
Also improve debug messages in window_test.

BUG=angleproject:1273

Change-Id: Ie47dc1d7ad3be5a55d2a199334bba606f2b45ad0
Reviewed-on: https://chromium-review.googlesource.com/322350
Tryjob-Request: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Corentin Wallez <cwallez@chromium.org>
2016-01-18 15:35:05 +00:00
Corentin Wallez 200205840c Small cleanup of MultiWindow
Fixes a glitch on OSX where the root window would swap twice, causing a
glitch.

Change-Id: I5886105fb18ed8f45e69cd10b5d1cac49b82093f
Reviewed-on: https://chromium-review.googlesource.com/320291
Tryjob-Request: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Tested-by: Corentin Wallez <cwallez@chromium.org>
2016-01-08 15:41:56 +00:00
Jamie Madill 90c253a616 Add an instancing perf test.
BUG=526217
BUG=angleproject:1164

Change-Id: Ia353a3b2fa0ab0e8b7fd15d72bb63e5ecb7833b1
Reviewed-on: https://chromium-review.googlesource.com/301469
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Tryjob-Request: Jamie Madill <jmadill@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>
2015-12-16 14:04:14 +00:00
hendrikw bb7740cc32 angle: prevent huge allocations when GL_MAX_VERTEX_ATTRIBS fails
I'm not sure why yet, but when using angle in skia,
getIntegerv(GL_MAX_VERTEX_ATTRIBS, &maxVertexAttribs) sometimes fails,
and when that happens we attempt to allocate and array with the size of
maxVertexAttribs, which is uninitialized, which could be huge.

Prevent this by initializing the variable.

Also sweep through other similar calls and ensure that these use
initialized values (test code has not been updated)

BUG=skia:4380

Change-Id: If1f3cf72f2b2829ad3933637af8778d574a20f61
Reviewed-on: https://chromium-review.googlesource.com/307239
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tryjob-Request: Jamie Madill <jmadill@chromium.org>
Tryjob-Request: Dian Xiang <dianx@google.com>
Tested-by: Hendrik Wagenaar <hendrikw@chromium.org>
2015-10-23 16:36:45 +00:00
Austin Kinross adb857b2f6 Fix MultipleDrawBuffers sample when GL_OES_texture_npot isn't active
If the GL_OES_texture_npot extension isn't active, then setting
GL_TEXTURE_WRAP_S/T to GL_REPEAT for a NPOT texture results in black
rendering. This is specified in Section 3.8.2 of the OpenGL ES 2.0
specification.

Setting GL_TEXTURE_WRAP_S/T to GL_CLAMP_TO_EDGE is valid even if the
NPOT extension isn't active.

Change-Id: Ibd553620995df32138bf8153d1036fd05d386d90
Reviewed-on: https://chromium-review.googlesource.com/306302
Tested-by: Austin Kinross <aukinros@microsoft.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
2015-10-19 17:07:14 +00:00
Kimmo Kinnunen 5f0246ca6d Implement gl_FragDepth for GLES SL 3.0
Makes it an error to access gl_FragDepthEXT  in #version 300 es shader.

TODO:
Lacks the feature to make "#extension GL_EXT_frag_depth : require" an
error for #version 300 es.

Reland of: https://chromium-review.googlesource.com/#/c/287570

BUG=angleproject:1102
TEST=angle_unittest

Change-Id: I064d918d65f37539cb1e14f12173ca5591a4ea3f
Reviewed-on: https://chromium-review.googlesource.com/301711
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Geoff Lang <geofflang@chromium.org>
2015-09-29 18:57:23 +00:00
Jamie Madill ad60e8ee26 Move more sample_util sources to util.
These sample utils can also be useful for writing perf tests.

BUG=angleproject:1164

Change-Id: I44b5d63b57bfce7a541442fd02cd729a1bab17f0
Reviewed-on: https://chromium-review.googlesource.com/301468
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Tryjob-Request: Jamie Madill <jmadill@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>
2015-09-28 19:00:21 +00:00
Geoff Lang ee48376c1f Update to the latest versions of the GL and EGL headers.
Add GLES 3.1 and 3.2 headers.

Remove GLES 3.0 extension headers and entry point files.

Re-land fixes double define from different style defines in libGLESv2.gypi
and other projects.

Re-land fixes missing defines in angle_util project in gn.

Change-Id: I1952413cd4390e6f5450df809f8f5867bf6f49e2
Reviewed-on: https://chromium-review.googlesource.com/299771
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Geoff Lang <geofflang@chromium.org>
2015-09-15 20:13:55 +00:00
Geoff Lang 0393310feb Revert "Update to the latest versions of the GL and EGL headers."
Issues with GN build.

This reverts commit 8284436798.

Change-Id: I99d186019135bbbe250e95c9567854108d31c556
Reviewed-on: https://chromium-review.googlesource.com/299870
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Tested-by: Geoff Lang <geofflang@chromium.org>
2015-09-15 17:07:24 +00:00
Corentin Wallez 178e59741b In Chromium Mac builds do not find cstdint, use stdint.h instead
BUG=angleproject:891

Change-Id: Idf2a89ad26955df3579bb2c1883137589f68f573
Reviewed-on: https://chromium-review.googlesource.com/299720
Tryjob-Request: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Tryjob-Request: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Corentin Wallez <cwallez@chromium.org>
2015-09-14 20:43:53 +00:00
Geoff Lang 8284436798 Update to the latest versions of the GL and EGL headers.
Add GLES 3.1 and 3.2 headers.

Remove GLES 3.0 extension headers and entry point files.

Re-land fixes double define from different style defines in libGLESv2.gypi and
other projects.

Change-Id: I6204dc767bd83b7aa7e4d6e2fa338b2ce7f304d8
Reviewed-on: https://chromium-review.googlesource.com/299401
Tested-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2015-09-11 20:25:50 +00:00
Geoff Lang e12150fe9c Revert "Update to the latest versions of the GL and EGL headers."
Linux compile failures to do gyp defines.

This reverts commit 8bbeabc179.

Change-Id: Icb31dd817414b3a9ab36e88cedab9c725af26b6b
Reviewed-on: https://chromium-review.googlesource.com/299173
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Tested-by: Geoff Lang <geofflang@chromium.org>
2015-09-11 20:06:38 +00:00
Geoff Lang 8bbeabc179 Update to the latest versions of the GL and EGL headers.
Add GLES 3.1 and 3.2 headers.

Remove GLES 3.0 extension headers and entry point files.

Change-Id: Icaa444efa52f3b9d1497189da92bc364545a6e3a
Reviewed-on: https://chromium-review.googlesource.com/299172
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Tested-by: Geoff Lang <geofflang@chromium.org>
2015-09-11 19:33:49 +00:00
Jamie Madill 7aef6020a0 Revert "Update to the latest versions of the GL and EGL headers."
Broke the Clang compile.

In file included from ../../third_party/angle/include/GLSLANG/ShaderLang.h:28:
../../third_party/angle/include/KHR/khrplatform.h:282:30: error: no newline at end of file [-Werror,-Wnewline-eof]
#endif /* __khrplatform_h_ */

Several other similar errors.

BUG=None

This reverts commit aac2035d85.

Change-Id: I407e7e65bb6a46d1d941c54cdf14a14758e22d96
Reviewed-on: https://chromium-review.googlesource.com/298834
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>
2015-09-11 19:06:12 +00:00
Geoff Lang aac2035d85 Update to the latest versions of the GL and EGL headers.
Add GLES 3.1 and 3.2 headers.

Remove GLES 3.0 extension headers and entry point files.

Change-Id: I8e9df6262dc1b2536a409c5791734e4a4d63b115
Reviewed-on: https://chromium-review.googlesource.com/299341
Tryjob-Request: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Geoff Lang <geofflang@chromium.org>
2015-09-11 18:35:35 +00:00
Olli Etuaho 0304d2fe4f Don't split the file into two chunks in shader_translator
Splitting the file into two strings in shader_translator complicated
testing line/file numbering related functionality with it, since each
chunk passed to ShCompile has its own file number and line numbering.
These are exposed to the preprocessor in __FILE__ and __LINE__ predefined
macros.

Just supply the file to ShCompile in a single string. Also, since the
original motivation for splitting the string seems to have been to
exercise ShCompile with multiple strings, add a new unit test that
ensures that ShCompile handles multiple strings as expected.

BUG=angleproject:989
TEST=angle_unittests

Change-Id: I31d24925ec85ca3411e537df25a985f09737403e
Reviewed-on: https://chromium-review.googlesource.com/297251
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
2015-09-09 07:25:48 +00:00
Geoff Lang 5ade8459ad Properly check for EGL_KHR_create_context before creating ES3 context.
Mark EGL_KHR_create_context as supported in the DisplayGLs.

BUG=angleproject:1149

Change-Id: I20671535680eb2c3b9c08205cee243b3aa5c5821
Reviewed-on: https://chromium-review.googlesource.com/297080
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Tested-by: Geoff Lang <geofflang@chromium.org>
2015-09-03 15:10:22 +00:00
Jamie Madill a0a9e12ded translator: Add sh::OutputVariable type.
This replaces the dual-use of sh::Attribute, which can be a bit
confusing to people expecting a literal output variable.

Currently not used in Chromium, so should be safe to land.

BUG=angleproject:1146

Change-Id: I436f2bc9dc4ddc3709369cb2baa344c6b13a21a2
Reviewed-on: https://chromium-review.googlesource.com/296683
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>
2015-09-02 21:04:35 +00:00
Jamie Madill 929d7bcac2 Re-land "Fix warnings with ANGLE and VS2015."
With fix for VS2013.

BUG=None

Change-Id: I9f656efa6b540a03ce21f6b65fde0753c0d72538
Reviewed-on: https://chromium-review.googlesource.com/295157
Tested-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
2015-08-31 16:36:38 +00:00