src/common/utilities.cpp


Log

Author Commit Date CI Message
Shahbaz Youssefi b16d105f 2024-10-03T10:25:32 Remove Desktop GL front-end support For Desktop GL applications, please use Zink! Bug: angleproject:370937467 Change-Id: Ie734634bb62a2e98c80e1b32d8b3d34624da3c04 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5905428 Reviewed-by: Geoff Lang <geofflang@chromium.org>
Steven Noonan 7a38d614 2023-06-23T01:56:43 remove ScheduleYield, replace with std::this_thread::yield Instead of hand-rolling this function, just use std::this_thread::yield, which has the advantage of being cross-platform and using an underlying implementation that's actually more correct on Windows[1][2]. [1] https://github.com/microsoft/STL/blob/40640c6df9754ea031f8df7c720b89714d19df97/stl/src/cthread.cpp#L84-L86 [2] https://joeduffyblog.com/2006/08/22/priorityinduced-starvation-why-sleep1-is-better-than-sleep0-and-the-windows-balance-set-manager/ Bug: angleproject:8232 Change-Id: I9053fa362f328dc45b7c13f5f70818adf89a290f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4639490 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Geoff Lang 18657894 2023-01-25T13:05:56 Add features to dump and replace shader source. dump_shader_source writes shader source strings to files named with the hash of the source and shader type. enable_shader_substitution allows subsituting the shader source with the strings contained in a file. The same file naming scheme as dump_shader_source is used so shaders can be dumped in one run, modified and subsititued in the next run. Use the ANGLE_SHADER_DUMP_PATH and debug.angle.shader_dump_path environment variables to control where files are written. If they are unspecified, write to the temp directory. Based upon Cody's CLs: https://chromium-review.googlesource.com/c/angle/angle/+/2755841 https://chromium-review.googlesource.com/c/angle/angle/+/3961670 Bug: angleproject:7760, chromium:1385510 Change-Id: I43b9827b977079b88daa794e867637f7a126b080 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4192347 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Shahbaz Youssefi 2f1f9500 2022-09-14T15:52:11 GLES1: Fix behavior with incomplete mipmap textures GLES1 requires texturing to be disabled when a mipmap-enabled texture is incomplete. Bug: angleproject:3408 Change-Id: I2c3b0206282a71f9a54d77ecdf2c7e42c7175fe5 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3896212 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Yuxin Hu <yuxinhu@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Jamie Madill ae7481a6 2022-08-31T10:56:58 Move entry point classifier helpers into angle_common. These were previously hidden in DebugAnnotatorVk. They're also useful in the frame capture code. Bug: angleproject:7621 Change-Id: If443e41787019925e84f6a108809af1db220b714 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3868930 Auto-Submit: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Cody Northrop <cnorthrop@google.com>
Eddie Hatfield 916a35dd 2022-06-28T14:40:53 Merge getTempPath and CreateTemporaryFile Also includes moving these two (and some helpers) to common/system_utils.h Bug: angleproject:5095 Change-Id: I7d2fcbd27a67dc13215265ac5b5e8391b15a980b Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3733519 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Eddie Hatfield <eddiehatfield@google.com> Reviewed-by: Cody Northrop <cnorthrop@google.com>
Hailin Zhang b7474d0a 2022-04-28T14:44:54 D3D11: Add GL_EXT_texture_buffer support tested: deqp-gles31.exe --deqp-gl-context-type=egl --deqp-case=dEQP-GLES31.functional.texture.texture_buffer.* passed Bug: b/206367167 Change-Id: I31a6f84bd701a737735a6bac2f4eef780c24a979 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3639722 Commit-Queue: Hailin Zhang <hailinzhang@google.com> Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tomasz Śniatowski 4a4bb07b 2022-03-03T21:56:05 Don't create a string out of a nullptr The code path is already behind an UNREACHABLE(), but having the code return nullptr in a function returning std::string is still UB, and won't compile in C++23. Return an empty string instead. Bug: chromium:1302724 Change-Id: I151d488c4e7e951dcae9f55c142ca49526e3b102 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3502448 Auto-Submit: Tomasz Śniatowski <tsniatowski@vewd.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Peng Huang 32f572b7 2021-12-03T17:58:51 Support creating EGLImage from VkImage Bug: chromium:1264439 Change-Id: I520182143e748f25b44d0725f3f171b7b33a85d8 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3311131 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Peng Huang <penghuang@chromium.org>
Jamie Madill fa53afa4 2021-09-01T08:52:13 Capture/Replay: Add uniforms to program serialization. Previously we weren't serializing the uniform data. This meant that buggy uniform capture wouldn't show up as diffs in the serialization. Verified that this new uniform capture caught a bug when retracing PUBG mobile, which uses indexed array uniform locations. Bug: angleproject:5133 Change-Id: I2a9f6ca45f1247b1a81337e47b7fb7a3d3ab4953 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3136093 Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Tim Van Patten <timvp@google.com> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Shahbaz Youssefi 5e579a18 2021-07-13T01:22:48 Vulkan: SPIR-V Gen: Support row-major blocks The SPIR-V type generation is refactored to contain all type-differentiating properties in a specific struct that is passed around. The following can lead to different SPIR-V types generated from the same GLSL type: - Block storage for blocks - Invariant for blocks - Row-major for blocks with matrices - Row-major for matrix arrays in blocks - Bool when used inside an interface block (not yet implemented) Previously, block storage and invariant were passed around. Instead, with this change the aggregate of all the above is passed around. The row-major specialization is added in this change. This change also refactors the uniform/buffer block encoding to use the existing encoders in blocklayout.h. Bug: angleproject:4889 Change-Id: I3cfa8bd96bb380a1f1f05fbbd6b3eebd702c9e24 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3021670 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Tim Van Patten <timvp@google.com>
Le Hoang Quyen f2aa9d5d 2021-04-11T14:55:19 Reland: Metal: Support importing external metal textures This relands I4d4a88cfbb77d8b7508b787c7fec44073d3b11b0. Fixes: - uninstantiated ImageTestMetal error - failed ImageTest.ANGLEExtensionAvailability on ARM mac. Bug: angleproject:5763 Bug: angleproject:5814 Change-Id: I906fe52baefd6be3c6e00f594795bd527df01616 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2820178 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Le Hoang Quyen <le.hoang.q@gmail.com>
Tim Van Patten fbfecbe2 2021-04-07T11:26:13 Capture/Replay: Add PPO/glProgramUniform support Command and Conquer: Rivals requires additional frame capture API support: - Program Pipeline Objects - glProgramUniform* Bug: angleproject:5830 Change-Id: I159086f92d2dfead0a513cd17fadeda7df92f408 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2809891 Commit-Queue: Tim Van Patten <timvp@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com>
Kai Ninomiya 256100b2 2021-04-02T01:45:14 Revert "Metal: Support importing external metal textures" This reverts commit 2ec3e0a1e6890da56de9dfd3da5c9f31a3f7fbb7. Reason for revert: Test suite ImageTestMetal never instantiated https://anglebug.com/5814 Original change's description: > Metal: Support importing external metal textures > > via KHR_image_base and ANGLE_metal_texture_client_buffer > > Bug: angleproject:5763 > Change-Id: I4d4a88cfbb77d8b7508b787c7fec44073d3b11b0 > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2757811 > Commit-Queue: Le Hoang Quyen <le.hoang.q@gmail.com> > Reviewed-by: Kenneth Russell <kbr@chromium.org> > Reviewed-by: Jamie Madill <jmadill@chromium.org> Bug: angleproject:5763, angleproject:5814 Change-Id: Ia862aa37a6c914f6e21f9b3121c7c36d449475ea No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2801155 Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com> Reviewed-by: Kenneth Russell <kbr@chromium.org> Commit-Queue: Kenneth Russell <kbr@chromium.org>
Le Hoang Quyen 2ec3e0a1 2021-03-13T22:17:49 Metal: Support importing external metal textures via KHR_image_base and ANGLE_metal_texture_client_buffer Bug: angleproject:5763 Change-Id: I4d4a88cfbb77d8b7508b787c7fec44073d3b11b0 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2757811 Commit-Queue: Le Hoang Quyen <le.hoang.q@gmail.com> Reviewed-by: Kenneth Russell <kbr@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Shahbaz Youssefi c07ef602 2021-01-05T12:26:05 Vulkan: Move xfb buffer decl to translator in emulation path This makes @@ XFB-DECL @@ empty on this path. Ultimately, this is working towards removing both @@ XFB-DECL @@ and @@ XFB-OUT @@ macros for both the emulation and extension paths, allowing the shaders to be compiled at compile time rather than link time. Bug: angleproject:3606 Change-Id: If16e9d92c419a04ecd3094481ed546d0708cdb43 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2611305 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Tim Van Patten <timvp@google.com>
Jamie Madill f6df8692 2020-12-09T12:46:35 Vulkan: Support XFB in non-Vertex stages. This updates the code in several places to support Geometry and Tessellation Evaluation shaders to output transform feedback. Does not turn on any new tests but enables support for XFB when we turn on GS/TS. Bug: angleproject:3571 Bug: angleproject:3572 Change-Id: I6dcb768f2df4eeee81a4a500e999fcf16716f58f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2581941 Reviewed-by: Tim Van Patten <timvp@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 4accbe92 2020-12-04T12:27:01 Fix separable Geometry shaders. Geometry shaders weren't being processed in some of the separable shader logic. This CL fixes two cases: one in Program and one in ProgramPipeline. Bug: angleproject:5409 Change-Id: I19adc5c11a54814d28dd20574a5e038ca9dbd021 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2574827 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Tim Van Patten <timvp@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi dfdf90a7 2020-12-01T16:09:41 Create helper for identifying builtin names Bug: angleproject:5405 Change-Id: I652f2d6d3af4468b9662cdea5d2706d36e118239 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2568550 Reviewed-by: Tim Van Patten <timvp@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Geoff Lang 5b419533 2020-11-03T13:33:44 GL: Implement EXT_YUV_target Add test coverage of YUV format sampling as RGB or directly as YUV and rendering as YUV using layout(yuv). Initializing YUV AHardwareBuffers requires Android API 29 so ANGLE must be compiled with: android32_ndk_api_level = 29 android64_ndk_api_level = 29 The following tests can still run with Android API 26 because they don't need to initialize the buffer: ImageTestES3.ClearYUVAHB ImageTestES3.YUVValidation Bug: angleproject:4852 Bug: b/172649538 Change-Id: I4fe9afb2a68fb827dc5a5732b213b5eb60d585ac Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2517562 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Jamie Madill 43acf3ba 2020-07-31T15:43:57 GL: Compiler changes for GL_OES_texture_buffer This extension is core in GLES 3.2 This CL enables the extension, added 412 new dEQP tests for texture buffer. 410 of these tests pass, but there are two tests that fail, detailed in anglebug.com/4933 Also includes a fix for completeness checks. Based on a CL by Jonah Ryan-Davis. Bug: angleproject:3573 Bug: angleproject:4933 Change-Id: I45759d765c88c64f21b592eab01d910dc4bc8da3 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2521239 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com>
Geoff Lang 4e6f6545 2020-04-16T16:31:24 GLX: Support X11 pixmaps Add support for creating EGL pixmaps from X11 pixmaps using GLX. Pixmaps are needed for various external APIs such as VAAPI. Add support for EGL_NOK_texture_from_pixmap to allow binding pixmaps to textures. BUG=angleproject:4560 Change-Id: I4a6d3ad7e87151ff5317bbdaaf093ac1b46daf5f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2153805 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Reviewed-by: Tim Van Patten <timvp@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Philip Lamoureux 9515707b 2020-05-29T11:23:44 Move ShaderVariable utility function from utilities.cpp ShaderVars.cpp. Fixes an implied dependency cycle between translator and angle_common. This will also allow us to be more strict about declaring dependencies on GLSLANG headers. Tested by building and running angle_unit_tests on Linux. Bug: angleproject:4672 Change-Id: I331230d2cf179ccea140ee7a0d5a3c8768c58cb1 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2222682 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jonah Ryan-Davis eadc387c 2020-04-01T16:53:31 GL: Support GL_OES_texture_cube_map_array in shader translator GL_OES_texture_cube_map_array is core in 3.2. This CL adds support for this extension in the shader translator. Now passes dEQP.KHR_GLES31/core_texture_cube_map_array.*, dEQP.GLES31/functional_fbo_color_texcubearray_*, and dEQP.GLES31/functional_opaque_type_indexing*samplercubearray* with GL backend. Bug: angleproject:3584 Change-Id: I1a8485c7d9d3fffb9b5109d292b35b0c56a3c665 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2133086 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jonah Ryan-Davis <jonahr@google.com>
Jiajia Qin 85ae836f 2020-03-30T16:03:47 GL: Implement EGL_EXT_image_dma_buf_import Add support for the EGL_EXT_image_dma_buf_import on EGL implementations that support it natively. This extensin is used on ozone to import native compositing buffers. This patch also adds new tokens in EGL_EXT_image_dma_buf_import_modifiers which are used in eglCreateImageKHR. BUG=angleproject:4529 Change-Id: I49bff831b591fb19fcdcec1145c7a61f5d8020c4 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2128190 Commit-Queue: Jiajia Qin <jiajia.qin@intel.com> Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Tim Van Patten 4671bcf0 2020-04-21T18:12:46 Fix program interface queries for arrays and built-ins Program interface queries for arrays should return an invalid index value for indices with leading zeroes. Program interface queries should return invalid locations for built-in variables. Bug: angleproject:3596 Test: KHR-GLES31.core.program_interface_query.* Change-Id: I484ab6e21dbe0c8a984e135ac947c4583a3fbfa2 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2159646 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Tobin Ehlis <tobine@google.com> Commit-Queue: Tim Van Patten <timvp@google.com>
Jamie Madill c7f63a01 2020-02-23T16:46:41 Fix debug callback in perf tests. Was not outputting correctly. Also print more information like the type and severity of the message. Moves some stringification code out of RendererGL into common/utilities. Bug: angleproject:3630 Change-Id: I029e279764fa4ae5cab8d903bd0ef7d376b7b846 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2067630 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com> Reviewed-by: Tim Van Patten <timvp@google.com>
Yan 17b3c2f3 2019-10-14T14:13:59 Implement SamplerVideoWEBGL for WEBGL_video_texture extension on desktop WEBGL_video_texture is an extension that will improve uploading video frame to WebGL performance. (https://www.khronos.org/registry/webgl/extensions/proposals/WEBGL_video_texture/) This extension introduced a new texture type TEXTURE_VIDEO_IMAGE_WEBGL and a new sampler type samplerVideoWEBGL to sample it. In chromium implementation, TEXTURE_VIDEO_IMAGE_WEBGL maps to different native texture type based on platform. On desktop, it maps to GL_TEXTURE2D(Currently supported). On Android, it should map to GL_TEXTURE_EXTERNAL(TODO). SamplerVideoWEBGL needs to be mapped to sampler2D or samplerExternalOES according to TEXTURE_VIDEO_IMAGE_WEBGL implementation. This patch implements samplerVideoWEBGL in Angle to support WEBGL_video_texture on desktop. In this case, samplerVideoWEBGL should map to sampler2D. Bug: chromium:776222, angleproject:3889 Change-Id: Idb0a5fcde37ca75ccc1181226b91f257212e7500 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1866274 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Hyunchang Kim caa6eccd 2019-10-27T13:46:56 Vulkan: Implement Transform Feedback support via extension Implemented transform feedback extension path. Where VK_EXT_transform_feedback is supported, extension path will be taken over an emulation path. Extension path has advantages in terms of performance. BUG=angleproject:3206 Test: dEQP-GLES3.functional.transform_feedback.* angle_end2end_tests --gtest_filter=TransformFeedbackTest* Change-Id: Ia07c23afb289d9c67073469a97b714ec96f5265a Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1882767 Commit-Queue: Mohan Maiya <m.maiya@samsung.com> Reviewed-by: Mohan Maiya <m.maiya@samsung.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com>
Courtney Goeltzenleuchter 33a00efd 2019-11-27T09:21:45 Add Compute Shared Memory Size Validation Add tracking of shared memory declarations in compute shaders. Test:   angle_deqp_gles31_tests --gtest_filter=dEQP.GLES31/functional_debug_negative_coverage_callbacks_compute_exceed_shared_memory_size_limit Bug: 4173 Change-Id: If2a86d467a82f73fa5b2ee0ced752701acfe1872 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1934653 Commit-Queue: Courtney Goeltzenleuchter <courtneygo@google.com> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Le Quyen fe26bae4 2019-10-29T18:38:53 Metal backend implementation pt 2 This is without Metal specific shader translator implemented yet. Bug: angleproject:2634 Change-Id: I95d589442251c9ba111bd05a2dc379a36739046c Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1855069 Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill fd58d22c 2019-10-24T12:55:07 Enable "-Wtautological-type-limit-compare". This is used by Skia. It seems like a good this to enable in any case. It verifies that we don't do pointless comparisons like "int < INTMAX". Fix the one instance by using the base checked numeric helpers. Bug: angleproject:4046 Change-Id: Ie14a9cb2754df52929591281062d92ef70df8f97 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1877474 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Le Quyen a48f95ab 2019-10-14T14:49:49 Move Vulkan GlslangWrapper code to a shared location. Metal backend will reuse Vulkan's GlslangWrapper code. The Metal backend will use this code to translate glsl to spirv then cross compile to Metal Shading Language using spirv-cross. So the source code of GlslangWrapper should be moved outside vulkan folder. Bug: angleproject:2634 Change-Id: I208062daf0d77756c9d32cfdab925b7dfdf83e05 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1858042 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Tim Van Patten 616a4dc0 2019-09-12T16:10:47 Vulkan: Full support for program interface queries Program interface queries are a generic way to query attributes of the program like uniforms, samplers, attributes, etc. This change supports those queries for program outputs. Bug: angleproject:3596 Test: dEQP-GLES31.functional.program_interface_query.* Test: ProgramInterfaceTest.cpp Change-Id: I0f13692949073b45988b6f930eee9eaa6411bbe2 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1801998 Commit-Queue: Tim Van Patten <timvp@google.com> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Austin Kinross 11dc1635 2019-09-18T14:46:23 Add support for generating UWP (Windows Store) projects again Until late 2017, ANGLE supported Windows Store apps on Windows 8.1, Windows Phone 8.1, and Windows 10 (via the Universal Windows Platform, aka UWP). Unfortunately ANGLE deprecated support for Windows Store when it switched from GYP to GN in 2017. Since then, users have been able to use Microsoft\angle for their UWP apps but this isn't ideal since it's based on a 2017 copy of Google\angle. This PR bring back support for UWPs, so that UWP users can use Google\angle again. Specifically it: - Adds support for generating UWP projects via GN - Adds helper/util functions specific to UWP (they're mostly similar to the desktop Windows helpers) - Fixes some existing Windows Store code that's rotted since 2017 - Disables async shader compilation for UWPs, since its implementation calls wait on the UI thread (which is forbidden in UWPs) - Renames 'ANGLE_ENABLE_WINDOWS_STORE' to 'ANGLE_ENABLE_WINDOWS_UWP', since ANGLE only support UWPs now - Fixes misc other related issues (such as dependencies on D3D9 headers in API-agnostic code) Note that this doesn't bring back support for Windows/Phone 8.1. BUG=angleproject:3922 Change-Id: Ia79ae05a5e0e0a0625eb633bf1928722dfd3e85f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1811871 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Stuart Morgan 9d737966 2019-08-14T12:25:12 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>
Shahbaz Youssefi 93560ef5 2019-07-25T16:13:02 Vulkan: Seamful cube map emulation In GLSL, a cube texture is sampled with one of textureCube* functions. This function takes a 3D coordinate which is a vector from the center of the cube and identifies a direction to sample from. GLES2.0 has the following table that translates this 3D coordinate (Rx, Ry, Rz) to a face and ST coordinates within that face. This table can be found in Section 3.7.5 (Cube Map Texture Selection). A compiler pass is implemented in ANGLE that replaces samplerCube declarations with a sampler2DArray. The textureCube* functions are replaced with the corresponding texture* functions with the translated coordinates according to that table. Gradients provided to textureCubeGrad are translated using the same formulae, which is not precise but the spec specifies this projection to be implementation dependent. Helper invocations enabled through WQM (whole quad mode) cause a nuisance in that the extrapolated varyings used as coordinates in a textureCube call could have a different major axis (and therefore face) from the non-helper invocations that lie within the geometry. subgroupQuadSwap* operations are used in conjunction with gl_HelperInvocation to make sure the helper threads calculate texture UVs in the same face as the non-helper invocations. Bug: angleproject:3300 Bug: angleproject:3240 Bug: angleproject:3243 Bug: angleproject:3732 Change-Id: I0cb6a9b1f2e1e6a392b5baca1c7118ed1c502ccf Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1715977 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
James Dong 593b1a6c 2019-07-30T10:02:22 Vulkan: Fix array handling in default uniforms Changes default uniform block layout generation to only remove the first array subscript, which causes arrays of arrays to be recognized correctly. Bug: angleproject:3604 Test: ./angle_deqp_gles31_no_gtest --deqp-egl-display-type=angle-vulkan -n 'dEQP-GLES31.functional.shaders.arrays*' Test: ./angle_deqp_gles31_no_gtest --deqp-egl-display-type=angle-vulkan -n 'dEQP-GLES31.functional.program_interface_query.*array*array*' Change-Id: Ifacc665cae87c651253e5cb8d929178d7fc92817 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1724906 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: James Dong <dongja@google.com>
Stephen Martinis 88e03221 2019-05-31T12:06:28 Unset conflicting SRVs and UAVs D3D11 cannot allow the same (sub)-resource bound as both a SRV and an UAV at the same time. Unset conflicting SRVs and UVAs between render pipeline and compute pipeline. Bug: angleproject:3152 TEST=angle_end2end_tests.ComputeShaderTest.* Change-Id: I9cb8b902edbf987166a57af314af6b21a6874998 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1576504 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Xinghua Cao <xinghua.cao@intel.com>
Sunny Sachanandani f9686af0 2019-06-04T17:49:43 Add support for D3D11 texture backed EGLImages Implement EGL_ANGLE_image_d3d11_texture extension. Images created with this extension might not be renderable based on bind flags and resource usage of the client provided texture in which case attaching them to a framebuffer won't succeed. The intended use case is to bind the front and back buffers of a swap chain to GL textures that can be used for rendering in the case of the back buffer and as a shader input for the front buffer. Bug: chromium:939655 Change-Id: Ic3328e831880292217b88be84740740df6031fa6 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1646732 Commit-Queue: Sunny Sachanandani <sunnyps@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Shahbaz Youssefi 051b0896 2019-04-15T15:39:39 Vulkan: Fix layout substitution for struct varyings If the shader contains code such as the following: struct S { vec4 field; }; out S varStruct; The layout qualifier macro is defined as @@ LAYOUT-varStruct @@. However, the Vulkan backend was replacing @@ LAYOUT-field @@. Bug: angleproject:3220 Change-Id: Iae15003867e0bed2cc939159a6653429c7a431e0 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1571389 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Xinghua Cao f3179a6a 2018-07-12T16:22:06 ES31: Implement bindImageTexture binds a single layer on D3D backend Dynamically generate image2D variables' declaration and function definition in libANGLE. Bug: angleproject:1987 TEST=angle_end2end_tests.ComputeShaderTest.* Change-Id: Idacc756f7bd15f22eccb1d689e18e997f3e74159 Reviewed-on: https://chromium-review.googlesource.com/c/1142885 Commit-Queue: Xinghua Cao <xinghua.cao@intel.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill dbc605ce 2019-01-04T16:39:14 Vulkan: Optimize VBO state changes. Also has some minor optimizations for the front-end. 12% improvement on the Vulkan VBO change test. Bug: angleproject:3014 Change-Id: I38e1a8194edfc14bfe57424be348cb9688e928f4 Reviewed-on: https://chromium-review.googlesource.com/c/1369286 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 8dc27f99 2018-11-29T11:45:44 Use packed enum for DrawElementsType. The packing and unpacking take a few extra instructions. But it completely obviates the need for any switches in the validation code. Speed is slightly faster or the similar depending on the back-end. Also add gl_angle_ext.xml to GL entry point generator inputs. This was missing and would cause the code generation to miss certain changes. Bug: angleproject:2985 Change-Id: I1ea41a71db71135000166ead8305ec42d22ff7b3 Reviewed-on: https://chromium-review.googlesource.com/c/1351729 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Jamie Madill b980c563 2018-11-27T11:34:27 Reformat all cpp and h files. This applies git cl format --full to all ANGLE sources. Bug: angleproject:2986 Change-Id: Ib504e618c1589332a37e97696cdc3515d739308f Reviewed-on: https://chromium-review.googlesource.com/c/1351367 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Geoff Lang c3ee7ec0 2018-09-21T16:15:03 Implement EGL_ANDROID_image_native_buffer. BUG=angleproject:2508 Change-Id: I8ef2ce8320edeb336727905055f47bb299dec2ea Reviewed-on: https://chromium-review.googlesource.com/c/1238886 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Jamie Madill b36a4816 2018-09-25T10:15:11 Vulkan: Add OpenGL line segment rasterization. Line rasterization rules are implemented using a shader patch. The patch does a small test and discards pixels that are outside of the OpenGL line region. The feature is disabled on Android until we can determine the root cause of the test failures. Bug: angleproject:2598 Change-Id: Ic76c5e40fa3ceff7643e735e66f5a9050240c80b Reviewed-on: https://chromium-review.googlesource.com/1120153 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Olli Etuaho dff32a0d 2018-08-28T14:35:50 Support multisample arrays in shader programs The added tests check that using textureSize() and texelFetch() on textures with a fixed point format return expected results. texelFetch is also covered for integer format textures. dEQP GLES 3.1 tests also cover a variety of multisampled array texture formats. BUG=angleproject:2775 TEST=angle_end2end_tests, angle_deqp_gles31_tests Change-Id: I99b422e24b39e3563ed72f0fb85c9c1907df807d Reviewed-on: https://chromium-review.googlesource.com/1196521 Commit-Queue: Olli Etuaho <oetuaho@nvidia.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Geoff Lang dbd16127 2018-07-19T11:30:21 EGL: Implement EGL Image extensions. BUG=angleproject:2507 Change-Id: Ica33166e9e23e933977c3ab034d4f5a8cada9fb1 Reviewed-on: https://chromium-review.googlesource.com/1143454 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 493f9571 2018-05-24T19:52:15 Add PrimitiveMode packed GLenum. Bug: angleproject:2574 Change-Id: I3d7bd7ca0d69a364a611dc04799ea34906fc4a6c Reviewed-on: https://chromium-review.googlesource.com/1067114 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Corentin Wallez 99d492c2 2018-02-27T15:17:10 Use packed enums for the texture types and targets, part 2 This completes the refactor by using the packed enums in the gl:: layer and in the backends. The packed enum code generation is modified to support explicitly assigning values to the packed enums so that the TextureTarget cube map faces are in the correct order and easy to iterate over. BUG=angleproject:2169 Change-Id: I5903235e684ccf382e92a8a1e10c5c85b4b16a04 Reviewed-on: https://chromium-review.googlesource.com/939994 Commit-Queue: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Corentin Wallez f0e89be6 2017-11-08T14:00:32 Use packed enums for the texture types and targets, part 1 In OpenGL there are two enum "sets" used by the API that are very similar: texture types (or bind point) and texture targets. They only differ in that texture types have GL_TEXTURE_CUBEMAP and target have GL_TEXTURE_CUBEMAP_[POSITIVE|NEGATIVE]_[X|Y|Z]. This is a problem because in ANGLE we use GLenum to pass around both types of data, making it difficult to know which of type and target a variable is. In addition these enums are placed somewhat randomly in the space of OpenGL enums, making it slow to have a mapping from texture types to some data. Such a mapping is in hot-code with gl::State::mTextures. This commit stack makes the texture types and target enums be translated to internal packed enums right at the OpenGL entry point and used throughout ANGLE to have type safety and performance gains. This is the first of two commit which does the refactor for all of the validation and stops inside gl::Context. This was the best place to split patches without having many conversions from packed enums to GL enums. BUG=angleproject:2169 Change-Id: Ib43da7e71c253bd9fe210fb0ec0de61bc286e6d3 Reviewed-on: https://chromium-review.googlesource.com/758835 Commit-Queue: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
jchen10 8225e73b 2017-11-14T16:29:03 Support struct varying for transform feedback Capturing struct members is vague In ES 3.00. But the ES 3.10 explicitly says that base-level members of struct are feasible for transform feedback capture. This implementation fills the gap. TEST=angle_end2end_tests:TrasnformFeedbackTest* BUG=angleproject:2241 Change-Id: Ibdf3ae6c2b8b28952e2f7fef1363545cbccad389 Reviewed-on: https://chromium-review.googlesource.com/768613 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Corentin Wallez 9db70de8 2017-07-04T18:28:42 Reland: Implement EGL_ANGLE_iosurface_client_buffer Includes a fix for creating pbuffers with <buftype> EGL_D3D_TEXTURE with EGL_WIDTH and EGL_HEIGHT attributes. BUG=angleproject:1649 TBR=geofflang@chromium.org Change-Id: Id2974b8fab02c3218febfac708b9b034e65cbc53 Reviewed-on: https://chromium-review.googlesource.com/823248 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Corentin Wallez 7f5c3eb7 2017-12-12T14:54:17 Revert "Implement EGL_ANGLE_iosurface_client_buffer" This reverts commit c7abc08034a30a41748eefc5b628a76d4e2daa8a. Reason for revert: Might have broken Chromium Win10 composition due to validation changes. Original change's description: > Implement EGL_ANGLE_iosurface_client_buffer > > BUG=angleproject:1649 > > Change-Id: I1e72c31d7c9497ad14039a8d3fb97317ab193cb2 > Reviewed-on: https://chromium-review.googlesource.com/559107 > Reviewed-by: Corentin Wallez <cwallez@chromium.org> > Reviewed-by: Geoff Lang <geofflang@chromium.org> > Commit-Queue: Corentin Wallez <cwallez@chromium.org> TBR=geofflang@chromium.org,cwallez@chromium.org Change-Id: I605b710b6d76056d6276b09822cd6ddca277bfd0 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: angleproject:1649 Reviewed-on: https://chromium-review.googlesource.com/822172 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Corentin Wallez c7abc080 2017-07-04T18:28:42 Implement EGL_ANGLE_iosurface_client_buffer BUG=angleproject:1649 Change-Id: I1e72c31d7c9497ad14039a8d3fb97317ab193cb2 Reviewed-on: https://chromium-review.googlesource.com/559107 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Olli Etuaho 465835d6 2017-09-26T13:34:10 Support arrays of arrays in the API The ShaderVariable class that is used as an interface between the compiler and the rest of the code gets arrays of arrays support. Array of array variables are passed from the compiler just like any other variables. However, when stored in Program state each innermost array constitutes a separate variable. This is done to make the implementation match the GLES specification for program interface query APIs. This will be tested more fully once support for parsing arrays of arrays lands in the compiler. TEST=angle_end2end_tests, angle_unittests BUG=angleproject:2125 Change-Id: I0f7159000f039be92a87a52b3b68cd9a215a21cb Reviewed-on: https://chromium-review.googlesource.com/684742 Commit-Queue: Olli Etuaho <oetuaho@nvidia.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 8957b6c0 2017-11-14T12:40:38 Add perf test for ushort DrawElements. The code path in the D3D11 back-end is sigificantly different for unsigned short indices vs unsigned int. Because of the workaround we have for the primitive restart index in D3D11, ushort rendering can be slower. BUG=angleproject:2229 Change-Id: I303dcc55b0314ec45508044995ba47b250cbb87d Reviewed-on: https://chromium-review.googlesource.com/767149 Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Bryan Bernhart (Intel Americas Inc) f4f293ef 2017-11-06T15:56:29 Harden uniform array index parsing. Add overflow handling when parsing uniform variables. BUG=angleproject:2191 TEST=angle_unittests Change-Id: Ib2a69be1cc11a94420bc923a2aaaef8dc664d562 Reviewed-on: https://chromium-review.googlesource.com/756209 Reviewed-by: Bryan Bernhart <bryan.bernhart@intel.com> Reviewed-by: Olli Etuaho <oetuaho@nvidia.com> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Geoff Lang ee6884e7 2017-11-09T16:51:11 Generate generic error messages for Error objects without messages. Makes sure that the debug output is fired for all generated errors. BUG=783054 Change-Id: Ia30870cd950c53da892554e0862276d4be5360ac Reviewed-on: https://chromium-review.googlesource.com/761760 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Antoine Labour <piman@chromium.org>
Olli Etuaho d255123c 2017-10-26T20:03:33 Store shader interface variables as per query spec GLES 3.1 section 7.3.1.1 specifies how active variable entries should be generated and how active variables are named. The specs for program interface variable queries are built on top of this section. ANGLE has already followed this spec for the most part for generating variable lists in ProgramState, but now we also follow the naming spec for arrays and include [0] at the end of the stored name. This will make implementing arrays of arrays more straightforward. Most logic for variable queries will just keep working as is when arrays of arrays are added instead of needing more complex logic for handling array indexing. BUG=angleproject:2125 TEST=angle_end2end_tests Change-Id: I3acd14253153e10bc312114b0303065da2efb506 Reviewed-on: https://chromium-review.googlesource.com/739826 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Olli Etuaho c853804c 2017-09-27T11:20:15 Add support for arrays of arrays to VariableLocation Array indices are sorted so that the outermost index is in the back. This is because we want to be consistent with future arrays of arrays parsing code. In parsing we'll have a utility function to make a TType object into an array, and there it's most natural to push the new outermost sizes to the back of the vector. Further patches will still be needed to parse arrays of arrays and add support to arrays of arrays into the API. BUG=angleproject:2125 TEST=angle_unittests, angle_end2end_tests Change-Id: I6c88edabf68ae9dbd803ec6d20543016c408b702 Reviewed-on: https://chromium-review.googlesource.com/686414 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
jchen10 a99ed554 2017-09-22T08:10:32 Refactor data conversions for state commands This mainly enforces the rules as descripted in ES 3.10, section 2.2.1 and 2.2.2, by enhancing the "queryconversions" to support more rules, removing the scattered type convertors in "utilities" , "mathutil" and "queryutils", and forcing to only use the convertors in "queryconversions". BUG=angleproject:2165 Change-Id: I73c1dc850e2b3b8a479ece1d9c5eb7ae4ce851fe Reviewed-on: https://chromium-review.googlesource.com/680094 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
jchen10 d9cd7b7f 2017-08-30T15:04:25 ES31: Add glGetProgramInterfaceiv API Add API entry and validation checks(GLES 3.1 section 7.3). Add the first 4 interfaces(PROGRAM_INPUT, PROGRAM_OUTPUT, UNIFORM and UNIFORM_BLOCK) implementation. BUG=angleproject:1920 TEST=angle_end2end_tests:ProgramInterfaceTestES31.* Change-Id: Iab80ba332e2a5e2b3e677039359e60a420e3d6b0 Reviewed-on: https://chromium-review.googlesource.com/642729 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill f00f7ffe 2017-08-31T14:39:15 Add a Uniform type info table. Currently most uniform type info is determined by switching on the uniform type. Some values are computed from other values, which can result in three or more switch statements plus some multiplies or other math. This patch attempts to improve the speed by pre computing necessary values into constant static tables. Improves performance by about 7% in a uniform stress test. BUG=angleproject:1390 Change-Id: I29bef259a17f6d6536171ade4950e2d712bfd39c Reviewed-on: https://chromium-review.googlesource.com/643791 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Corentin Wallez 13c0dd46 2017-07-04T18:27:01 Add texture rectangle extension. This is needed to support binding IOSurfaces to textures on OSX. This commit adds support in the API and tests, but didn't need to implement compiler changes as it already supported ARB_texture_rectangle. Implementation of CHROMIUM_opy_texture for rectangle texture and the spec are left for follow-up commits. Change-Id: I45c66be763a9d3f6f619640f9f95f39b05c70867 Reviewed-on: https://chromium-review.googlesource.com/559106 Commit-Queue: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
jchen10 05c31dae 2017-07-18T16:11:39 ES31: Enable atomic counter for GL backend This simply translates the offset qualifier and synchronizes the buffer binding state for GL translator and renderer. BUG=angleproject:1729 TEST=angle_end2end_tests:AtomicCounterBufferTest31 Change-Id: Ib8424918478ae4c47049d5856ea20ef022f12913 Reviewed-on: https://chromium-review.googlesource.com/575913 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
jchen10 4cdac9eb 2017-05-08T11:01:20 ES31: Add atomic counter for GLSL parsing This makes shader compiler support the new basic type 'atomic_uint' and validate its layout qualifiers properly. BUG=angleproject:1729 TEST=angle_unittests:AtomicCounterTest angle_deqp_gles31_tests:dEQP-GLES31.functional.atomic_counter.layout.invalid* angle_deqp_gles31_tests:dEQP-GLES31.functional.debug.negative_coverage.*.atomic* Change-Id: Ia237eadf6ea72314f436a0abbb93a05598e71eba Reviewed-on: https://chromium-review.googlesource.com/500088 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Geoff Lang 4f0e003e 2017-05-01T16:04:35 Implement the new formats/features of the ES3 CHROMIUM_copy_texture. Some non-renderable texture formats remain unimplemented. BUG=angleproject:1932 Change-Id: Id206432d6e26a70fc0e84478a4e43e9eefadcf2f Reviewed-on: https://chromium-review.googlesource.com/491948 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
jchen10 15015f7f 2017-03-16T13:54:21 ES31: Add glGetProgramResourceIndex API Add API entry and validation checks(GLES 3.1 section 7.3). Add the first 2 interfaces(PROGRAM_INPUT and PROGRAM_OUTPUT) implementation. BUG=angleproject:1920 Change-Id: Ib2dedded9fd79b315e9f38de7c27a5e4ec4c6066 Reviewed-on: https://chromium-review.googlesource.com/453085 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Olli Etuaho ceb1048f 2017-02-13T12:31:03 Add classification of image type enums Implement classifying image enums in utilities and plumb the image type check to Uniform objects as well. This functionality will be used to add API support for images. BUG=angleproject:1442 Change-Id: Idd2ee5ebacd38290aeeace1177165c740bc42c7e Reviewed-on: https://chromium-review.googlesource.com/441585 Commit-Queue: Olli Etuaho <oetuaho@nvidia.com> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Geoff Lang c5a2a172 2017-01-13T15:55:07 Add EGL_EXT_pixel_format_float support, enables float EGL surfaces. Add floating point EGL configs for the D3D11 backend. BUG=angleproject:1707 Change-Id: Ic84cd3a0d41e78cc39d0275d83e7695f55673ddf Reviewed-on: https://chromium-review.googlesource.com/428294 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
JiangYizhou 4021932f 2016-12-09T09:50:51 translator: Add ES3.1 multisample texture support. Implement shader objects, [iu]sampler2DMS, textureSize(gsampler2DMS). as well as texelFetch(gsampler2DMS,P,sample) for the glsl. BUG=angleproject:1590 TEST=angle_unittests TEST=angle_end2end_tests Change-Id: I781023f7bec34ad0264af69f34bb182b50bd1fbd Reviewed-on: https://chromium-review.googlesource.com/423175 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Olli Etuaho <oetuaho@nvidia.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Martin Radev 2cc85b3b 2016-08-05T16:22:53 Add support for images in the compiler The patch adds support for GLSL ES 3.1 image types. Internal format layout qualifiers for images are added. Support for the readonly and writeonly qualifiers are added. The other memory qualifiers are omitted as to make the patch simpler. Tests are added which check for correct and incorrect usage of images, internal format layout and memory qualifiers. BUG=angleproject:1442 TEST=angle_unittests TEST=angle_end2end_tests Change-Id: Ie4d3acb2a195de11b405ad54110a04c4c1de0b7e Reviewed-on: https://chromium-review.googlesource.com/378855 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Geoff Lang c1984ed4 2016-10-07T12:41:00 Implement robust TexParameter and SamplerParameter entry points. BUG=angleproject:1354 Change-Id: I3aa2dcb8603a839f9c07cd9dd41cb695d2e699f2 Reviewed-on: https://chromium-review.googlesource.com/395529 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Jamie Madill 8b9b792d 2016-05-19T13:13:37 Make RendererD3D a bit smaller. Move some D3D11-specific stuff into Renderer11, and remove a few virtual methods that weren't needed to be virtual. BUG=angleproject:1369 Change-Id: Id37e7271ffc28b089dbea123dca70f38c1a06ffb Reviewed-on: https://chromium-review.googlesource.com/345913 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Ian Ewell bda75597 2016-04-18T17:25:54 Finish NV12 support via streams. The main functionality for NV12 texture support through EGL streams has been added. Updates to the compiler, texture code, and stream code were added to support binding to external D3D11 NV12 textures. An end2end test was also added to test sampling of YUV textures and converting to RGB. There is also a new script to convert BMP files to an NV12 texture ready to load into D3D11 for testing purposes. BUG=angleproject:1332 Change-Id: I39b6ec393ea338e2c843fb911acc1b36cd1158a0 Reviewed-on: https://chromium-review.googlesource.com/339454 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Ian Ewell <ewell@google.com> Reviewed-on: https://chromium-review.googlesource.com/341254 Reviewed-by: Ian Ewell <ewell@google.com>
Corentin Wallez 9670b03e 2016-04-29T09:47:47 Revert "Finish NV12 support via streams." Broke Windows Clang compilation, see https://build.chromium.org/p/chromium.gpu.fyi/builders/GPU%20Win%20Clang%20Builder%20%28dbg%29/builds/3583/steps/compile/logs/stdio and search for TextureStorage11.h This reverts commit 9b8b359fa3615be7c7492239a48f61103b2e4fcc. Change-Id: I6e54305eba02b40927a35577594df39e951adb32 Reviewed-on: https://chromium-review.googlesource.com/341430 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Ian Ewell 9b8b359f 2016-04-18T17:25:54 Finish NV12 support via streams. The main functionality for NV12 texture support through EGL streams has been added. Updates to the compiler, texture code, and stream code were added to support binding to external D3D11 NV12 textures. An end2end test was also added to test sampling of YUV textures and converting to RGB. There is also a new script to convert BMP files to an NV12 texture ready to load into D3D11 for testing purposes. BUG=angleproject:1332 Change-Id: I098940e6f25e113dcc4fc8d22ffed4b5a16fd860 Reviewed-on: https://chromium-review.googlesource.com/339454 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Ian Ewell <ewell@google.com>
Cooper Partin 1cc10903 2015-10-29T13:43:40 Removed Sleep( ) workaround for Windows Store builds Visual Studio SDKs now include the ability for Windows Store applications to use the Sleep( ) function. Change-Id: Iaf2a978e778f82e918ba14a58bbb1807cc1fbaf4 Reviewed-on: https://chromium-review.googlesource.com/309890 Tested-by: Cooper Partin <coopp@microsoft.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill 4a3c2341 2015-10-08T12:58:45 Program: Clean up UBO info gathering. The data size & block member info was getting messy, so clean up how we query this from the Impl layer. Also remove the register information from gl::UniformBlock, moving it into the D3D-only world. BUG=angleproject:1172 Change-Id: I40af658ebbd6b7c1a4251906a387ebcbb621cf77 Reviewed-on: https://chromium-review.googlesource.com/304150 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Tryjob-Request: Jamie Madill <jmadill@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Geoff Lang 3edfe034 2015-09-04T16:38:24 Support primitive restart in RendererGL. Store index ranges in a new struct that tracks how many real indices were seen. Update index caching to key on primitive restart being enabled and update index counting functions to skip primitive restart indicies when needed. Passes dEQP-GLES3.functional.primitive_restart.* Change-Id: Id1e25a5adcdcd4e998836e8ff6679c64be4c3066 Reviewed-on: https://chromium-review.googlesource.com/297770 Tryjob-Request: Geoff Lang <geofflang@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang e5f735f9 2015-09-17T13:26:59 Revert "Try Sleep(1) instead of Sleep(0) while waiting for queries." Caused significant slowdown in some chrome use cases that used glFinish or synchronous fences. BUG=532571 This reverts commit a53000b09b012235af228f2b4f48cc9fb477a45a. Change-Id: Id260e9ced472c409b2fa0b28b2b3dea99d412fdf Reviewed-on: https://chromium-review.googlesource.com/300491 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang a53000b0 2015-05-26T10:50:35 Try Sleep(1) instead of Sleep(0) while waiting for queries. On a loaded machine, Sleep(0) can be very slow (40+ms) while Sleep(1) is consistantly 1-2ms. BUG=488571 Change-Id: I71de0b4cfc334a2476b7c613c103e77fe759041d Reviewed-on: https://chromium-review.googlesource.com/273183 Reviewed-by: Shannon Woods <shannonwoods@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang a840617a 2015-07-21T16:53:39 Implement the egl and gl layers of EGL Image. Add end2end tests and unittests. BUG=angleproject:970 Change-Id: Ie8306971730a793f08dfd09ead1bfd6ff3e4623d Reviewed-on: https://chromium-review.googlesource.com/291260 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang 4274f7d2 2015-08-05T23:07:38 Revert "Implement the egl and gl layers of EGL Image." This reverts commit 22a4f38c2ca9ca430b5f976fc7fc816d88918eba. Change-Id: I07acbfe28d11675236de2ea7f6b050c25f80579a Reviewed-on: https://chromium-review.googlesource.com/290960 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang 22a4f38c 2015-07-21T16:53:39 Implement the egl and gl layers of EGL Image. Add end2end tests and unittests. BUG=angleproject:970 Change-Id: I13fc501b24c3f11bfedc810c1ff80fcf1318877c Reviewed-on: https://chromium-review.googlesource.com/287343 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang f51bc795 2015-05-04T14:57:03 Optimize Texture binding by only applying referenced textures. Update ProgramGL to track which the current values of sampler uniforms so that only the currently applied texture units have to be bound for the draw call. BUG=angleproject:882 Change-Id: I280aa106172b13a5fbb31cdefba27b6691c0a0e4 Reviewed-on: https://chromium-review.googlesource.com/264803 Reviewed-by: Kenneth Russell <kbr@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang 831b1953 2015-05-05T11:02:27 Move the IndexRangeCache and Range types to the gl namespace. BUG=angleproject:881 Change-Id: Ib05149facee9fcc7714cb957ca8647b3498a36b6 Reviewed-on: https://chromium-review.googlesource.com/269254 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Brandon Jones <bajones@chromium.org>
Geoff Lang cfaeaa9f 2015-04-14T13:41:02 Refactor uniform array name parsing to a utility function. BUG=angleproject:882 Change-Id: I00fd6d3cfaa107561cee5e4c82d3c60438052963 Reviewed-on: https://chromium-review.googlesource.com/265723 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Kenneth Russell <kbr@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang d4475816 2015-03-18T10:53:05 Always use static_assert for compile-time assertions and remove META_ASSERT. BUG=468139 Change-Id: I696ef307f2faa54bb72df66784bc79a055499987 Reviewed-on: https://chromium-review.googlesource.com/260776 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Geoff Lang 691e58cd 2014-12-19T17:03:25 Merge all gl::Texture* classes. The validation for sampler completeness had a lot of duplicated code. The special cases have been merged into the base class by checking mTarget. BUG=angle:681 Change-Id: I11d94c1432f8fc70a1edaaf8228bbc43c3c8fff3 Reviewed-on: https://chromium-review.googlesource.com/236932 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang 2ec386bb 2014-12-03T14:44:38 Rename IsSampler to IsSamplerType. BUG=angle:733 Change-Id: I62aece16c11aefdbf13c0b5faf83040fdb8555e6 Reviewed-on: https://chromium-review.googlesource.com/232960 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Kenneth Russell b23deb26 2014-11-21T14:53:56 Fixed Mac and Linux build breakage. Introduced in 1edac3b1bdcc54a4b0f0449cb727bda84ab3ee53 . BUG=none Change-Id: Ia5c5e38b794e9c991ec8624de34681dcf13a651f Reviewed-on: https://chromium-review.googlesource.com/231441 Tested-by: Kenneth Russell <kbr@chromium.org> Reviewed-by: Brandon Jones <bajones@chromium.org>
Cooper Partin 1edac3b1 2014-11-20T13:49:27 Fixed Visual Studio 2013 Update 4 build failures for WinRT Change-Id: I393e9800d1c2e902f60728e1f7d0debca66b76a0 Reviewed-on: https://chromium-review.googlesource.com/231140 Tested-by: Cooper Partin <coopp@microsoft.com> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Austin Kinross 922a9fb3 2014-10-21T14:26:33 Use D3D11 Debug Annotations when D3D9 is unavailable Change-Id: I37ac5fe7f0b2fe5e71bd7f0afca55e9894f3463c Reviewed-on: https://chromium-review.googlesource.com/224512 Tested-by: Austin Kinross <aukinros@microsoft.com> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Cooper Partin 88d3b8cb 2014-10-08T10:41:56 Added IInspectable EGLNativeWindowType and ICoreWindow support Change-Id: I6dd7fef72a73572d4a3deda7ce36a11da3a75c81 Reviewed-on: https://chromium-review.googlesource.com/224366 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill e020bed5 2014-10-20T16:16:46 Revert "Added IInspectable EGLNativeWindowType and ICoreWindow support" Causing regressions in the build: http://build.chromium.org/p/chromium.gpu.fyi/builders/GPU%20Mac%20Builder/builds/20182 This reverts commit 756aebfc7afa6d0de14e96637ef396dd7b290c2d. Change-Id: I2f4bdb5aeb429c9bbc5e655a1761704f33737841 Reviewed-on: https://chromium-review.googlesource.com/224221 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Cooper Partin 756aebfc 2014-10-08T10:41:56 Added IInspectable EGLNativeWindowType and ICoreWindow support Change-Id: I34e443b1e194800460e441ac6cee42cf68430564 Reviewed-on: https://chromium-review.googlesource.com/224302 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Shannon Woods 8858cf0a 2014-10-17T20:53:32 Revert "Added IInspectable EGLNativeWindowType and ICoreWindow support" due to build failures on Chromium FYI bots. This reverts commit 406a3be91cc8175df95bd390425e35830778f2d5. Change-Id: Ica2abd2e557a4fd9852d85b7fc018e3d272b6edf Reviewed-on: https://chromium-review.googlesource.com/224051 Reviewed-by: Shannon Woods <shannonwoods@chromium.org> Tested-by: Shannon Woods <shannonwoods@chromium.org>