Commit Graph
9443 Commits
Author SHA1 Message Date
Jamie Madill cedea1d91b Vulkan: Rename 'extents' param to 'glExtents'.
Merely a minor refactor to clean up the diff of a subsequent CL. In the
follow up we will also distinguish the GL extents from the Vulkan
extents/layerCount pair.

Bug: angleproject:3189
Change-Id: Ibbb79bf2e6d3f798243b424bacbfb2e5538bfecf
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1709755
Commit-Queue: Jamie Madill <[email protected]>
Reviewed-by: Jonah Ryan-Davis <[email protected]>
2019-07-22 22:43:20 +00:00
Clemen Deng 592539fdee Implicit conversions for Desktop GL shaders
Need to support implicit conversions between types for GL shaders
Other small fixes to support GL shaders

Bug: angleproject:3673
Change-Id: I5341cb7195054ccc4cd36aad5dc8c801c7e1a14f
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1698649
Commit-Queue: Clemen Deng <[email protected]>
Reviewed-by: Shahbaz Youssefi <[email protected]>
2019-07-22 21:55:20 +00:00
Yuly Novikov 3dcd8ebb80 Skip ProgramBinaryTransformFeedbackTest.GetTransformFeedbackVarying
on Pixel 2 Vulkan.

Bug: angleproject:3690
Change-Id: Ic00038cfe8fe9d1170eb75aec89c0ac0f074fb05
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1710026
Reviewed-by: Yuly Novikov <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
Commit-Queue: Yuly Novikov <[email protected]>
2019-07-22 20:50:28 +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 <[email protected]>
Reviewed-by: Cody Northrop <[email protected]>
Commit-Queue: Jamie Madill <[email protected]>
2019-07-22 20:26:18 +00:00
Jamie Madill da2b649ce9 Texture: Make ImageIndex store layer counts.
Only for 2D array textures.

Bug: angleproject:3189
Change-Id: I9958ab60ffa464aa63f5cb321cbbe14b378f3647
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1709109
Commit-Queue: Jamie Madill <[email protected]>
Reviewed-by: Cody Northrop <[email protected]>
Reviewed-by: Jonah Ryan-Davis <[email protected]>
2019-07-22 20:12:25 +00:00
Yuly Novikov af80b78119 Skip ShaderStorageBufferTest31.ActiveSSBOButNotStaticallyUsed
on Pixel 2 Vulkan.

Bug: angleproject:3725
Change-Id: Ic5c80ad3ec495c3fd382639f761b368f16993434
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1713564
Reviewed-by: Yuly Novikov <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
Commit-Queue: Yuly Novikov <[email protected]>
2019-07-22 19:23:35 +00:00
Shahbaz Youssefi b82d863336 Vulkan: Atomic counter buffer support
Vulkan doesn't treat atomic counters especially, and they are emulated
with atomic access to storage buffers.

A single atomic counter buffer binding per pipeline is supported.  All
the atomic counters identify an offset within this buffer.  The shader
is modified to include a storage buffer definition with
`uint counters[];` as the only field.

A compiler pass replaces atomic counter definitions with variables that
hold the corresponding offset parameter, as well as changing atomic_uint
types to just uint (as the offset).  Where an atomic counter variable is
used, it is replaced with the offset variable (plus the array index, if
array).  At the same time, built-in `atomicCounter*` functions are
replaced with a corresponding `atomic*` function and
`memoryBarrierAtomicCounter` is replaced with `memoryBarrierBuffer`.

Bug: angleproject:3566
Change-Id: Iefb3d47de6a5cb3072bfa0cb94a46ac6a886d369
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1704635
Commit-Queue: Shahbaz Youssefi <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
Reviewed-by: Tim Van Patten <[email protected]>
2019-07-22 19:15:16 +00:00
Yuly Novikov bd4ff4792e Revert "Reland "Temporarily disable creating D3D debug device.""
This reverts commit 6064e6ab6b.

Reason for revert: flakiness should be fixed by https://chromium-review.googlesource.com/c/angle/angle/+/1709726

Original change's description:
> Reland "Temporarily disable creating D3D debug device."
>
> This reverts commit 28394c2295.
>
> Reason for revert: may be the cause of flakiness on Win10 Debug (NVIDIA) per http://crbug.com/972914 .
>
> Original change's description:
> > Revert "Temporarily disable creating D3D debug device."
> >
> > This reverts commit 3d544fffe7.
> >
> > Reason for revert: Seems like flakiness is not related.
> >
> > Suppress D3D11 test failures uncovered by re-enabling D3D debug device:
> > ComputeShaderTest.DispatchCompute
> > Texture2DTestES3.TextureImplPropogatesDirtyBits
> > D3DTextureTestMS.*
> >
> > Also a small fix to ANGLETestBase::checkD3D11SDKLayersMessages
> > to clear reported messages, otherwise the failures are also reported
> > for tests following the one with the actual failure.
> >
> > Original change's description:
> > > Temporarily disable creating D3D debug device.
> > >
> > > To diagnose whether Windows Intel end2end tests flakiness
> > > is related to creating debug device and new version of Windows SDK.
> > >
> > > Bug: angleproject:3153
> > > Change-Id: Ica7eae3fe875e22203b6dfd98b83604d66a97737
> > > Reviewed-on: https://chromium-review.googlesource.com/c/1476954
> > > Reviewed-by: Geoff Lang <[email protected]>
> > > Commit-Queue: Yuly Novikov <[email protected]>
> >
> > Bug: angleproject:3153, angleproject:3493
> > Bug: angleproject:3501, angleproject:3512, angleproject:3513
> >
> > Change-Id: I232da72aa09c2b9230cf179dd54e1731f8365f8e
> > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1480854
> > Reviewed-by: Yuly Novikov <[email protected]>
> > Reviewed-by: Jamie Madill <[email protected]>
> > Commit-Queue: Yuly Novikov <[email protected]>
>
> [email protected],[email protected],[email protected]
>
> Change-Id: I38a5cc9bb6ebcd50e97e40cc972a82679e73732a
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: angleproject:3153, angleproject:3493, angleproject:3501, angleproject:3512, angleproject:3513
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1652784
> Reviewed-by: Kenneth Russell <[email protected]>
> Commit-Queue: Kenneth Russell <[email protected]>

[email protected],[email protected],[email protected],[email protected]

Bug: angleproject:3153, angleproject:3493, angleproject:3501, angleproject:3513
Change-Id: I16eff79172dcfa2dd6d4f6445a74c9c65c1bd27c
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1710861
Reviewed-by: Yuly Novikov <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
Commit-Queue: Yuly Novikov <[email protected]>
2019-07-22 18:11:44 +00:00
Shahbaz Youssefi 87dc17b5e7 Vulkan: Generalize buffers desc set name to include images
And atomic counter buffers which are emulated with storage buffers.

Bug: angleproject:3566
Change-Id: I102763900c779c3a84661491bad53aec384461f7
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1713086
Reviewed-by: Jamie Madill <[email protected]>
Commit-Queue: Shahbaz Youssefi <[email protected]>
2019-07-22 18:03:42 +00:00
Fei Yang a71549b112 Vulkan: Intermittent failures in many GLES2 CTS
The stage mask in vkCmdPipelineBarrier is incorrectly set.

Bug: angleproject:3473
Change-Id: I4fea5994a391b0db0f81183f1c4d4ba47d387acb
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1631849
Commit-Queue: Shahbaz Youssefi <[email protected]>
Reviewed-by: Shahbaz Youssefi <[email protected]>
2019-07-22 17:37:04 +00:00
Jonah Ryan-Davis 7151fe54fe Port adjust_src_dst_region_for_blitframebuffer workaround to ANGLE.
BlitFramebuffer has issues on some platforms with large source/dest
textures. As per the WebGL2 spec, this was caught with validation for
sizes over 2^32, but there is a specific issue on Linux NVIDIA where it
fails on sizes over 2^16. A better workaround (from chromium), resizes
the blitframebuffer call based on the framebuffer size.

Bug: chromium:830046
Change-Id: Ic6196db6228d0d0ac92b12a68bbced76dcbcdf8c
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1707115
Reviewed-by: Jonah Ryan-Davis <[email protected]>
2019-07-22 15:01:34 +00:00
Mohan Maiya 9ec3f51d11 Reland "Vulkan: Implement OES_get_program_binary extension"
Reason for revert: default uniform initialization was incomplete

This change has the following fixes:
    1. Add missing default uniform initialization when loading
       program binaries.
    2. Re-enable OES Program Binary capabilities for Vulkan.
    3. Added two angle end2end test,
       - ProgramBinaryES3Test.BinaryWithLargeUniformCount
         uses several uniforms across the vertex and fragment
	 shaders.
       - ProgramBinaryES3Test.ActiveUniformShader tests
         the difference between uniform static and active use

Bug: angleproject:3216
Bug: angleproject:3217
Bug: angleproject:3665
Tests: dEQP-GLES3.functional.shader_api.program_binary*
       angle_end2end_tests --gtest_filter=ProgramBinary*
Change-Id: If6886f01241d65bb1e17a21cc3406533021072ee
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1699069
Commit-Queue: Mohan Maiya <[email protected]>
Commit-Queue: Jamie Madill <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
Reviewed-by: Shahbaz Youssefi <[email protected]>
2019-07-19 21:46:29 +00:00
Yuly Novikov 8bea8eec7a Guard ID3DUserDefinedAnnotation access in DebugAnnotator11.
ID3DUserDefinedAnnotation is not thread-safe, like ID3D11DeviceContext,
however, it's being accessed from WorkerThread for parallel compilation,
thus guard it with mutex lock.

Bug: angleproject:3493
Change-Id: Ic7cc7fe03675174e054fe1e11d8d9e05abc716a5
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1709726
Reviewed-by: Jamie Madill <[email protected]>
Commit-Queue: Yuly Novikov <[email protected]>
2019-07-19 21:03:20 +00:00
Jiacheng Lu f35f11106d Add script to apply clang-format on all sources
1. python script wrapper to call clang-format over the whole code base
2. Add clang-format rule `IncludeBlocks: Preserve` to tell clang-format
do not merge include blocks
3. Fix existed clang-format issue in code base

Bug: angleproject:3532
Change-Id: I289292dc62c2784ff21688065c87c3f3f5538f17
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1709720
Reviewed-by: Jamie Madill <[email protected]>
Commit-Queue: Jamie Madill <[email protected]>
2019-07-19 20:10:28 +00:00
Jamie Madill fb5c581dc4 Functional revert of "Signal different dirty bit for vertex buffer change."
Seems to be causing rendering regressions in the Google Maps benchmark.
Likely causing other serious regressions.

Original CL: https://chromium-review.googlesource.com/c/angle/angle/+/1684294

Bug: angleproject:3256
Change-Id: I41608a3ce3c3267097b4c1c0a6f7450cf8a2f48f
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1709756
Reviewed-by: Cody Northrop <[email protected]>
Commit-Queue: Jamie Madill <[email protected]>
2019-07-19 19:53:08 +00:00
James Dong 765ee7b70b Vulkan: support for new vertex attribs in GLES 3.0
Fixes handling of packed vertex formats, adds new overrides for 32-bit
[SU](NORM|SCALED) vertex types, and handles half-precision floats
correctly.

Pixel 2 does not natively support certain 10-10-10-2 vertex formats;
this change does not add support for them.

Test: ./angle_deqp_gles3_no_gtest --deqp-egl-display-type=angle-vulkan -n 'dEQP-GLES3.functional.vertex_arrays.*'
Test: ./angle_end2end_tests --gtest_filter='AttributeLayout*/ES3_Vulkan'
Test: ./angle_end2end_tests --gtest_filter='VertexAttribute*/ES3_Vulkan'
Bug: angleproject:3193
Change-Id: I5ae4edd743e86e3e89e2697034c04dc4d9ecd1f9
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1668230
Reviewed-by: Shahbaz Youssefi <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
Reviewed-by: Tim Van Patten <[email protected]>
Commit-Queue: James Dong <[email protected]>
2019-07-19 19:19:58 +00:00
Geoff Lang 86a28b3de8 Vulkan: Use the correct context in ImageVk::orphan.
The context used for Image creation was being used during orphaning. This
causes problems when the image is created with an external source or when
different contexts are used between creation and orphaning.

BUG=angleproject:3722

Change-Id: Iee4abd2116c3410efd8fb35722cc956cc6d8a3fa
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1709753
Reviewed-by: Jamie Madill <[email protected]>
Commit-Queue: Geoff Lang <[email protected]>
2019-07-19 18:16:30 +00:00
Geoff Lang 833bce722b Call ImageImpl::destroy before destroying the image source.
egl::Image destroys the source sibling before calling the backend destroy
function.  ImageVk needs the source image to do proper clean up.

BUG=angleproject:3722

Change-Id: I110d77a9c4151166624bb953c579102ac7dab6ee
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1709752
Reviewed-by: Jamie Madill <[email protected]>
Commit-Queue: Geoff Lang <[email protected]>
2019-07-19 18:16:10 +00:00
Geoff Lang 610f2388fd Return backwards compatible context versions in Vulkan, GL and D3D11.
This allows us to pass some dEQP GLES 2.0 tests that require using an ES 3.0
context and matches native driver behaviour of returning a higher-than-
requested context version when it's backwards compatible.

BUG=angleproject:3425
BUG=angleproject:3300
BUG=angleproject:3715
BUG=angleproject:3243
BUG=angleproject:3240
BUG=angleproject:3716

Change-Id: I03dfd56deb6191c3363808717e0eea6fdcf5f3ac
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1709111
Commit-Queue: Geoff Lang <[email protected]>
Reviewed-by: Tim Van Patten <[email protected]>
2019-07-19 17:49:50 +00:00
Mohan Maiya 901dd5458e Rectify bug in initialization of offsets for uniform variables
Make sure to set a uniform's flattenedOffsetInParentArrays
value only if it has a valid parent array index.
Serialize/Deserialize flattenedOffsetInParentArrays value.

Bug: angleproject:3216
Bug: angleproject:3217
Bug: angleproject:3665
Change-Id: I6e4d003b1dd74b330bcf153f8d3df92414f198dd
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1704219
Commit-Queue: Jamie Madill <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
2019-07-19 16:49:00 +00:00
Clemen Deng 523dbf4070 Add GL versions to desktop implementation
The current implementation generates entry points for GL up to
version 3.1. Will need to support later versions for some apps.

Bug: angleproject:3698
Change-Id: Ic44d07b12a9eeeceb8cd98dd9c44652dca728dc0
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1700572
Commit-Queue: Clemen Deng <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
Reviewed-by: Geoff Lang <[email protected]>
2019-07-19 15:11:30 +00:00
Clemen Deng ce33059365 Rename ProvokingVertex and TextureBarrier
Need to rename these so that they don't conflict
with GL function declarations

Bug: angleproject:3702
Change-Id: Iefe490cb53a384c45f0d0024321deda43b461bcc
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1704214
Reviewed-by: Jonah Ryan-Davis <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
Commit-Queue: Clemen Deng <[email protected]>
2019-07-19 14:57:07 +00:00
Geoff Lang 6a02f06dfd Implement EGL_ANGLE_create_context_backwards_compatible
This extension allows the user to specify if ANGLE should create a
context of the exact requested version or a higher version context that
is backwards compatible.

BUG=angleproject:3425

Change-Id: I7d0b75cdd7e34a2fc888aa238e1eeb67af82ae0d
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1601560
Commit-Queue: Geoff Lang <[email protected]>
Reviewed-by: Shahbaz Youssefi <[email protected]>
2019-07-18 22:51:46 +00:00
Jamie Madill 9c78f592fc Remove a few histograms from Renderer11.
D3D11 startup time isn't something we're actively looking at right now.

Bug: chromium:975166
Change-Id: I3e56d0b0e0da7eb5b10c55b8cfcc0b9769064202
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1707929
Reviewed-by: Geoff Lang <[email protected]>
Commit-Queue: Jamie Madill <[email protected]>
2019-07-18 16:29:26 +00:00
Shahbaz Youssefi 8cb9596077 Vulkan: Fix FS array output location assignment
Test: angle_end2end_test --gtest_filter=GLSLTest_ES3.FragmentShaderOutputArray/ES3_Vulkan
Bug: angleproject:3707
Change-Id: I6519a76aa58ad80ada0e2ad90a2a70d93f831ce5
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1704779
Commit-Queue: Courtney Goeltzenleuchter <[email protected]>
Reviewed-by: Shahbaz Youssefi <[email protected]>
2019-07-18 13:53:45 +00:00
Jiacheng Lu ec30d78d51 Optimize uniform matrix update
1. Add a fast matrix update function to do a single memcpy for uniform
matrix assignment with same layout. It benefits row-4 no-transpose GLSL
matrix and col-4 transpose HLSL matrix.
2. Make boolean IsColumnMajor to be a template parameter in generate
uniform matrix updating, which gets rid of the conditional branch
in loop and has better performance.
3. Add e2e test of uploading multiple 3x4 GLSL matrices at the same
time, which adds coverage to this CL.

Bug: angleproject:3632
Change-Id: Id1701ef6fbf63ea4b9884254d93ea8eacfe4e16a
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1688274
Commit-Queue: Jamie Madill <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
2019-07-18 13:40:45 +00:00
Jamie Madill 69194e5f49 Reduce variance in TextureUploadPerf.
This reduces the test time to run in several ms instead of almost
seconds per iteration. It allows us to use the perf test runner harness
to check test performance more accurately by increasing the sample
count.

It first reduces the test iteration count to reduce total test time.
It also refactors the test contents to not allocate new objects and
memory with every test iteration. This gives a better sampling of what
the test is obsering: texture upload performance.

Also allows tests that like to track GPU time to be used with the NULL
device option.

Bug: angleproject:3712
Change-Id: Idacc3e3b424f8882d7680769b27d1f04146ea65d
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1707112
Reviewed-by: Tobin Ehlis <[email protected]>
Reviewed-by: Shahbaz Youssefi <[email protected]>
Commit-Queue: Jamie Madill <[email protected]>
2019-07-18 12:19:15 +00:00
Shahbaz Youssefi e911188570 Vulkan: Optimize texture upload barriers
When flushing staged uploads to an image, a 64-wide bitfield is used to
track subresources that are uploaded since the last barrier.  If a
collision is detected, a barrier is inserted and the bitfield is reset.
If the image has more than 64 subresources, some subresources would map
to the same bit and cause a few unnecessary barriers.

Texture upload benchmarks show 5% to 10% improvement both in CPU and
GPU time.

Bug: angleproject:3347
Change-Id: I21dd23c78879bb01d58bc869ffc8bee06c79e6c1
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1700147
Reviewed-by: Tobin Ehlis <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
Commit-Queue: Shahbaz Youssefi <[email protected]>
2019-07-18 02:49:07 +00:00
Li, Hao e9cffa62c9 Rename data_dir to angle_data_dir in GN files
Dawn reuses the Vulkan validation layers of ANGLE to avoid building
twice in chromium, and references build_overrides/vulkan_common.gni,
but angle_data_dir is undefined, which is defined as data_dir in
angle.gni. There is a reminder to rename this name in
https://chromium-review.googlesource.com/c/chromium/src/+/1610488

Bug: angleproject:3710
Change-Id: I4b7c4d24c37770ff58b70c988851a6ed32a04296
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1703175
Reviewed-by: Yuly Novikov <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
Commit-Queue: Yuly Novikov <[email protected]>
2019-07-17 16:58:00 +00:00
Shahbaz Youssefi c44d2c7919 Fix glGetProgramResourceName filling output with 0
strncpy was used to copy resource names, which fills the unused parts of
the buffer with '\0'.  The spec doesn't forbid this, but dEQP fails on
this behavior, presumably to try and catch overflow bugs.

Bug: angleproject:3562
Change-Id: Ifce2d690221b2403848cb8913f4753ec60dfffab
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1698647
Commit-Queue: Shahbaz Youssefi <[email protected]>
Reviewed-by: Courtney Goeltzenleuchter <[email protected]>
Reviewed-by: Jonah Ryan-Davis <[email protected]>
2019-07-17 16:55:20 +00:00
Shahbaz Youssefi 2e43b0f5ef Vulkan: Implement memory barriers
Bug: angleproject:3574
Change-Id: I13d8f4fcd6f1bf9bf3496c91c2c697076e2491bd
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1699005
Reviewed-by: Tobin Ehlis <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
Commit-Queue: Shahbaz Youssefi <[email protected]>
2019-07-16 20:56:29 +00:00
Jiacheng Lu 7a5f35c49f Filter out redundant glDepthRange calls
1. Compare depth range with active config in frontend when glDepthRange
is called. It avoids triggering unnecessary backend update. Also remove
depth range checking in D3D and GL backends as they are now done in
frontend.
2. Change the clamp on far and near plane to ASSERT statement in vulkan
backend, as clamp already been applied in frontend.

Bug: angleproject:3696
Change-Id: I52ad420dc446d685b98d53690637a19553372873
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1702284
Reviewed-by: Jamie Madill <[email protected]>
Reviewed-by: Tobin Ehlis <[email protected]>
Commit-Queue: Jamie Madill <[email protected]>
2019-07-16 20:50:40 +00:00
Geoff Lang 950e1a4ddb GL: Reset the pixel unpack state after initializing texture data.
Texture data initialization happens after dirty bit synchronization so
TextureGL::initializeContents must be careful to leave the applied state the
same way it found it.

BUG=angleproject:3703

Change-Id: I1647cfc59c45fd9fad0fcde2e37af831e56f2e57
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1704215
Reviewed-by: Jamie Madill <[email protected]>
Reviewed-by: Jonah Ryan-Davis <[email protected]>
Commit-Queue: Geoff Lang <[email protected]>
2019-07-16 20:44:49 +00:00
Shahbaz Youssefi f92fc91688 Vulkan: Compute shader support
A DispatchHelper class is created as the equivalent of FramebufferHelper
as a command graph resource.  There's currently a single dispatcher and
all dispatch calls are recorded on that.  Context dirty bits are set up
in such a way that graphics and compute workloads are independently
handled, so that issuing a dispatch call wouldn't cause a framebuffer's
render pass to rebind resources.

Bug: angleproject:3562
Change-Id: Ib96db48297074d99b04324e44b067cfbfd43e333
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1688504
Commit-Queue: Shahbaz Youssefi <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
2019-07-16 20:00:09 +00:00
Clemen Deng 6e7dd1ef42 Generate openGL32.dll in a separate output folder
This is to avoid loading it locally and so that the pdb works

Bug: angleproject:3641
Change-Id: I2ce93ace47d1e6a1013d38964e5919084ad4ff7f
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1704634
Reviewed-by: Jamie Madill <[email protected]>
Reviewed-by: Geoff Lang <[email protected]>
Commit-Queue: Clemen Deng <[email protected]>
2019-07-16 19:18:19 +00:00
Geoff Lang ec9ff8ce39 Fix checks for GL_ETC1_RGB8_OES, disable it on D3D11.
The GL backend was checking the wrong extension for GL_ETC1_RGB8_OES.

WebGL doesn't want to expose compressed formats that are emulated,
disable this format in D3D11 where it is always emulated.

BUG=98314

Change-Id: I1ba8418ad1578c070891828b87e49cf894dabc29
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1700574
Reviewed-by: Jonah Ryan-Davis <[email protected]>
Reviewed-by: Shahbaz Youssefi <[email protected]>
Commit-Queue: Geoff Lang <[email protected]>
2019-07-16 15:13:44 +00:00
Shahbaz Youssefi c4c48b65bc Vulkan: Prefix context pipeline and dirty bits with Graphics
In preparation for compute pipeline and dirty bits.

Bug: angleproject:3562
Change-Id: I611b97fee1e500fdad32355d096254fd787c4ddd
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1703525
Reviewed-by: Jamie Madill <[email protected]>
Commit-Queue: Shahbaz Youssefi <[email protected]>
2019-07-16 15:03:54 +00:00
Shahbaz Youssefi 998a37c99f Vulkan: merge bindGraphics/ComputeDescriptorSets
The two called bindDescriptorSets with a fixed GRAPHICS or COMPUTE bind
point enum value.  The differentation however would result in
unnecessary code duplication with upcoming compute support.

Bug: angleproject:3562
Change-Id: Ica4400c573a90fda168c64ad777d87aa83256e48
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1703524
Reviewed-by: Jamie Madill <[email protected]>
Commit-Queue: Shahbaz Youssefi <[email protected]>
2019-07-16 14:36:14 +00:00
Shahbaz Youssefi 6f0780f8e4 Vulkan: Rename CommandBufferOwner to RenderPassOwner
It's really only used to track the render pass command buffer.  The
change is made in preparation for compute, where the dispatcher command
buffer can change without affecting the render pass.

Bug: angleproject:3562
Change-Id: Ia8246de731d5c6a272fa17d6f8952dc981eca36e
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1703523
Reviewed-by: Jamie Madill <[email protected]>
Commit-Queue: Shahbaz Youssefi <[email protected]>
2019-07-16 14:34:25 +00:00
Yuly Novikov 754d697fb3 Ignore FreeAllocationOnTimestamp GL debug message
Erroneously produced by Android Q Qualcomm driver for worker contexts.

Bug: angleproject:3491
Change-Id: I8f2a5f05ad8a00c97d0dfa6e3b7a939d05656420
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1700255
Commit-Queue: Yuly Novikov <[email protected]>
Reviewed-by: Geoff Lang <[email protected]>
2019-07-16 03:37:06 +00:00
Ian Elliott 5de073c051 Vulkan: Enable more format-related tests to run
After seeing some CLs in this space, that didn't change the expectations
file, I checked to see whether more tests can pass, and they can.

Bug: angleproject:3190
Change-Id: Ifa1d1c7b91c403c8c67ddcb5d8a589cbaf686cf4
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1702493
Reviewed-by: Cody Northrop <[email protected]>
Reviewed-by: Courtney Goeltzenleuchter <[email protected]>
Commit-Queue: Ian Elliott <[email protected]>
2019-07-15 22:51:25 +00:00
James Dong a9ec874922 Vulkan: override format for mismatched attribs
Prevents Vulkan validation error by replacing the input format for any
mismatched vertex attributes with a format compatible to what the shader
expects.

Bug: angleproject:3436
Change-Id: Ia52f29c084d82bbc4e9149102cd4b5fc25ccb9b3
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1698567
Commit-Queue: Courtney Goeltzenleuchter <[email protected]>
Reviewed-by: Courtney Goeltzenleuchter <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
2019-07-15 22:12:35 +00:00
Tim Van Patten 8b2bb18f9b Vulkan: Update capabilities with the necessary limits
Some of the necessary limits were not being defined correctly in the
native capabilities, causing some dEQP test failures.

Bug: angleproject:3676
Test: Applicable dEQP-GLES3 limits testing
Change-Id: If977da1edd7d55627c65cd81a6dcd42c63a3a6a6
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1695934
Commit-Queue: Tim Van Patten <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
2019-07-15 19:35:55 +00:00
Clemen Deng 663b048114 Load correct opengl32.dll
Tests are still loading ANGLE's opengl32.dll instead of system's
This is because external drivers are trying to load opengl32.dll
Workaround: renamed to libGL.dll, need to change back when copying
dll over for loading

Bug: angleproject:3641
Change-Id: I051adc1fbb488a704c99718ad4a2f74bb7756cbd
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1697290
Commit-Queue: Clemen Deng <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
Reviewed-by: Geoff Lang <[email protected]>
2019-07-15 19:30:35 +00:00
Geoff Lang d9c1710779 Add support for GL_OES_texture_compression_astc
This extension adds 3D compressed texture formats, something ANGLE has
not seen before.  This requires tracking a compressed block depth for
validation and image size computations.

Update the ldr and hdr extension checks to be in line with the spec.
HDR requires LDR and is not detectable by texture formats alone.

Expose all of the ASTC extensions on the GL backend.

BUG=angleproject:3675

Change-Id: Id04c7c8ef8541e9556579536cdba899b64303caf
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1695923
Commit-Queue: Geoff Lang <[email protected]>
Reviewed-by: Shahbaz Youssefi <[email protected]>
2019-07-15 19:27:55 +00:00
Tim Van Patten f20605944e Update OpenGL ES 3.1 Shader Interface Matching
According to the OpenGL ES 3.1 spec Chapter 7.4.1 "Shader Interface
Matching" Page 91, an output variable is considered to match an
input variable in the subsequent shader if:

- the two variables match in name, type, and qualification; or
- the two variables are declared with the same location qualifier
  and match in type and qualification.

We currently only check the variable names, so this bug will add
checking the locations as well.

Bug: angleproject:3699
Test: dEQP, end2end
Change-Id: I45e91654450fd033299ff0a81bc26a23b3e25a04
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1700160
Reviewed-by: Shahbaz Youssefi <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
Commit-Queue: Tim Van Patten <[email protected]>
2019-07-15 18:04:15 +00:00
Ian Elliott 9d943af7ce Vulkan: Support more texture format-type combination tests.
This is a partial fix for 3455, which contains a number of different
root-causes.  This CL addresses two sets of them.

1) Partial fix for KHR-GLES3.copy_tex_image_conversions.forbidden.*

   Recent changes, including adding support for GL_RGBA8-to-GL_RGB5_A1,
   plus adding support for GL_RGB10_A2-to-GL_RGB5_A1 eliminate the
   crashes for 56 of the 70 tests.

2) Most of the KHR-GLES3.packed_pixels.rectangle.r* tests now pass.

   Recent changes, including potentially the above get another 34
   tests passing, and another 15 no longer crashing.

3) Vulkan: Fix errant glCopyTextImage validation code.

   I got all but 2 of the KHR-GLES3.packed_pixels.rectangle.r* tests passing.

   I fixed bugs in the validation code (with at least two more bugs
   that I haven't fixed yet).  More details below.

3a) Fix the IsValidES3CopyTexImageCombination() function for SNORM.

    The code wasn't rejecting SNORM cases, which are missing from the table of
    effective internal formats, meaning that support is undefined.  The
    GLES 3.2 spec says that a GL_INVALID_OPERATION error should be generated
    "if the effective internal format of the source buffer does not match the
    effective internal format of the new image."

3b) There's a caveat that was overlooked that means that internal
    formats like GL_RGB10_A2 are not supported.

Bug: angleproject:3455
Bug: angleproject:3693
Bug: angleproject:3697
Change-Id: Ie4399a2d7cd969ec29acc926f32e6608775609c6
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1693325
Reviewed-by: Geoff Lang <[email protected]>
Commit-Queue: Ian Elliott <[email protected]>
2019-07-15 16:48:24 +00:00
Cody Northrop c3085ead70 Vulkan: Set texel offset limits
This was blocking compilation for any new texture builtin that used offsets.

Bug: angleproject:3622
Change-Id: I30b221741796b53f8e47e3aeeebfbde3f1976bd6
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1699062
Reviewed-by: Jamie Madill <[email protected]>
Reviewed-by: Shahbaz Youssefi <[email protected]>
Commit-Queue: Cody Northrop <[email protected]>
2019-07-12 23:01:13 +00:00
Jonah Ryan-Davis aded991bff Fix hang on Linux Intel when allocating large textures.
Intel Linux graphics drivers before kernel 5.0 can hang when allocating
large textures. Limit the texture size as a workaround.

Bug: chromium:927470
Change-Id: Ic8c14235396492efafd663b1cd012fd752427992
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1700146
Commit-Queue: Jonah Ryan-Davis <[email protected]>
Reviewed-by: Shahbaz Youssefi <[email protected]>
Reviewed-by: Geoff Lang <[email protected]>
2019-07-12 22:39:03 +00:00
Geoff Lang 6c90ebb078 glTexStorage3D: Disallow compressed formats on GL_TEXTURE_3D targets.
GLES 3.0.4 p147:
 "If internalformat is an ETC2/EAC format, CompressedTexImage3D will generate an
  INVALID_OPERATION error if target is not TEXTURE_2D_ARRAY."

This matches the validation of glTexImage3D.

TEST=conformance2/textures/misc/tex-storage-compressed-formats.html

BUG=chromium:983142

Change-Id: Ifc4ea9503182c43de7e58c4b45b59bb03ae2f901
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1698648
Reviewed-by: Jonah Ryan-Davis <[email protected]>
Commit-Queue: Geoff Lang <[email protected]>
2019-07-12 19:46:08 +00:00