This was fixed in SwiftShader and I verified it
Bug: angleproject:4213
Change-Id: I6f591b81a62ec4c586d4abb7e6a2345794602833
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2025066
Reviewed-by: Ian Elliott <ianelliott@google.com>
Commit-Queue: Ian Elliott <ianelliott@google.com>
GetLocationCount() returned secondary size for fields of a struct. For
matrices however, the correct value would be the primary size.
This is a similar fix to 6423b7fc7d.
Bug: angleproject:4200
Change-Id: I2c69b9454729993010766fcde0cabec986b7429d
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2021738
Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com>
Reviewed-by: Tim Van Patten <timvp@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
On a platform with multiple graphics devices (e.g. laptop with
integrated and descrete devices) it's handy to be able
to specify the specific device we want ANGLE to use.
Setting the environment variable ANGLE_PREFERRED_DEVICE to the device
name as returned by VkPhysicalDeviceProperties.deviceName will select
that device.
Bug: angleproject:4305
Change-Id: Ib16895add2c36a59135942b52401ceb7b6bc0895
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2002737
Commit-Queue: Courtney Goeltzenleuchter <courtneygo@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
When ANGLE is using the GL backend on GLX, we can expose
eglGetMscRateCHROMIUM via glXGetMscRateOML. Otherwise, this function
should return false.
Bug: chromium:1042393
Change-Id: Id9b308c2217e07ee9860e2869be0e23b7a0c7411
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2017048
Commit-Queue: Jonah Ryan-Davis <jonahr@google.com>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
There are two issues with processing the images multiple times:
- The graph trips up because on the first addWriteDependency, the
current writer pointer of the image will be set to the recorder, and
which on the next addWriteDependency creates a self-dependency.
- We transition the layout of the whole of the image, so doing that
multiple times is inefficient.
Bug: angleproject:4312
Change-Id: Ibae72e8698edf5db97139f48d68624d3e9a1d5db
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2022355
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Ian Elliott <ianelliott@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Unlike other platforms' definitions, the GGP SDK expects the project files to
define this instead of having the compiler define it for us.
Bug: angleproject:4237
Change-Id: I8f10311fdff785a74c5e49fc53a512f1c050bff3
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2021010
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
The linear command graph prohibits rendering outside the render pass
*after* we begin a renderpass. The prior code would render outside a
render pass (changing image layouts) even after a RenderPass was
started in setupDraw(). The new code changes the image layouts in
ContextVk::syncState so we no longer need to "prepend" image layout
changes after we started a RenderPass. Now we record layout changes
followed by the draw calls or other renderpass ops.
Bug: angleproject:4029
Bug: angleproject:3539
Change-Id: I420858907ac38f995400c1b566c856d966a4e979
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2015940
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Tobin Ehlis <tobine@google.com>
Change RendererVk to have 3 VkQueues instead of one.
Each queue has a priority. To match extension: Low, Med, High.
gl::Context contains priority.
ContextVk contains a reference to one of the queues.
Every call to vulkan that uses queue, uses the associated context queue.
Bug: angleproject:3962
Change-Id: Ibd913a07a81c77bd975921d6dbae6a222842e88b
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1978154
Commit-Queue: Jeff Vigil <j.vigil@samsung.com>
Commit-Queue: Mohan Maiya <m.maiya@samsung.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
This test will load traces and cycle through a set of frames.
The new tests are:
TracePerfTest.Run/gl_trex_200_210
TracePerfTest.Run/gl_trex_800_810
TracePerfTest.Run/gl_trex_900_910
TracePerfTest.Run/gl_trex_1300_1310
To download the traces, you must be granted access and authenticate
with the cloud. See the steps in RestrictedTraces.md for this.
Then add the following to the end of your .gclient file:
"custom_vars": {
"checkout_angle_internal":"True"
},
And run `glcient runhooks`.
To enable building the test, add the following GN arg:
build_angle_trace_perf_tests = true
See the new markdown document for ways to execute the tests.
Bug: angleproject:3630
Change-Id: Ic25cd94fb36b35fcf187e88d3bf9548c65f59755
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1949605
Commit-Queue: Cody Northrop <cnorthrop@google.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
This initial prototype introduces a new feature to the Vulkan back-end
that disables the deferred command recording. The intent is to have a
lower CPU overhead during submission calls which currently walk a DAG.
The feature is not complete. Currently it only passes the ANGLE
SimpleOperationTests. Moreover it is extremely simple and only allows
use of one command buffer at a time. In the future we'll allow open
command buffers for recording outside and inside render pass commands
at the same time. We'll also support collapsing RenderPasses together
for some use cases.
Currently the prototype only passes "SimpleOperationTest". There are
quite a few unimplemented features like queries, XFB, etc.
Bug: angleproject:4029
Change-Id: I82760986683f55e37ac4ea559de6f4cffb6ef84e
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1953485
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tobin Ehlis <tobine@google.com>
Currently Windows on ARM doesn't support OpenGL but it is enabled in ANGLE by default.
Vulkan is only supported via Swiftshader so we should not test native Vulkan.
Therefore it causes crashes and fails on Windows on ARM when running angle_end2end_tests.
Bug: angleproject:4318
Change-Id: I70349ed53a2248df2dc8e7a0c0b3a6a5537a1110
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2007414
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Geoff Lang <geofflang@chromium.org>
According to the latest change in WebGL's OVR_multiview2 spec, the GL_OVR_multiview should NOT be defined. Refer to https://www.khronos.org/registry/webgl/extensions/OVR_multiview2/
I.e. this shader should NOT fail compilation:
#version 300 es
#extension GL_OVR_multiview2 : require
#ifdef GL_OVR_multiview
#error legacy GL_OVR_multiview support must be forbidden
#endif
....
Bug: angleproject:4279
Change-Id: Ic94cba6785ea3a1fa14d5131dc0960214aa574be
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1994830
Commit-Queue: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Rafael Cintron <rafael.cintron@microsoft.com>
Apple doesn't support GL_KHR_robust_buffer_access_behavior, so we don't
know if we can trust the driver to be safe with out of bounds array
accesses. It's not currently failing the out of bounds access tests, but
this may be coincidental. In general it makes sense to always clamp
array accesses when GL_KHR_robust_buffer_access_behavior is not
supported.
The validating command decoder actually enables this workaround
unconditionally, but that seems unnecessary.
Bug: angleproject:2978
Change-Id: Ib061dd4db10e044ced0dff95d0aac6a91f15b100
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2018182
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: James Darpinian <jdarpinian@chromium.org>
We were expecting an uninitialized texture to contain black. However
the contents of the texture data may be undefined.
Discovered when working with the Vulkan command stream refactor.
Bug: angleproject:4029
Change-Id: Ia5d24707746819b116ac0053fabb48033574569a
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2017978
Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
The missing flags were causing the configs to be reused and improperly
tested. Noticed when working with the Vulkan command graph feature.
Bug: angleproject:4029
Change-Id: I2fea73fc0637d1adbf73577eb5dfcfa4a759c066
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2019503
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Michael Spang <spang@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Inactive vertex attributes are harmless to remove. Between two
consecutive stages, the input varyings must be a subset of the previous
stage's output varyings. This means removing inactive input varyings is
also harmless.
Removing inactive output varyings is not possible though. GLSL allows a
varying to not be written by the previous stage even if it's used in the
current stage (values will be undefined, but it's not an error). This
means that an inactive output varying may still need to exist as part of
the shader interface in case the following stage has that varying as
input (and is active).
Bug: angleproject:3394
Change-Id: I7302973d2b8356d9f54a66f8259c32f245a99904
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2009986
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Loose inactive samplers are already removed in
RemoveInactiveInterfaceVariables. In-struct samplers are always marked
active by CollectVariables if the uniform is active. If the uniform is
inactive, it is removed entirely by the translator. Thus no inactive
samplers are left for glslang wrapper to clean up.
Bug: angleproject:3394
Change-Id: Ic0fef052afa992bd612fd22ffa1e5b9aa72a17bc
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1999488
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
With the exception of varyings, every other qualifier can be directly
output by the translator. This simplifies and optimizes glslang
wrapper.
Varyings' in/out qualifiers are still placed in @@ QUALIFIER macros so
glslang wrapper can remove them, if inactive, not by commenting them
out, but by turning them into global variables.
Bug: angleproject:3394
Change-Id: I9a3d18df2cfd36a38308bf8f71ac12f1e1513ece
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1998839
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
Based on Nvidia's recommendation that the following:
all(lessThan(gl_FragCoord.xy, vec2(1.0, 1.0)))
isn't necessarily true for only a single FS invocation, even when not
multisampling. The tests that do the above are changed to compute
instead.
Bug: angleproject:3831
Change-Id: I22d935f797c2e385218bc6af31e98a7f672a7707
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2012743
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
By removing inactive uniforms in the translator, glslang wrapper doesn't
need to comment them out. Additionally, inactive uniforms don't find
their way in the default uniform block, reducing its size if there's a
mix of active and inactive uniforms.
As collateral, it also fixes a bug where inactive uniforms of struct
type were not correctly removed by glslang wrapper.
Bug: angleproject:3394
Bug: angleproject:4211
Bug: angleproject:4248
Change-Id: I874747070e875fe24bf59d39d1322e319e280a16
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1999278
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
There's no dirty bit handler if VK_EXT_transform_feedback disabled, but
we're setting that dirty bit in syncState. This results in calling a null
method pointer. Skip the invalidate if the extension is not enabled.
gl::LogMessage::~LogMessage() at ./../../third_party/angle/src/common/debug.cpp:0
rx::ContextVk::setupDraw(gl::Context const*, gl::PrimitiveMode, int, int, int, gl::DrawElementsType, void const*, angle::BitSetT<11ul, unsigned long, unsigned long>, rx::vk::priv::SecondaryCommandBuffer**) at ./../../third_party/angle/src/libANGLE/renderer/vulkan/ContextVk.cpp:844
rx::ContextVk::drawArrays(gl::Context const*, gl::PrimitiveMode, int, int) at ./../../third_party/angle/src/libANGLE/renderer/vulkan/ContextVk.cpp:1698
gl::Context::drawArrays(gl::PrimitiveMode, int, int) at ./../../third_party/angle/src/libANGLE/Context.inl.h:112
gl::DrawArrays(unsigned int, int, int) at ./../../third_party/angle/src/libGLESv2/entry_points_gles_2_0_autogen.cpp:926
(anonymous namespace)::AttributeLayoutNonIndexed::Draw(int, unsigned int, unsigned short const*) at ./../../third_party/angle/src/tests/gl_tests/AttributeLayoutTest.cpp:431
(anonymous namespace)::AttributeLayoutTest::Run(bool) at ./../../third_party/angle/src/tests/gl_tests/AttributeLayoutTest.cpp:305
[This stack is from the added assert; calling a null function pointer
crashes without producing a useful stack trace.]
Bug: angleproject:4326
Change-Id: I036ae322bddc4865229fa3fe7ea72a4344b99f83
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2011408
Commit-Queue: Michael Spang <spang@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
ARM devices cast float to unsigned int differently than Intel devices.
Need to do additional work to ensure consistent behavior.
This was causing negative API tests to fail because the invalid
parameter was being turned into a 0 which is valid, but not what was
intended (should have been 0xffffffff).
Bug: angleproject:4323
Change-Id: I7447842d0f56362d9eb2db4d04b5416c78e51d27
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2012746
Commit-Queue: Courtney Goeltzenleuchter <courtneygo@google.com>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
In preparation for compiling shaders early at link time, this change
reworks line raster emulation such that it uses specialization constants
instead of a preprocessor condition. This means drawing both triangles
and lines with this program will still result in a one-time shader
compilation.
The compilation is still done at draw time in this change.
Bug: angleproject:3394
Change-Id: I0bf91398868d7f7147456533b728906b505192b2
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1992365
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
The non-float variations of the mix builtin were conditioned to desktop
GLSL, but they are present in ESSL 3.1+. This change also implements
constant folding of these builtins as exercised by dEQP.
Bug: angleproject:4300
Change-Id: Iec34de4cf370e00d67fd605148cd7848f9e122f8
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2006809
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Cody Northrop <cnorthrop@google.com>