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

270 Коммитов

Автор SHA1 Сообщение Дата
Jamie Madill 683dd1d6a8 GN: Move util build code into util/BUILD.gn.
Prepratory clean up for WinUWP support.

Bug: angleproject:4182
Change-Id: I97cc6cb42a50c6b57ca7d375d1e0a6b3da7aa9d7
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1998673
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
2020-01-14 15:05:34 +00:00
Jamie Madill 9190f49cff GN: Make new angle_test_utils target.
This source set target lets other targets import the test utils without
needing to export them. They get built into angle_util. They also get
compiled into the various tests and samples. The change also fixes
export issues.

Moves some of the GN logic into the util/ subfolder.

Bug: angleproject:3162
Bug: chromium:1030192
Change-Id: If99d201092ad8541c0de60b3bd893ac9b5875270
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1968259
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2019-12-16 22:35:05 +00:00
Jamie Madill 554b453c95 gn: Add 'test_only' label to util targets.
Clarifies that angle_util is only used in tests and samples.

Bug: angleproject:3162
Change-Id: I9a578cf7a9a09b2c3fd4683155824ed2e72f68cc
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1964934
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2019-12-12 21:31:23 +00:00
Jonah Ryan-Davis 6e4004dd2e Add metal display type to angle_deqp_tests
Adds --deqp-egl-display-type=angle-metal for running the deqp tests
on Mac. Note: does not add any test suppressions for metal.

Bug: angleproject:2634
Change-Id: I8f8d3a83cf93a5b930b05af9f0075a9ce435823a
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1954612
Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
Commit-Queue: Jonah Ryan-Davis <jonahr@google.com>
2019-12-09 17:12:53 +00:00
Jamie Madill e3c25715ec gn: Minor improvements.
Renaming "all" targets to reduce duplication. Also add libGLESv1_CM to
"angle". And remove "shader_translator" since we already had
"angle_shader_translator".

An attempt to work around "invalid COFF sections" error that is popping
up on the MSVC try bots.

Bug: None
Change-Id: I105aa5e59f67173643a3a2071b2aff345b5a6135
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1947457
Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2019-12-04 21:33:12 +00:00
Cody Northrop 6430e5e003 Enable frame capture on Android
This CL gets capture/replay working on Android again.
* Updates where Android frame captures are written
* Uses debug system properties to prime Android environment variables
* Adds a configurable target Context to the capture_replay sample
* Updates capture/replay documentation for Android

Bug: angleproject:4036
Test: Captured TRex on Android, replayed on Linux
Change-Id: I94b4f6dc77468cd179b9d884b4dcd4afa56bd28c
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1928056
Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Cody Northrop <cnorthrop@google.com>
2019-11-22 23:13:29 +00:00
Shahbaz Youssefi 4b642a6d90 Desktop GLSL input + Vulkan GLSL output in shader_translator
This is a sample program that can be used to compile a shader and
inspect the intermediate tree or the output from the shader translator.
This change adds support for the recently added desktop GLSL inputs as
well as the ability to produce Vulkan GLSL output.

Bug: angleproject:3453
Change-Id: I1f378e8d84b74636d6a47ce1aaff5f1f55f5bbb3
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1784881
Reviewed-by: Cody Northrop <cnorthrop@google.com>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
2019-11-13 19:16:37 +00:00
Jamie Madill f18ff94736 Minor tweaks to SampleApplication.
Removes an unreferenced function. Also adds the ability for samples to
respond to key up and down events. Only implemented on Windows.

Bug: angleproject:2830
Change-Id: I44c9f93f0ad07b92923ffc0efa580f97d9b98693
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1908448
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2019-11-11 15:39:38 +00:00
Jamie Madill 5c0e6e52bd Capture/Replay: Implement more state for mid-execution replay.
Includes much more state serialization. Notably Vertex Arrays were
missing as well as multiple GL render states. Also fixes many
serialization bugs. For example, we would not be using the correct
client array and pack/unpack state in the mid-execution capture. Also
depth/stencil attachments were missing from the capture.

Also fixes the replay sample to work with non-zero starting frames.

With these fixes we can run mid-execution replay of the T-Rex demo.

Bug: angleproject:3611
Change-Id: I6945eb9b30a5137be996956b43f074a0a750b333
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1895112
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
2019-11-08 23:09:33 +00:00
Jamie Madill 653ee5f115 Capture/Replay: Introduce capture index file.
This index file lets us very easily write a generic capture sample.
Previously the dev had to maintain a list of multiple sources files.
Potentially hundreds. By writing the source file list to an index file
we can load this easily in GN as a variable and plug that into the
sources.

Also updates docs.

Bug: angleproject:3611
Change-Id: I69ba961e271d6d13d06ae01c89a0605a6fd725ec
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1902189
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Cody Northrop <cnorthrop@google.com>
2019-11-07 14:28:55 +00:00
Jamie Madill 6c7208f93d Capture/Replay: Implement mid-execution replay.
Mid-execution replay starts the replay from a specific start frame
instead of frame 0. Integration tests will then run between the start
and end frames. This lets us make much smaller reproduction cases from
large benchmarks or applications.

We implement mid-execution replay via a cpp "Setup" function. The
replay test will run the setup function before the starting frame. Test
execution proceeds normally after setup.

Currently we do not implement mid-execution capture. We run capture on
all frames. Including frames before the start frame. We do this to
intercept compiled shaders and programs for easier caching. This could
be changed in the future to also start capture mid-execution. Mid-
execution capture might require using ProgramBinary calls to capture
shader and program data.

Many captures are unimplemented. Several comments indicate missing
functionality. There's a lot we can add as we explore replaying more
complex applications and higher GL versions. We will also need some
kind of state reset functionality so we can run the replay in a loop.

Bug: angleproject:3611
Change-Id: I51841fc1a64e3622c34e49c85ed8919a9a7c0b20
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1689329
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Cody Northrop <cnorthrop@google.com>
2019-11-03 03:47:41 +00:00
Jamie Madill e96039218e Capture/Replay: Correct a few GLenum replay issues.
This change refactors the GLenum utils into a non-autogenerated and an
autogenerated portion. That makes it easier to modify the non-auto-
generated bits to properly output GLenums even when the gl.xml data
isn't totally correct. For instance, the "GetPName" group was missing
a bunch of queries. Instead of trying to fix the GL we can simply fall
back to querying the "Default" group when we return invalid enum.

Also corrects a missing "0x" on hex output.

Also allows the capture/replay sample to specify the correct binary
data directory when testing a replay.

Bug: angleproject:3611
Change-Id: I8e4c690b2850bb157a8cde8b057b20603e4b177d
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1891008
Reviewed-by: Cody Northrop <cnorthrop@google.com>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2019-11-01 00:08:02 +00:00
Jamie Madill f251995def Capture/Replay: Write capture index file.
This file will be used with multi-frame captures to share common code.
Common code is global state, resource maps, and a list of frame replay
functions. This should make converting a CPP replay into a functional
test quite a bit simpler. The replay files will now be something like:

angle_capture_context1.cpp
angle_capture_context1.h
angle_capture_context1_frame000.cpp
angle_capture_context1_frame001.cpp
... etc

Also adds a template for adding a capture/replay sample. Instructions
are located in samples/BUILD.gn and docs in doc/CaptureAndReplay.md.

Bug: angleproject:3611
Change-Id: I437b338fd84689d670a7d9e3e219d9334de25fd8
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1869543
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tobin Ehlis <tobine@google.com>
Reviewed-by: Cody Northrop <cnorthrop@google.com>
2019-10-24 21:46:04 +00:00
Jamie Madill 57b37b6b79 Rename util/system_utils to util/test_utils.
This removes a GN naming conflict between util/system_utils and
common/system_utils. This conflict was preventing us from adding
unit tests to utils' version of system_utils. Since these functions are
only useful to tests and samples rename them test_utils for simplicity.

Will enable further development of ANGLE's standalone testing harness.

Bug: angleproject:3162
Change-Id: I9e34fb69f96c5de6dc2453fce4148a0f285e15ed
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1825268
Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2019-09-27 21:47:21 +00:00
Jamie Madill a3f1981deb Add SwiftShader to command line arguments.
Also adds parsing SwiftShader to the test expectations code.

Bug: angleproject:3876
Change-Id: I70e1475b62f86160d5a150218e792801fb0259bc
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1817109
Reviewed-by: Alexis Hétu <sugoi@chromium.org>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
2019-09-24 18:09:49 +00:00
Tim Van Patten 90a58622fd Refactor ShaderVariable to Remove Specializations
The following structs are being refactored and moved into the parent
struct ShaderVariable:

VariableWithLocation
Uniform
Attribute
OutputVariable
InterfaceBlockField
Varying

Bug: angleproject:3899
Test: CQ
Change-Id: I389eb3ab4ed44a360e09fca75ecc78d64a277f83
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1785877
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com>
Commit-Queue: Tim Van Patten <timvp@google.com>
2019-09-06 14:51:31 +00:00
Shahbaz Youssefi e54d0f90d1 Vulkan: Debug overlay
A debug overlay system for the Vulkan backend designed with efficiency
and runtime configurability in mind.  Overlay widgets are of two
fundamental types:

- Text widgets: A single line of text with small, medium or large font.
- Graph widgets: A bar graph of data.

Built on these, various overlay widget types are defined that gather
statistics.  Five such types are defined with one widget per type as
example:

- Count: A widget that counts something.  VulkanValidationMessageCount
  is an overlay widget of this type that shows the number of validation
  messages received from the validation layers.
- Text: A generic text.  VulkanLastValidationMessage is an overlay
  widget of this type that shows the last validation message.
- PerSecond: A value that gets reset every second automatically.  FPS is
  an overlay widget of this type that simply gets incremented on every
  swap().
- RunningGraph: A graph of last N values.  VulkanCommandGraphSize is an
  overlay of this type.  On every vkQueueSubmit, the number of nodes in
  the command graph is accumulated.  On every present(), the value is
  taken as the number of nodes for the whole duration of the frame.
- RunningHistogram: A histogram of last N values.  Input values are in
  the [0, 1] range and they are ranked to N buckets for histogram
  calculation.  VulkanSecondaryCommandBufferPoolWaste is an overlay
  widget of this type.  On vkQueueSubmit, the memory waste from command
  buffer pool allocations is recorded in the histogram.

Overlay font is placed in libANGLE/overlay/ which gen_overlay_fonts.py
processes to create an array of bits, which is processed at runtime to
create the actual font image (an image with 3 layers).

The overlay widget layout is defined in overlay_widgets.json which
gen_overlay_widgets.py processes to generate an array of widgetss, each
of its respective type, and sets their properties, such as color and
bounding box.  The json file allows widgets to align against other
widgets as well as against the framebuffer edges.

Two compute shaders are implemented to efficiently render the UI:

- OverlayCull: This shader creates a bitset of Text and Graph widgets
  whose bounding boxes intersect a corresponding subgroup processed by
  OverlayDraw.  This is done only when the enabled overlay widgets are
  changed (a feature that is not yet implemented) or the surface is
  resized.
- OverlayDraw: Using the bitsets generated by OverlayCull, values that
  are uniform for each workgroup (set to be equal to hardware subgroup
  size), this shader loops over enabled widgets that can possibly
  intersect the pixel being processed and renders and blends in texts
  and graphs.  This is done once per frame on present().

Currently, to enable overlay widgets an environment variable is used.
For example:

    $ export ANGLE_OVERLAY=FPS:VulkanSecondaryCommandBufferPoolWaste
    $ ./hello_triangle --use-angle=vulkan

Possible future work:

- On Android, add settings in developer options and enable widgets based
  on those.
- Spawn a small server in ANGLE and write an application that sends
  enable/disable commands remotely.
- Implement overlay for other backends.

Bug: angleproject:3757
Change-Id: If9c6974d1935c18f460ec569e79b41188bd7afcc
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1729440
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
2019-08-31 03:40:44 +00:00
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