src/tests/angle_unittests_utils.h


Log

Author Commit Date CI Message
Shahbaz Youssefi bb135f0e 2023-08-24T15:29:11 Make ProgramExecutableImpl managed by ProgramExecutable This change allows both parts of the program executable to be safely backed up and swapped on link. Bug: angleproject:8297 Change-Id: I17e4b6c05e4e481a66a227d6047dbf943d2c2603 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4812138 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Charlie Lao <cclao@google.com> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Shahbaz Youssefi 52fe3116 2023-07-17T16:20:54 Vulkan: Deduplicate share group's context set tracking Bug: angleproject:8224 Change-Id: I7a59a37229682fb91ff777f31e02e05d7ab2b80f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4690345 Reviewed-by: Charlie Lao <cclao@google.com> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Jamie Madill 0d203aef 2022-10-16T10:08:01 EGL: Add ID types for egl::Surface and egl::Image. This is in preparation for using resource maps for Context, Surface and EGLImage. The map change will make it much easier to work with the trace fixture. It will also have a small benefit in safety as we will longer be casting raw pointers for these types. As these objects are used in a lot of places, and simplified C can't handle unordered_map, it's necessary to index the maps by simple packed IDs in capture/replay code. Bug: angleproject:7758 Change-Id: Ib1d19622a4f2a6f0458cc28f5bbe30bb9f349b98 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3957163 Reviewed-by: Yuxin Hu <yuxinhu@google.com> Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Gert Wollny ce4e11d3 2022-06-17T12:21:01 libANGLE: Add a unique ID to the Surface This is needed when capturing Pbuffer calls. Bug: angleproject:4964 Change-Id: Id9f35683bf887f08f916de69bbab8c414e5e8872 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3711740 Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Gert Wollny <gert.wollny@collabora.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Charlie Lao 29bb612e 2020-05-28T10:32:26 Add egl::ShareGroup class to abstract the share context group Vulkan backend has a barrier tracker that tracks memory barrier needs of all shared resources. Because the buffer/texture objects are shared resources within a shared group, the tracker can not live in a context. Putting it in a device/renderer requires locks. It fits perfectly in a shareGroup object. The work is already done at API level to handle the mutex lock for shared context access so that no extra lock needs to be taken in the backend. This CL adds egl::ShareGroup class that represents the object that are shared among all share context group. At the front end this usually will include all the shared resource managers (not done in this CL). The ShareGroup object is accessible from gl::State object. This CL also adds ability for backend driver to allocate implementation specific ShareGroupImpl object. Vulkan backend will then use it to keeps the barrier tracker and other things that naturally fits the share group concept. Bug: angleproject:4664 Change-Id: Ifcd975cbdf5130022e21c41397894afc28f572e7 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2217252 Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Charlie Lao <cclao@google.com>
Geoff Lang 07467b4a 2020-03-20T10:40:56 Remove GL_CHROMIUM_path_rendering Bug: chromium:1063193 Bug: angleproject:4270 Change-Id: I35b24b7d8d892181955e49dd2495655bc57cb0df Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2112275 Reviewed-by: Zhenyao Mo <zmo@chromium.org> Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Shahbaz Youssefi 050b124d 2019-06-30T03:26:18 Reland "Vulkan: Debug overlay" This is a reland of e54d0f90d1a165404236fd7abd1b05ddd041a686 This was reverted due to a build failure as a result of a missing virtual destructor in the widget base class. Original change's description: > Vulkan: Debug overlay > > A debug overlay system for the Vulkan backend designed with efficiency > and runtime configurability in mind. Overlay widgets are of two > fundamental types: > > - Text widgets: A single line of text with small, medium or large font. > - Graph widgets: A bar graph of data. > > Built on these, various overlay widget types are defined that gather > statistics. Five such types are defined with one widget per type as > example: > > - Count: A widget that counts something. VulkanValidationMessageCount > is an overlay widget of this type that shows the number of validation > messages received from the validation layers. > - Text: A generic text. VulkanLastValidationMessage is an overlay > widget of this type that shows the last validation message. > - PerSecond: A value that gets reset every second automatically. FPS is > an overlay widget of this type that simply gets incremented on every > swap(). > - RunningGraph: A graph of last N values. VulkanCommandGraphSize is an > overlay of this type. On every vkQueueSubmit, the number of nodes in > the command graph is accumulated. On every present(), the value is > taken as the number of nodes for the whole duration of the frame. > - RunningHistogram: A histogram of last N values. Input values are in > the [0, 1] range and they are ranked to N buckets for histogram > calculation. VulkanSecondaryCommandBufferPoolWaste is an overlay > widget of this type. On vkQueueSubmit, the memory waste from command > buffer pool allocations is recorded in the histogram. > > Overlay font is placed in libANGLE/overlay/ which gen_overlay_fonts.py > processes to create an array of bits, which is processed at runtime to > create the actual font image (an image with 3 layers). > > The overlay widget layout is defined in overlay_widgets.json which > gen_overlay_widgets.py processes to generate an array of widgetss, each > of its respective type, and sets their properties, such as color and > bounding box. The json file allows widgets to align against other > widgets as well as against the framebuffer edges. > > Two compute shaders are implemented to efficiently render the UI: > > - OverlayCull: This shader creates a bitset of Text and Graph widgets > whose bounding boxes intersect a corresponding subgroup processed by > OverlayDraw. This is done only when the enabled overlay widgets are > changed (a feature that is not yet implemented) or the surface is > resized. > - OverlayDraw: Using the bitsets generated by OverlayCull, values that > are uniform for each workgroup (set to be equal to hardware subgroup > size), this shader loops over enabled widgets that can possibly > intersect the pixel being processed and renders and blends in texts > and graphs. This is done once per frame on present(). > > Currently, to enable overlay widgets an environment variable is used. > For example: > > $ export ANGLE_OVERLAY=FPS:VulkanSecondaryCommandBufferPoolWaste > $ ./hello_triangle --use-angle=vulkan > > Possible future work: > > - On Android, add settings in developer options and enable widgets based > on those. > - Spawn a small server in ANGLE and write an application that sends > enable/disable commands remotely. > - Implement overlay for other backends. > > Bug: angleproject:3757 > Change-Id: If9c6974d1935c18f460ec569e79b41188bd7afcc > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1729440 > Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> > Reviewed-by: Jamie Madill <jmadill@chromium.org> Bug: angleproject:3757 Change-Id: I47915d88b37b6f882c686c2de13fca309a10b572 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1780897 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Corentin Wallez fc58af47 2019-09-02T07:46:44 Revert "Vulkan: Debug overlay" This reverts commit e54d0f90d1a165404236fd7abd1b05ddd041a686. Reason for revert: causes compile failure on Linux CFI bot. Sample build: https://ci.chromium.org/p/chromium/builders/ci/Linux%20CFI/14810 Sample log: https://logs.chromium.org/logs/chromium/buildbucket/cr-buildbucket.appspot.com/8903575125463586160/+/steps/compile/0/stdout?format=raw Original change's description: > Vulkan: Debug overlay > > A debug overlay system for the Vulkan backend designed with efficiency > and runtime configurability in mind. Overlay widgets are of two > fundamental types: > > - Text widgets: A single line of text with small, medium or large font. > - Graph widgets: A bar graph of data. > > Built on these, various overlay widget types are defined that gather > statistics. Five such types are defined with one widget per type as > example: > > - Count: A widget that counts something. VulkanValidationMessageCount > is an overlay widget of this type that shows the number of validation > messages received from the validation layers. > - Text: A generic text. VulkanLastValidationMessage is an overlay > widget of this type that shows the last validation message. > - PerSecond: A value that gets reset every second automatically. FPS is > an overlay widget of this type that simply gets incremented on every > swap(). > - RunningGraph: A graph of last N values. VulkanCommandGraphSize is an > overlay of this type. On every vkQueueSubmit, the number of nodes in > the command graph is accumulated. On every present(), the value is > taken as the number of nodes for the whole duration of the frame. > - RunningHistogram: A histogram of last N values. Input values are in > the [0, 1] range and they are ranked to N buckets for histogram > calculation. VulkanSecondaryCommandBufferPoolWaste is an overlay > widget of this type. On vkQueueSubmit, the memory waste from command > buffer pool allocations is recorded in the histogram. > > Overlay font is placed in libANGLE/overlay/ which gen_overlay_fonts.py > processes to create an array of bits, which is processed at runtime to > create the actual font image (an image with 3 layers). > > The overlay widget layout is defined in overlay_widgets.json which > gen_overlay_widgets.py processes to generate an array of widgetss, each > of its respective type, and sets their properties, such as color and > bounding box. The json file allows widgets to align against other > widgets as well as against the framebuffer edges. > > Two compute shaders are implemented to efficiently render the UI: > > - OverlayCull: This shader creates a bitset of Text and Graph widgets > whose bounding boxes intersect a corresponding subgroup processed by > OverlayDraw. This is done only when the enabled overlay widgets are > changed (a feature that is not yet implemented) or the surface is > resized. > - OverlayDraw: Using the bitsets generated by OverlayCull, values that > are uniform for each workgroup (set to be equal to hardware subgroup > size), this shader loops over enabled widgets that can possibly > intersect the pixel being processed and renders and blends in texts > and graphs. This is done once per frame on present(). > > Currently, to enable overlay widgets an environment variable is used. > For example: > > $ export ANGLE_OVERLAY=FPS:VulkanSecondaryCommandBufferPoolWaste > $ ./hello_triangle --use-angle=vulkan > > Possible future work: > > - On Android, add settings in developer options and enable widgets based > on those. > - Spawn a small server in ANGLE and write an application that sends > enable/disable commands remotely. > - Implement overlay for other backends. > > Bug: angleproject:3757 > Change-Id: If9c6974d1935c18f460ec569e79b41188bd7afcc > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1729440 > Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> > Reviewed-by: Jamie Madill <jmadill@chromium.org> TBR=geofflang@chromium.org,syoussefi@chromium.org,jmadill@chromium.org Bug: angleproject:3757 Change-Id: Ib08e2e7b1a9449ca097673acb11655df5d2bbf31 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1778862 Commit-Queue: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Shahbaz Youssefi e54d0f90 2019-06-30T03:26:18 Vulkan: Debug overlay A debug overlay system for the Vulkan backend designed with efficiency and runtime configurability in mind. Overlay widgets are of two fundamental types: - Text widgets: A single line of text with small, medium or large font. - Graph widgets: A bar graph of data. Built on these, various overlay widget types are defined that gather statistics. Five such types are defined with one widget per type as example: - Count: A widget that counts something. VulkanValidationMessageCount is an overlay widget of this type that shows the number of validation messages received from the validation layers. - Text: A generic text. VulkanLastValidationMessage is an overlay widget of this type that shows the last validation message. - PerSecond: A value that gets reset every second automatically. FPS is an overlay widget of this type that simply gets incremented on every swap(). - RunningGraph: A graph of last N values. VulkanCommandGraphSize is an overlay of this type. On every vkQueueSubmit, the number of nodes in the command graph is accumulated. On every present(), the value is taken as the number of nodes for the whole duration of the frame. - RunningHistogram: A histogram of last N values. Input values are in the [0, 1] range and they are ranked to N buckets for histogram calculation. VulkanSecondaryCommandBufferPoolWaste is an overlay widget of this type. On vkQueueSubmit, the memory waste from command buffer pool allocations is recorded in the histogram. Overlay font is placed in libANGLE/overlay/ which gen_overlay_fonts.py processes to create an array of bits, which is processed at runtime to create the actual font image (an image with 3 layers). The overlay widget layout is defined in overlay_widgets.json which gen_overlay_widgets.py processes to generate an array of widgetss, each of its respective type, and sets their properties, such as color and bounding box. The json file allows widgets to align against other widgets as well as against the framebuffer edges. Two compute shaders are implemented to efficiently render the UI: - OverlayCull: This shader creates a bitset of Text and Graph widgets whose bounding boxes intersect a corresponding subgroup processed by OverlayDraw. This is done only when the enabled overlay widgets are changed (a feature that is not yet implemented) or the surface is resized. - OverlayDraw: Using the bitsets generated by OverlayCull, values that are uniform for each workgroup (set to be equal to hardware subgroup size), this shader loops over enabled widgets that can possibly intersect the pixel being processed and renders and blends in texts and graphs. This is done once per frame on present(). Currently, to enable overlay widgets an environment variable is used. For example: $ export ANGLE_OVERLAY=FPS:VulkanSecondaryCommandBufferPoolWaste $ ./hello_triangle --use-angle=vulkan Possible future work: - On Android, add settings in developer options and enable widgets based on those. - Spawn a small server in ANGLE and write an application that sends enable/disable commands remotely. - Implement overlay for other backends. Bug: angleproject:3757 Change-Id: If9c6974d1935c18f460ec569e79b41188bd7afcc Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1729440 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Michael Spang 5093ba67 2019-05-14T17:36:36 Implement resource management for GL_EXT_semaphore This implements glGenSemaphoresEXT, glDeleteSemaphoresEXT, and glIsSemaphoreEXT. It's not possible to do anything useful with them yet. Bug: angleproject:3289 Change-Id: I20ad90dbcd3fc573a4650c8531d6e1b8ccf7ca9b Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1623811 Commit-Queue: Michael Spang <spang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Michael Spang fb201c5e 2019-04-03T14:57:35 Implement resource management for GL_EXT_memory_object This implements glCreateMemoryObjectsEXT, glDeleteMemoryObjectsEXT, and glIsMemoryObjectEXT. It's not possible to do anything useful with them yet. Bug: angleproject:3289 Change-Id: I8882b657e9de564b5f97f8dea87838f67b1928f8 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1552025 Commit-Queue: Michael Spang <spang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 0c667215 2019-01-01T14:40:36 Pass ErrorSet to ContextImpl constructor. This removes the need for the setErrorSet method. Also update some egl::Error TODO bugs. Bug: angleproject:2491 Change-Id: I0aba07c4a53b579835a88c3dacae294f752e6b17 Reviewed-on: https://chromium-review.googlesource.com/c/1392393 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill c3dc5d48 2018-12-30T12:12:04 Merge gl::Context and gl::ContextState. This reduces the number of indrections when accessing the Extensions or Caps structures. It will provide a small speed-up to some methods. It also cleans up the code. Bug: angleproject:2966 Change-Id: Idddac70758c42c1c2b75c885d0cacc8a5c458685 Reviewed-on: https://chromium-review.googlesource.com/c/1392391 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Markus Tavenrath <matavenrath@nvidia.com>
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 cd7cd2a8 2018-07-19T11:25:54 Pass Context to EGLImage creation and Display to EGLImage initialization. BUG=angleproject:2507 Change-Id: I6c195434131709203f892be6037e974002c174c2 Reviewed-on: https://chromium-review.googlesource.com/1143453 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Geoff Lang 3cacf69b 2018-06-20T16:49:57 Pass all context creation parameters to DisplayImpl::createContext. Knowing the share context at native context creation time is required if we want to honor the requested share group instead of virtualizing contexts or using global share groups. BUG=angleproject:2464 Change-Id: I1fb4d71de266b3191986b1754e73d474e49445bb Reviewed-on: https://chromium-review.googlesource.com/1108743 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Corentin Wallez ad3ae90a 2018-03-09T13:40:42 Use packed enums for QueryType. BUG=angleproject:2169 Change-Id: I129a9d8e295859daa071a298dab9fe1895315cc0 Reviewed-on: https://chromium-review.googlesource.com/957318 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Jamie Madill e703c606 2018-02-20T10:21:48 Add gl::RenderbufferState shared state helper. This shared state will be read-only visible in the RenderbufferImpl class. It mirrors existing structs for Textures, Buffers, and other classes. It allows the implementation class to have a read-only view as to the current GL state of an object. This will be useful to the Vulkan back-end, which would like to know the current Renderbuffer state before having to redefine the storage. If the current parameters match, it might not have to redefine the storage at all. The solution involves passing around the gl::RenderbufferState through various factory methods. Also name the Renderbuffer implementation pointer consistently and make it use std::unique_ptr. Bug: angleproject:2347 Change-Id: Ied6e0358e24e74a7fedbe4aea692edee909b5838 Reviewed-on: https://chromium-review.googlesource.com/922457 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jeff Gilbert 3dddccff 2017-11-14T16:44:36 Support RGB gl-tex-external stream consumers for StreamProducerNV12. This makes it relatively simple to sample from a D3D11Texture of arbitrary format. From: https://bugzilla.mozilla.org/show_bug.cgi?id=1322746 BUG=angleproject:2233 TEST=angle_end2end_tests Change-Id: I10cd3043b5cb0c5d36dd613467ba6c0ceadf41af Reviewed-on: https://chromium-review.googlesource.com/758042 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Yunchao He a336b90f 2017-08-02T16:05:21 ES31: Impl program pipeline object management entries for GL backend. The program pipeline object management entries are: GenProgramPipelines DeleteProgramPipelines BindProgramPipeline IsProgramPipeline BUG:angleproject:2123 Change-Id: I114d054b90caf2ee3f9befef7439552a1c309bc4 Reviewed-on: https://chromium-review.googlesource.com/629978 Commit-Queue: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill 06ef36b9 2017-09-09T23:32:46 Add top-level state sync for Samplers. This also reformats the Sampler class to use a shared state struct with the implementation. It removes the call to sync the sampler state from the StateManagerGL::setGenericShaderState method, since it should all be handled at the front-end now. Also rename 'syncImplState' to 'syncState' methods. BUG=angleproject:1387 Change-Id: I5f0219b719aee99aaaa486ec188b2af0c9128e6a Reviewed-on: https://chromium-review.googlesource.com/648054 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill 70b5bb00 2017-08-28T13:32:37 Rename gl::FenceSync to gl::Sync. The spec refers to Sync objects, FenceSyncs being a subtype. The motivation for this fix is to clear up the FenceSync_ entry point for auto-generation. BUG=angleproject:1309 Change-Id: I94c440476d701628575e7a3eea68b6dd110f41c3 Reviewed-on: https://chromium-review.googlesource.com/636516 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 76b8f469 2017-04-21T12:23:40 Use a shared state for egl::Image. This allows us to stop duplicating some information in the impl. BUG=angleproject:1635 Change-Id: If8f7d2418571c3254729f48c463814ec18ed2644 Reviewed-on: https://chromium-review.googlesource.com/469153 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Jamie Madill a26c6b7c 2016-12-15T11:27:50 Surface: Make the egl::Config part of SurfaceState. This will be accessible to the Impl, so they won't have to store a copy of the pointer. BUG=angleproject:1319 Change-Id: I298a11a243d3d32f4c885273e55162e6862f3e16 Reviewed-on: https://chromium-review.googlesource.com/419697 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill 8f775607 2016-11-03T16:45:34 Introduce a gl::BufferState class. This state can share vital pieces of information with the impl. The most elementary state is the buffer size, which then the impl doesn't need to replicate. BUG=angleproject:1579 Change-Id: I341393c64a6e49de65c1d53b1bad2fa143209862 Reviewed-on: https://chromium-review.googlesource.com/406644 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Geoff Lang 2018c0ba 2015-12-08T11:48:51 Add a EGL_ANGLE_d3d_texture_client_buffer extension. Allows creation of pbuffers from D3D texture objects. BUG=540829 BUG=angleproject:1144 Change-Id: If8ea717ef011608cd01357c217837133d726d3ea Reviewed-on: https://chromium-review.googlesource.com/316804 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Geoff Lang 73bd218e 2016-07-15T13:01:24 Support virtualized contexts and transform feedback in Renderer11. Track buffer offets in the transform feedback object and dirty them when a buffer is bound. This fixes problems when a buffer is rebound at the same offset and maintains tracking between context switches. BUG=angleproject:1447 BUG=angleproject:1298 Change-Id: I2f890e3ad5edacab47f624a95a502615c86cc0c8 Reviewed-on: https://chromium-review.googlesource.com/360910 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Sami Väisänen e45e53bd 2016-05-25T10:36:04 Support CHROMIUM_path_rendering This is partial support for CHROMIUM_path_rendering and implements basic path management and non-instanced rendering. BUG=angleproject:1382 Change-Id: I9c0e88183e0a915d522889323933439d25b45b5f Reviewed-on: https://chromium-review.googlesource.com/348630 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 62baf0cf 2016-05-19T13:13:36 Add a shared egl::SurfaceState struct. This structure can share GL-level properties (immutably) with the implementation. BUG=angleproject:1369 Change-Id: I1e9406f18b6b88bb7db2a8f87b5e6d547cc7ecb1 Reviewed-on: https://chromium-review.googlesource.com/342061 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 53ea9cc6 2016-05-17T10:12:52 Replace rx::Renderer with rx::ContextImpl. Previously Context had no Impl class, but had a special relationship with the instanced Renderer class. Having a ContextImpl backing every Context will allow new designs to enable things like multithreading (where each ContextImpl stores a Context-specific device) or non- virtual Contexts on Android or other platforms where it is more efficient. A large refactoring patch that touches every back-end. BUG=angleproject:1363 Change-Id: Icb73a7d37447f08a664eeb499a310ba05d71a57e Reviewed-on: https://chromium-review.googlesource.com/342052 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Olli Etuaho 77ae8d57 2016-05-06T14:19:01 Share TextureState structure with TextureImpl This refactoring patch removes the need to pass texture state to methods of TextureImpl in some cases. It also adds target value to TextureState, and moves TextureState definition to Texture.h. The effective base level can now also be queried from TextureState, which reduces the need to pass it around. Two different code paths that dealt with the TextureStorage11 SRV cache are combined into one. Besides refactoring, this patch fixes applying mTopLevel twice when determining the amount of mip levels TextureStorage11. BUG=angleproject:596 TEST=angle_end2end_tests, angle_unittests Change-Id: I1add3d9ad847bec56774e394125156cf9cb0fc2a Reviewed-on: https://chromium-review.googlesource.com/342940 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Jamie Madill 7aea7e05 2016-05-10T10:39:45 Add EGLImplFactory. Also rename ImplFactory to GLImplFactory. This will allow us to use the same factory design pattern for EGL objects, and to use State helper classes to share data with Impls. BUG=angleproject:1363 BUG=angleproject:1369 Change-Id: I07a8fe40838d5d4ca32b04910c306edeab4d25a7 Reviewed-on: https://chromium-review.googlesource.com/342051 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 8415b5fd 2016-04-26T13:41:39 Pass ContextImpl to Framebuffer methods instead of ContextState. BUG=angleproject:1363 Change-Id: I7e7524d95f2ca31c35918f9fe5c0cb681ed93616 Reviewed-on: https://chromium-review.googlesource.com/340746 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 437fa654 2016-05-03T15:13:24 Add a ContextImpl class. This class can contain impl-specific functionality for a Context. This will eventually replace the Renderer class, and we can then start passing around a gl::Context instead of gl::ContextState. In D3D11, the ContextImpl could hold a DeferredContext, which would enable multi-thread rendering. In GL, we can implement non-virtual (native) Contexts. In Vulkan it might store the logical device. BUG=angleproject:1363 Change-Id: I39617e6d1a605d1a9574832e4d322400b09867ec Reviewed-on: https://chromium-review.googlesource.com/340745 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 3f572680 2016-04-26T13:41:36 Rename gl::VertexArray::Data to gl::VertexArrayState. BUG=angleproject:1363 Change-Id: I5acf670bd88988941676cc9bc75606d55cca224e Reviewed-on: https://chromium-review.googlesource.com/340744 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 15243d9b 2016-04-26T13:41:35 Rename gl::Shader::Data to gl::ShaderState. BUG=angleproject:1363 Change-Id: I49cb5d7319742487c8c00c58ec58f9a29561b9c1 Reviewed-on: https://chromium-review.googlesource.com/340743 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 48ef11b2 2016-04-27T15:21:52 Rename gl::Framebuffer::Data to gl::FramebufferState. Moving this out of the Framebuffer class allows us to forward- declare it. BUG=angleproject:1363 Change-Id: I91971c37a92151df508cdf7f0eb8c3e93506d112 Reviewed-on: https://chromium-review.googlesource.com/340741 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Olli Etuaho 82c47ad0 2016-04-20T18:28:47 Pass ImplFactory to Texture constructor This improves encapsulation inside the Texture class, and removes duplication of createTexture calls. This is a necessary step towards adding a shared "Data" structure to the Texture classes, following a similar pattern as for example the Framebuffer class. This patch also shares the same MockFactory class among different unit tests. BUG=angleproject:596 TEST=angle_unittests Change-Id: Ie8d3a9aa4ec35565d7ecbabb8c40e7b1ba068721 Reviewed-on: https://chromium-review.googlesource.com/340200 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Geoff Lang 0af0b81d 2015-09-23T13:56:25 Add a SamplerImpl object and implement it for the GL backend. Passes all tests in dEQP-GLES3.functional.samplers BUG=angleproject:1162 Change-Id: I7713031a677aac2b41889a6b4297ab512e184863 Reviewed-on: https://chromium-review.googlesource.com/301582 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill 006cbc5b 2015-09-23T16:47:54 Remove rx::ShaderSh and move the shared code to the GL. The GL layer can interact with the translator directly, to query all the active shader variables and call ShCompile. BUG=angleproject:1159 Change-Id: I334a9bef28f93cf85dd8cac0fb8542ac567cc3ec Reviewed-on: https://chromium-review.googlesource.com/299877 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tryjob-Request: Jamie Madill <jmadill@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 91445bce 2015-09-23T16:47:53 Make a shader Shader::Data state structure. This design follows the similar designs for Program, Framebuffer, etc. Because of the current design, share a mutable pointer with the Impl so the patch becomes a bit smaller and easier to review. In a follow- up patch we can move the shared code into the GL layer. BUG=angleproject:1159 Change-Id: Ib243e74779f23be51cdca80f1b5c6e5f3e36059d Reviewed-on: https://chromium-review.googlesource.com/299876 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 83f349ea 2015-09-23T09:50:36 Remove CompilerImpl and merge code to gl::Compiler. This class uses no Impl-specific code. We can also do a similar code relocation for the gl::Shader class, but in several steps because it is a bit more complex. BUG=angleproject:1159 Change-Id: I4d3ce3253df0a2bdee1d98e46cfd4b999d86be6e Reviewed-on: https://chromium-review.googlesource.com/299874 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Corentin Wallez 37c3979e 2015-08-20T14:19:46 Revert "Revert "Make the default framebuffer owned by Surface"" Reland the commit after fixing a bug in FramebufferAttachment. This reverts commit 18fdcbcf1d02d3b3b4b5c712f05058f2e8d629c6. BUG=angleproject:891 Change-Id: I07e08de52bfce8d84d070fc7bc15883009298a4d Reviewed-on: https://chromium-review.googlesource.com/294831 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Corentin Wallez <cwallez@chromium.org>
Jamie Madill 18fdcbcf 2015-08-19T18:12:44 Revert "Make the default framebuffer owned by Surface" Seems to be causing failures on the Mac GPU FYI bots. SurfaceTest.DestructionDeletesImpl seems to crash. BUG=angleproject:891 BUG=522557 This reverts commit 264ab56f2e70431e8310f9353952acd3b22b466f. Change-Id: I80aeecb8e191de011d9afe6534d0285dcffa82a3 Reviewed-on: https://chromium-review.googlesource.com/294540 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Corentin Wallez 264ab56f 2015-08-12T12:39:52 Make the default framebuffer owned by Surface Reland with a fix for SurfaceTest in angle_unittests and fixes for signed-unsigned warnings In CGL there is no notion of default Framebuffer and MakeCurrent only makes a context current but not a drawable. Instead, everything is done via render to texture. For that reason, different surfaces will have different FBOs as default framebuffers, which causes that change. BUG=angleproject:891 Change-Id: I0664896bc335b1a757226aaa212536b8f9d0f08f Reviewed-on: https://chromium-review.googlesource.com/293752 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Tested-by: Corentin Wallez <cwallez@chromium.org>
Corentin Wallez 11cd6af6 2015-08-18T15:54:01 Revert "Make the default framebuffer owned by Surface" Compilation warning on Windows This reverts commit 6cb2ae8292e69aa110c89e0465366b9f049c1168. Change-Id: I4ecadf5d8e909f986da186a7326cfa0922ae8710 Reviewed-on: https://chromium-review.googlesource.com/294241 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Tested-by: Corentin Wallez <cwallez@chromium.org>
Corentin Wallez 6cb2ae82 2015-08-12T12:39:52 Make the default framebuffer owned by Surface Reland with a fix for SurfaceTest in angle_unittests and fixes for signed-unsigned warnings In CGL there is no notion of default Framebuffer and MakeCurrent only makes a context current but not a drawable. Instead, everything is done via render to texture. For that reason, different surfaces will have different FBOs as default framebuffers, which causes that change. BUG=angleproject:891 Change-Id: Ie9a72de01a58e583a1bfa3f4a055debb860b912f Reviewed-on: https://chromium-review.googlesource.com/293713 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Corentin Wallez <cwallez@chromium.org>
Jamie Madill 5c6b7bfe 2015-08-17T12:53:35 Add a Program::Data shared state structure. Similar to the Framebuffer and other classes, this gives the Impl class a read-only view of the object's state. BUG=angleproject:1123 Change-Id: I580eaebe2de236adf8131d6e3f54633cecce8c25 Reviewed-on: https://chromium-review.googlesource.com/293760 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Corentin Wallez 1bf40bfe 2015-08-12T15:52:04 Revert "Make the default framebuffer owned by Surface" This reverts commit 87e63a9982803b5e4c12afa9a40ff0e2b04a7369. Speculative revert to fix the webgl cts on Windows D3D9 and the unittests on Linux. BUG= Change-Id: I488f4e0b2dc67270eed45f1c10bfba1d13c98739 Reviewed-on: https://chromium-review.googlesource.com/293350 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Tested-by: Corentin Wallez <cwallez@chromium.org>
Corentin Wallez 87e63a99 2015-08-12T12:39:52 Make the default framebuffer owned by Surface In CGL there is no notion of default Framebuffer and MakeCurrent only makes a context current but not a drawable. Instead, everything is done via render to texture. For that reason, different surfaces will have different FBOs as default framebuffers, which causes that change. BUG=angleproject:891 Change-Id: I3f6da7b587353316026ea39a5c87f91265e0f1ba Reviewed-on: https://chromium-review.googlesource.com/289872 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Corentin Wallez <cwallez@chromium.org>
Jamie Madill 8e34494f 2015-07-09T14:22:07 Share data between VertexArray and Impl. Using the same design as for the Framebuffer::Data helper, we can use a struct to share between the object and the Impl. This also gives the Impl access to the maxEnabledAttrib, and saves some duplicated storage. BUG=angleproject:1040 TEST=WebGL CTS, end2end_tests, unittests Change-Id: I55c91e8a5f3dcae302cab441182320aafd5375ef Reviewed-on: https://chromium-review.googlesource.com/283930 Tested-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill 4ef3c241 2015-04-02T11:36:01 Remove DefaultAttachment. This class is no longer necessary or used. BUG=angleproject:963 Change-Id: I5e6fa64822e637e1cc769be6fe777fa6e13a0d83 Reviewed-on: https://chromium-review.googlesource.com/263484 Reviewed-by: Kenneth Russell <kbr@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill f0d10f89 2015-03-31T12:56:52 Replace non-copyable macro with a helper class. This class provides a simpler scheme for blocking default copy and assignment operators. It also reduces the amount of code needed since it's inherited to child classes. This also fixes the conflict between our macro and the same-named macro in Chromium code. BUG=angleproject:956 Change-Id: If0dc72aa3f63fbc7b8fa34907418821c64c39e2f Reviewed-on: https://chromium-review.googlesource.com/263257 Tested-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Brandon Jones <bajones@chromium.org>
Geoff Lang 4ad1709f 2015-03-10T16:47:44 Implement FramebufferGL. BUG=angleproject:885 Change-Id: Ifb5818f185236c671cd7f20ed352edb887b49675 Reviewed-on: https://chromium-review.googlesource.com/258420 Reviewed-by: Kenneth Russell <kbr@chromium.org> Reviewed-by: Brandon Jones <bajones@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill bdd419f9 2015-03-20T15:29:42 Fix ResourceManager create-on-bind reallocations. *re-land with build fix for Clang* We had a funny bug where the Handle Allocator would re-allocate reserved handles after the app layer creates one with Bind rather than using Gen. This affects Textures, Buffers and Renderbuffers. Fix this by using a different allocation scheme. It should still be fast on the "good" case (using Gen) and use tree lookups on the bind case. Also add some unit tests. BUG=angleproject:942 Change-Id: I63ce608fcd6a11f92e2b5421f090551934e729ed Reviewed-on: https://chromium-review.googlesource.com/261591 Tested-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill 21045f5a 2015-03-20T19:28:45 Revert "Fix ResourceManager create-on-bind reallocations." Build break on GPU FYI Bots on Linux/Mac: http://build.chromium.org/p/chromium.gpu.fyi/builders/GPU%20Mac%20Builder/builds/28092 This reverts commit 61ce1a414e74f6a72a520d6adf59bff13aff03a0. Change-Id: If2e7fb35c769708a783a32932b777dc97eaba8a4 Reviewed-on: https://chromium-review.googlesource.com/261590 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 61ce1a41 2015-03-20T13:13:04 Fix ResourceManager create-on-bind reallocations. We had a funny bug where the Handle Allocator would re-allocate reserved handles after the app layer creates one with Bind rather than using Gen. This affects Textures, Buffers and Renderbuffers. Fix this by using a different allocation scheme. It should still be fast on the "good" case (using Gen) and use tree lookups on the bind case. Also add some unit tests. BUG=angleproject:942 Change-Id: I2e3f4c31b28cb86bd3699035f5d55568a2a1d7d5 Reviewed-on: https://chromium-review.googlesource.com/258904 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>