Commit Graph
141 Commits
Author SHA1 Message Date
Jamie Madill ee21a18734 Store angle::Format in gl::VertexAttribute.
Instead of storing type/size/normalized/pureInteger we instead store a
pointer to the angle::Format. This makes some code logic simpler and
will let us more easily check if a vertex attribute format changes in
calls to VertexAttribPointer or VertexAttribFormat.

This CL adds extra information to angle::Format to represent the vertex
format info needed. It also caches the channel count so that it can be
queried faster.

Also renames "Int" -> "Sint" in UtilsVk for consistency.

Bug: angleproject:3256
Change-Id: I5ef9b983dad8a58c341113c802500b89ce081566
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1684293
Commit-Queue: Jamie Madill <[email protected]>
Reviewed-by: Jonah Ryan-Davis <[email protected]>
2019-07-04 14:11:46 +00:00
Cody Northrop 4fbbdb15d6 texture3D: Compiler changes for sampler3D
Bug: angleproject:3188
Change-Id: Iac1408f8b91c6a6610a63cef236205b7dcdbd2c4
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1682781
Reviewed-by: Lingfeng Yang <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
Reviewed-by: Geoff Lang <[email protected]>
Commit-Queue: Cody Northrop <[email protected]>
2019-07-03 17:01:31 +00:00
Clemen Deng 7558e836ef Windows Desktop GL Implementation
Bug: angleproject:3620
Change-Id: I4ef4ab3ee145e5ce9b1ebf0c2d61d0777db72c43
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1678405
Reviewed-by: Jamie Madill <[email protected]>
Reviewed-by: Geoff Lang <[email protected]>
Commit-Queue: Jamie Madill <[email protected]>
2019-07-03 12:49:04 +00:00
Cody Northrop 5faff91af4 texture3D: Codegen changes towards OES_texture_3D
Also accompanying hand edits to validationES2.cpp and
Context.cpp to allow linking.

Bug: angleproject:3188
Change-Id: I89832265092fabc71bade464f0171d65038d8b0e
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1648454
Commit-Queue: Jamie Madill <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
2019-07-01 14:15:07 +00:00
James Dong 8bb6baa0fc Vulkan: improve handling of RGB texture formats
Adds fallback for some RGB textures using the corresponding RGBA formats
and modifies fallback calculation to not require filtering/rendering for
formats which are not required to support filtering by GL spec.

Bug: angleproject:3190
Bug: angleproject:3196
Change-Id: I7beaf9881d63e3c6bd9339faede0333919a4174c
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1665894
Commit-Queue: James Dong <[email protected]>
Reviewed-by: Shahbaz Youssefi <[email protected]>
2019-06-28 19:50:14 +00:00
Shahbaz Youssefi 0bfa55044f Vulkan: Emulate Transform Feedback with vertex shader output
In ES 3.0 and 3.1, only non-indexed GL_POINTS, GL_LINES and GL_TRIANGLES
is supported for transform feedback.  Without tessellation and geometry
shaders, we can calculate the exact location where each vertex transform
output should be written on the CPU, and have each vertex shader
invocation write its data separately to the appropriate location in the
buffer.

This depends on the vertexPipelineStoresAndAtomics Vulkan feature.

Bug: angleproject:3205
Change-Id: I68ccbb80aece597cf20c557a0aee842360fea593
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1645678
Commit-Queue: Shahbaz Youssefi <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
2019-06-27 20:36:53 +00:00
Jamie Madill 485cdd8bd3 Add std::ostream output for packed enums.
This can be used to convert them to strings for debugging. It can also
be helpful for frame capture and replay. Currently the enums are output
as GLenum values.

Bug: angleproject:3611
Change-Id: Ifcd04449e0ef61e125e0db65aa0dcc2bf48b38ca
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1678399
Reviewed-by: Geoff Lang <[email protected]>
Reviewed-by: Jonah Ryan-Davis <[email protected]>
Commit-Queue: Jamie Madill <[email protected]>
2019-06-27 15:18:37 +00:00
Geoff Lang 067687f467 Removal global locks from GL entry points. Always lock in EGL.
The ANGLE Vulkan backend is now thread safe for non-share group contexts. This
means that a global GL lock only adds overhead for most use cases.

Remove the angle_force_thread_safety gn argument.

BUG=angleproject:2464

Change-Id: Ic6ba89e18b46e5dd72aa83d0f409097441fcca3a
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1635749
Commit-Queue: Geoff Lang <[email protected]>
Reviewed-by: Tobin Ehlis <[email protected]>
2019-06-21 15:26:18 +00:00
Shahbaz Youssefi c5c937e1e8 Vulkan: Support R11G11B10_FLOAT and R9G9B9E5_SHAREDEXP
The keys in vk_format_map.json were incorrect.  The format table
generation script is enhanced to give an error in such a case.  This
revealed a number of entries with no corresponding angle format, which
are also removed.

Bug: angleproject:2898
Bug: angleproject:3190
Change-Id: I32caf2d2a8abb6f76b25436725670a8e84d576fb
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1666700
Commit-Queue: Shahbaz Youssefi <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
2019-06-20 01:35:35 +00:00
Michael Spang 6c824a1bc1 Vulkan: Add missing layout for VK_IMAGE_LAYOUT_UNDEFINED
This this was missed because it doesn't add its own enum value and
instead reuses GL_NONE.

Bug: chromium:976374
Test: chrome --enable-features=UseSkiaRenderer,UiGpuRasterization \
  --enable-gpu-rasterization \
  --enable-oop-rasterization \
  --use-vulkan=native \
  --use-gl=angle \
  --use-angle=vulkan

Change-Id: I73437211fef3253801e899cb6e50a8e18865cc65
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1665329
Commit-Queue: Michael Spang <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
2019-06-19 01:12:24 +00:00
Geoff Lang 857880e5b8 GL: Add extensions to enable hardware video decode on Android.
The Android SurfaceTexture API has to be initialized with a texture id
which Chrome has to query from an ANGLE external texture. It also
rebinds and sets the texture dimensions on calls to
SurfaceTexture.updateTexImage so ANGLE must be notified about these
changes so that state tracking and validation continue to function.

BUG=967410

Change-Id: I92e9077f75835b088da3a8caffb3ff40e9ad0361
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1630293
Commit-Queue: Geoff Lang <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
2019-06-18 21:10:07 +00:00
Clemen Deng c211c2f5b5 Make proc table autogen use gl.xml data
Instead having the proc table be generated from proc_table_data.json
which needed to be manually updated with changes, the proc table is now
generated from data in gl.xml and egl.xml

Bug: angleproject:3533
Change-Id: I773ea7615cc4ec1c9901def629b089d8d17328eb
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1660645
Commit-Queue: Jamie Madill <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
2019-06-17 23:04:37 +00:00
Clemen Deng 95ac7b7cee Autogen gles2+ declarations
Added autogeneration of method declarations for GLES2+ and extensions

Bug: angleproject:3526
Change-Id: I9c7263452146098512d9584deae8ea3f15f62c46
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1660949
Reviewed-by: Jamie Madill <[email protected]>
Reviewed-by: Jonah Ryan-Davis <[email protected]>
Commit-Queue: Jamie Madill <[email protected]>
2019-06-14 22:02:38 +00:00
Shahbaz Youssefi bf82648154 Update glslang_validator binary for Windows.
This binary was updated using update_glslang_binary.py.
Please see instructions in tools/glslang/README.md.

Bug: angleproject:3432
Change-Id: Iefed7d2ab1a0a7f7118b83037329fe608c85ba1e
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1658848
Commit-Queue: Shahbaz Youssefi <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
2019-06-14 16:13:16 +00:00
Shahbaz Youssefi a7271d35e5 Update glslang_validator binary for Linux.
This binary was updated using update_glslang_binary.py.
Please see instructions in tools/glslang/README.md.

Bug: angleproject:3432
Change-Id: Idc02086cf0e1985efd7bf194adf311c85b21e33e
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1657712
Commit-Queue: Shahbaz Youssefi <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
2019-06-14 16:11:06 +00:00
James Dong 2806a898ac Vulkan: implement primitive restart
Implements ES 3.0 feature GL_PRIMITIVE_RESTART_FIXED_INDEX,
which allows the application to use a fixed "restart" index
to restart the primitive during a single draw call.

This change does't handle GL_LINE_LOOP primitives,
which requires a bit of special handling.

Bug: angleproject:3215
Change-Id: I2388852683fd17328a6a76c48d70a24d67ce8b67
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1650301
Reviewed-by: Courtney Goeltzenleuchter <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
Commit-Queue: Courtney Goeltzenleuchter <[email protected]>
2019-06-13 22:19:28 +00:00
James Dong 0d3cf7085c Vulkan: fix array size for internal shaders
Previously array sizes were calculated as the OR of all flag and enum
masks, equal to 2^(number of bits used for flags and enums) - 1, which
could be less than the actual needed array size.

This fix moves array size calculation to the autogen script and changes
the size to one more than the maximum potential value.

Bug: angleproject:3524
Change-Id: Ia4eb2a83fc7deea84e18958efcda8b57632035f9
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1655954
Commit-Queue: Jamie Madill <[email protected]>
Reviewed-by: Courtney Goeltzenleuchter <[email protected]>
Reviewed-by: Shahbaz Youssefi <[email protected]>
2019-06-13 18:52:54 +00:00
Shahbaz Youssefi b407e1a0b5 Vulkan: implement ES3 blit
Augment the resolve shaders to be able to stretch and blit too.  The
UtilsVk resolve function is accordingly expanded to include blit.

Bug: angleproject:3200
Change-Id: I30b172a5e388089735ab494f55cbfdc2781a8bf9
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1635753
Commit-Queue: Shahbaz Youssefi <[email protected]>
Reviewed-by: Geoff Lang <[email protected]>
2019-06-07 14:25:25 +00:00
Jonah Ryan-Davis e431aaa15a Rename EGL_ANGLE_workaround_control to EGL_ANGLE_feature_control.
For consistency, call these ANGLE "features", a subset of which may be
workarounds. Also, whether the feature is enabled/disabled should be
publically visible as "status".

Bug: angleproject:1621
Change-Id: I0de90a932fbfe1fc9b59138153d616d29fa7268b
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1643410
Reviewed-by: Jamie Madill <[email protected]>
Reviewed-by: Geoff Lang <[email protected]>
Commit-Queue: Jonah Ryan-Davis <[email protected]>
2019-06-04 18:51:44 +00:00
Shahbaz Youssefi de70a7135b Vulkan: Rename Resolve* shaders to BlitResolve
In preparation for adding blit functionality.

Bug: angleproject:3200
Change-Id: I77b6b6cbe90b26ee23c25edebaa2b130f3c2987a
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1641626
Commit-Queue: Shahbaz Youssefi <[email protected]>
Reviewed-by: Tim Van Patten <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
2019-06-04 13:51:58 +00:00
Jonah Ryan-Davis 2dd40a44d1 Add eglQueryDisplayAttribANGLE to query workarounds count.
Add eglQueryDisplayAttribANGLE based on eglQueryDisplayAttribEXT to add
behavior for quering the count of all workarounds available. Used
externally to build a list of workarounds.

Bug: angleproject:1621

Change-Id: I793acedc76111fd018600169d58bf5d8cf4a63ee
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1637817
Commit-Queue: Jonah Ryan-Davis <[email protected]>
Reviewed-by: Geoff Lang <[email protected]>
2019-06-03 22:36:28 +00:00
Jamie Madill 20d380fa5b Print stack backtrace on critical failure.
We reuse code from Skia to walk the stack on Posix platforms. See:
https://github.com/google/skia/blob/master/tools/CrashHandler.cpp

On Windows we use a BSD-licensed tool called StackWalker. See:
https://github.com/JochenKalmbach/StackWalker

This allows us to get high quality stack traces on Win/Linux/Mac.

Bug: angleproject:3162
Change-Id: I9c50ede2c6a41ed0ee85a0507372df42a487bcef
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1632950
Commit-Queue: Jamie Madill <[email protected]>
Reviewed-by: Yuly Novikov <[email protected]>
2019-06-03 20:24:03 +00:00
Jamie Madill 5993d899e3 Vulkan: Use storage buffers for index conversion shader.
This allows us to use the shader regardless of driver support for
texel buffer views. It also allows us to convert indices on the GPU
unconditionally.

We add a new internal compute shader that converts pairs of indices
into a packed single uint value that stores two 16-bit values. In the
future we could add support for converting primitive restart indices.

Should speed up benchmarks on systems which didn't have R8_UINT support
for compute shader buffers.

Bug: angleproject:3490
Change-Id: I56ca0cabb094e97f36ab4edc779e6c8ad2d2601e
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1639058
Commit-Queue: Jamie Madill <[email protected]>
Reviewed-by: Tim Van Patten <[email protected]>
2019-06-03 18:08:28 +00:00
Shahbaz Youssefi 6d9b8908b0 Vulkan: Merge Color and Depth/Stencil resolve shaders
There is a good deal of overlap in the way these shaders calculate
offsets, flip etc.  This change merges the two shaders together, as well
as the UtilsVk functions that invoke them.

This is in preparation for adding blit functionality to the same
shader.

Bug: angleproject:3200
Change-Id: Id7c2cf12e05db1802ae497766fb361fe4bef6479
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1635750
Commit-Queue: Shahbaz Youssefi <[email protected]>
Reviewed-by: Yuly Novikov <[email protected]>
2019-05-30 14:53:32 +00:00
Shahbaz Youssefi 172e5d373f Vulkan: Implement universal stencil resolve
This is done by resolving stencil into a temporary buffer and copying
that into the stencil aspect of the resolved image.

Bug: angleproject:3200
Change-Id: I29111b44db2cb093acc4544034fbe61178f055a1
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1635709
Commit-Queue: Shahbaz Youssefi <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
Reviewed-by: Tim Van Patten <[email protected]>
2019-05-29 21:44:42 +00:00
Jonah Ryan-Davis f52f2637ae Add EGL_ANGLE_workaround_control extension.
This extension is used to query strings from an array based on index,
which will be used to query all the information about workarounds in
ANGLE.

Bug: angleproject:1621

Change-Id: I27157f278f7f17c92c8b4fd7753e2a5ecd0528f6
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1627723
Commit-Queue: Jonah Ryan-Davis <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
2019-05-29 19:39:42 +00:00
Shahbaz Youssefi f2a1c384f7 Vulkan: Implement multisampled framebuffers
Simultaneously implements ANGLE_framebuffer_multisample and ES3
multisampled framebuffers.

Additionally, implements ES3 framebuffer blitting where multisampled
framebuffers are involved.

Bug: angleproject:3203
Bug: angleproject:3204
Bug: angleproject:3200
Change-Id: I5694a30f71168e807688a9568e3742b81d907918
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1622667
Commit-Queue: Shahbaz Youssefi <[email protected]>
Reviewed-by: Yuly Novikov <[email protected]>
2019-05-29 15:28:49 +00:00
Michael Spang 215b2191fb Add packed enum for GL_EXT_semaphore image layouts
Add a new packed enum gl::ImageLayout which consists of the following
enum values:

  GL_LAYOUT_GENERAL_EXT
  GL_LAYOUT_COLOR_ATTACHMENT_EXT
  GL_LAYOUT_DEPTH_STENCIL_ATTACHMENT_EXT
  GL_LAYOUT_DEPTH_STENCIL_READ_ONLY_EXT
  GL_LAYOUT_SHADER_READ_ONLY_EXT
  GL_LAYOUT_TRANSFER_SRC_EXT
  GL_LAYOUT_TRANSFER_DST_EXT
  GL_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_EXT
  GL_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_EXT

Bug: angleproject:3289

Change-Id: Idc1615717d54fb1193e2f27c84a24993f6007d7b
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1623810
Reviewed-by: Geoff Lang <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
Commit-Queue: Michael Spang <[email protected]>
2019-05-22 18:07:48 +00:00
Shahbaz Youssefi affc252c8b Vulkan: Update glslang_validator binary for Windows
The new binary has the ability to optimize SPIR-V code.

Bug: angleproject:3432
Change-Id: I57ac99d2b1c5ee0678c3b6ab3db1e215a12bd08a
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1620915
Reviewed-by: Shahbaz Youssefi <[email protected]>
Commit-Queue: Shahbaz Youssefi <[email protected]>
2019-05-21 15:32:09 +00:00
Shahbaz Youssefi b86e73daf7 Vulkan: Update glslang_validator binary for Linux
The new binary has the ability to optimize SPIR-V code.

Bug: angleproject:3432
Change-Id: I5953be6f207f153baaf2efe17380448aff374d60
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1620913
Reviewed-by: Jamie Madill <[email protected]>
Commit-Queue: Shahbaz Youssefi <[email protected]>
2019-05-21 14:59:38 +00:00
Courtney Goeltzenleuchter eaf2d928e6 Add support for OES_depth_texture
Note: Includes workaround for http://anglebug.com/3452 - some Android
devices do not indicate filtering support on VK_FORMAT_D16_UNORM.

Bug: angleproject:3103
Test: angle_end2end_tests --gtest_filter=DepthStencilFormatsTest.DepthTexture/*
angle_end2end_tests --gtest_filter=DepthStencilFormatsTest.PackedDepthStencil/*
angle_end2end_tests --gtest_filter=DepthStencilFormatsTest.DepthTextureRender/ES2_VULKAN

Change-Id: Ic325fb94ab0e619a17c2e149e0e0865fa4142f3a
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1575426
Commit-Queue: Courtney Goeltzenleuchter <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
Reviewed-by: Geoff Lang <[email protected]>
2019-05-15 16:47:37 +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 <[email protected]>
Reviewed-by: Geoff Lang <[email protected]>
2019-05-08 23:14:55 +00:00
Geoff Lang d7d42395ac Format all of ANGLE's python code.
BUG=angleproject:3421

Change-Id: I1d7282ac513c046de5d8ed87f7789290780d30a6
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1595440
Reviewed-by: Jamie Madill <[email protected]>
Commit-Queue: Geoff Lang <[email protected]>
2019-05-06 18:56:09 +00:00
Geoff Lang fb6fbdbc58 Return that polling queries have completed after context loss.
KHR_robustness says that certain queries that poll such as GetSynciv with
SYNC_STATUS should still generate errors after context loss but also return
that the result is available.

BUG=angleproject:3379

Change-Id: Ibf61f8481bc7c3d1b4fa8979dc404d0ca3952fcd
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1566142
Commit-Queue: Geoff Lang <[email protected]>
Reviewed-by: Kenneth Russell <[email protected]>
Reviewed-by: Geoff Lang <[email protected]>
2019-04-25 16:13:34 +00:00
Jamie Madill 0631e19bcb Vulkan: Rename Vulkan "Texture" format to "Image"
Also adds some comments to vk_format_utils.h.

Bug: angleproject:3372
Change-Id: I529b9b189e4cdfd400c3c981a47139727d9954ab
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1565062
Commit-Queue: Jamie Madill <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
2019-04-18 20:45:31 +00:00
Geoff Lang 057b76e149 Implement GL_CHROMIUM_lose_context.
This is useful for testing context lost behaviour.

BUG=angleproject:3379

Change-Id: If0e1538553b1761e313fc36ccde5138cd495200f
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1566141
Commit-Queue: Geoff Lang <[email protected]>
Reviewed-by: Shahbaz Youssefi <[email protected]>
Reviewed-by: Jonah Ryan-Davis <[email protected]>
2019-04-17 15:48:14 +00:00
Michael Spang e0da9cefcd Pack handle type enum for glImportMemoryFd & glImportSemaphoreFd
Bug: angleproject:3289

Change-Id: Ic20b1d55641494b46622e1e28d93e2ca30655ea6
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1566143
Commit-Queue: Michael Spang <[email protected]>
Reviewed-by: Geoff Lang <[email protected]>
2019-04-16 19:57:12 +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 <[email protected]>
Reviewed-by: Geoff Lang <[email protected]>
2019-04-16 17:37:10 +00:00
Jamie Madill 2664da8beb Correct texImage uses of texture type -> target.
Similarly to how the subImage calls were corrected. glTexImage and the
family of related functions apply to a single texture target. This
means we need a different TexImage call for each cube face. This is
distinct from TexStorage calls which take a Cube map directly.

Note this is mostly a refactoring change. But it does increase code
consistency and should allow for more efficient code reuse.

Bug: angleproject:3356
Change-Id: I252f8983cdda3a8f0223c44cbbe8d8e2dd319a88
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1558673
Commit-Queue: Jamie Madill <[email protected]>
Reviewed-by: Tim Van Patten <[email protected]>
Reviewed-by: Jonah Ryan-Davis <[email protected]>
2019-04-15 19:09:02 +00:00
Jamie Madill cfc73cc1af Correct subImage uses of texture type -> target.
Texture "types" are the same as texture "targets" except for cube maps.
Cube map targets specify a single face. Cube map types specify a whole
cube map. The subImage functions should take a target instead of a
type. We were using both in different places. This CL corrects all uses
in subImage calls to "target". It also adds a helper for getting a
target texture from a target. And clarifies the naming of the texture
query methods.

Bug: angleproject:3356
Change-Id: I06eb5c5666eec9b8934becf2ba57a066d5cdabde
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1558672
Commit-Queue: Jamie Madill <[email protected]>
Reviewed-by: Jonah Ryan-Davis <[email protected]>
Reviewed-by: Tim Van Patten <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
2019-04-11 22:11:50 +00:00
Shahbaz Youssefi 2249d4a727 Vulkan: remove clear depth ability from clearWithDraw
This partially reverts the following change:

60ec8f576 Vulkan: break dependency to the depthClamp feature

The feature is no longer necessary, and simplifies the usage of
utility shaders.

Bug: angleproject:2361
Change-Id: I1e87ac8d2517c5a3b50e3d0cddd55c852e0e3e7d
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1555313
Commit-Queue: Shahbaz Youssefi <[email protected]>
Reviewed-by: Tobin Ehlis <[email protected]>
2019-04-11 19:56:12 +00:00
Shahbaz Youssefi fc15ae5571 Vulkan: parallelize internal shader compilation
As glslang is rolling frequently now, internal shaders frequently
require recompilation.  This change parallelizes shader compilation to
speed up this process.

Bug: angleproject:3333
Change-Id: Icace083559bff73dfb9b5fe7cc2c59ce8137a2dc
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1558680
Commit-Queue: Shahbaz Youssefi <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
2019-04-09 15:28:04 +00:00
Shahbaz Youssefi 82418c8216 Add support for updating glslang_validator binary from Linux.
Updates the glslang_validator binary for Linux in the same commit.

Bug: angleproject:3333
Change-Id: Ide42781ec4951e7c09307a0a3b96c36c6ea29d23
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1553828
Commit-Queue: Shahbaz Youssefi <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
2019-04-09 02:01:10 +00:00
Jamie Madill d5ff4fadd8 Add standalone glslang_validator as a download hook.
This change allows us to download a copy of the standalone glslang
validator during gclient runhooks. This decouples run_code_generation
from the version of glslang stored in source tree. This prevents the
error where a developer would run into a code generation conflict due
to a change in version of glslang.

Currently only the Windows version is stored in the tree. A follow-up
CL will add Linux. The validator will only initially support Windows
or Linux.

Documentation for the script is located in tools/glslang/README.md.
This CL also updates the Vulkan shader generation script to use the
new binary for Windows.

Bug: angleproject:3333
Change-Id: Ia6146a283a2bcfdf84c42411d6b5d8bae136bf1b
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1553823
Commit-Queue: Jamie Madill <[email protected]>
Reviewed-by: Shahbaz Youssefi <[email protected]>
2019-04-08 15:04:15 +00:00
Shahbaz Youssefi 5d50678ea9 Roll glslang forward 1240db678cae..e06c7e9a515b
Manual roll to unblock the autoroller stuck on presubmit failure.

Bug: None
Change-Id: I97094add66a42154309addea43fe6aa5e1411c43
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1556694
Reviewed-by: Shahbaz Youssefi <[email protected]>
Commit-Queue: Shahbaz Youssefi <[email protected]>
2019-04-06 19:51:38 +00:00
Shahbaz Youssefi c756535369 Vulkan: break dependency to the depthClamp feature
Image clear's masked clear path using a draw call was using this feature
to clear the depth buffer, but this feature is not available on ARM and
some Qualcomm devices.

This change adds a push constant to the vertex shader used in this call
to export the depth clear value, removing the need to rely on depth
clamping.

Bug: angleproject:3241
Change-Id: I565cd5f731c441820e0702e51dfdf02d0bc7de06
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1551522
Commit-Queue: Shahbaz Youssefi <[email protected]>
Reviewed-by: Tobin Ehlis <[email protected]>
2019-04-06 04:16:03 +00:00
Tim Van Patten 5f388c2452 Vulkan: dEQP-EGL.functional.image.modify.*
Determine the destination internalFormat correctly.

dEQP-EGL.functional.image.modify.renderbuffer_rgb565_tex_subimage_rgb8
dEQP-EGL.functional.image.modify.renderbuffer_rgba4_tex_subimage_rgba8
dEQP-EGL.functional.image.modify.tex_rgb565_tex_subimage_rgb8
dEQP-EGL.functional.image.modify.tex_rgba4_tex_subimage_rgba8
dEQP-EGL.functional.image.modify.tex_rgba8_tex_subimage_rgba5_a1
dEQP-EGL.functional.image.modify.tex_rgba8_tex_subimage_rgba4
dEQP-EGL.functional.image.modify.tex_rgba5_a1_tex_subimage_rgba8
dEQP-EGL.functional.image.modify.tex_rgba5_a1_tex_subimage_rgba4
dEQP-EGL.functional.image.modify.tex_rgba4_tex_subimage_rgba8
dEQP-EGL.functional.image.modify.tex_rgba4_tex_subimage_rgba5_a1
dEQP-EGL.functional.image.modify.renderbuffer_rgba4_tex_subimage_rgba8
dEQP-EGL.functional.image.modify.renderbuffer_rgba4_tex_subimage_rgba5_a1
dEQP-EGL.functional.image.modify.renderbuffer_rgb5_a1_tex_subimage_rgba8
dEQP-EGL.functional.image.modify.renderbuffer_rgb5_a1_tex_subimage_rgba4

Bug: angleproject:3170
Change-Id: Ic9870390b2d4a0dcbe561efd3fb1597faadb7d79
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1524404
Commit-Queue: Tim Van Patten <[email protected]>
Reviewed-by: Geoff Lang <[email protected]>
2019-04-05 20:54:26 +00:00
Michael Spang 9de3ddb511 Generate entrypoints for GL_EXT_memory_object_fd & GL_EXT_semaphore_fd
This adds entrypoints for the Linux variants of GL_EXT_memory_object &
GL_EXT_semaphore.

Bug: angleproject:3289

Change-Id: I40de40f27aa82cd9479d5913dac0a7493919bb8f
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1552026
Commit-Queue: Michael Spang <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
2019-04-05 04:44:47 +00:00
Michael Spang 7a8c3e5ebe Generate entrypoints for GL_EXT_memory_object & GL_EXT_semaphore
This adds entrypoints for two new extensions that will be useful for
importing external Vulkan objects into ANGLE.

Bug: angleproject:3289

Change-Id: I206dc76eda5c6c8d836db7c6413c5544326aa722
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1552024
Commit-Queue: Michael Spang <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
2019-04-04 23:42:53 +00:00
Shahbaz Youssefi 43997017b0 Vulkan: fix non-float clear with draw
Instead of using one draw call that clears all attachments, multiple
draw calls are issued that clear a single attachment each.  This allows
us to have a manageable number of variations for the ImageClear.frag
shader, now that non-float format support is introduced.

Bug: angleproject:3187
Change-Id: Ic0c1067a396250bd80f31d00cad5a272acff8be8
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1545523
Commit-Queue: Shahbaz Youssefi <[email protected]>
Reviewed-by: Jamie Madill <[email protected]>
2019-04-04 02:22:41 +00:00