|
05b35b21
|
2017-10-03T09:01:44
|
|
D3D11: Lazy robust resource init.
This patch moves the robust resource init logic to the GL front-end.
Instead of initializing texture resources immediately on creation in
D3D11, it defers the clear until before a draw call in some cases, or
skips the update if we can determine if a texture (or other resource)
has been fully initialized.
Currently lazy init is only implemented for Textures, Renderbuffers,
and Surfaces.
Various places where lazy resource init is triggered:
* Framebuffer operations (Draw, Blit, CopyTexImage, Clear, ReadPixels)
* Texture operations (SubImage, GenerateMipmap, CopyTexImage)
Some efficiency gains remain to be implemented, such as when a
SubImage call fills the entire object. Similarly for Blit, and a few
other operations. In these cases we can skip lazy init as an
optimization. Edge cases with EGLImage are mostly untested.
BUG=angleproject:2107
Change-Id: I2bf3a69b1eae0d4feeb5b17daca23451f1037be8
Reviewed-on: https://chromium-review.googlesource.com/576058
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
|
|
81c2e253
|
2017-09-09T23:32:46
|
|
Add top-level dirty bits for texture and samplers.
These will have to be fleshed out in the back-ends.
Also currently uses a single bit for all the bindings, and we can
extend this to more fine-grained updates in the future.
This patch implements top-level updates for texture completeness.
Sampler completeness caches are removed from the Texture class, and
replaced by a cache in the gl::State class. The State class also
keeps a channel binding to the bound textures so it can be notified
when textures might change from complete <-> incomplete.
In future CLs we skip updating back-ends if texture state doesn't
change.
BUG=angleproject:1387
Change-Id: If580b4851303c86f3240e62891f5f6047eefb6a2
Reviewed-on: https://chromium-review.googlesource.com/648053
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
82ef774b
|
2017-08-08T17:44:58
|
|
Save layered multiview end-point's arguments into attachment's state
Handle glFramebufferTextureMultiviewLayeredANGLE calls by saving the
arguments into the attachment's state.
BUG=angleproject:2062
TEST=angle_end2end_tests
Change-Id: I9d7c0e00fe9e917ad2f9d903a39f30b2546dc7a3
Reviewed-on: https://chromium-review.googlesource.com/609960
Commit-Queue: Martin Radev <mradev@nvidia.com>
Reviewed-by: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
|
|
878c8b1e
|
2017-07-28T09:51:04
|
|
Handle viewport and scissor state changes for side-by-side framebuffers
Side-by-side framebuffers have viewport offsets as part of their state
which have to be applied to the viewport and scissor rectangles to
generate the final viewport and scissor rectangles of each view.
Whenever there is a transition to or from a side-by-side framebuffer,
viewport and scissor state has to be synced. Also, because rendering is
done on the same 2D texture the scissor test has to be always enabled to
guarantee that no fragments leak to a neighboring view.
The patch addresses this by extending the viewport and scissor state
in StateManagerGL to be a vector of rectangles instead of a single
rectangle. Two new dirty bits are added to cover changes in the viewport
offsets and whether the framebuffer has a side-by-side layout.
BUG=angleproject:2062
TEST=angle_end2end_tests
Change-Id: I8107d7ba97d06b20cf24358f19963fa494844592
Reviewed-on: https://chromium-review.googlesource.com/585012
Commit-Queue: Martin Radev <mradev@nvidia.com>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
|
|
9bc9a321
|
2017-07-21T14:28:17
|
|
Integrate multiview state in FBO completeness check
The patch extends the FBO completeness validation to include the
multiview state members according to the ANGLE_multiview specification.
It also changes the numViews in FramebufferAttachment to be consistently
of type GLsizei instead of GLint.
BUG=angleproject:2062
TEST=angle_end2end_tests
Change-Id: Ibe550ba03204d808d96a4edf4807c68421aa1158
Reviewed-on: https://chromium-review.googlesource.com/581193
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
|
|
5dae57b0
|
2017-07-14T16:15:55
|
|
Save side-by-side function arguments into attachment's state
Handle glFramebufferTextureMultiviewSideBySideANGLE calls by saving the
arguments into the attachment's state.
BUG=angleproject:2062
TEST=angle_end2end_tests
Change-Id: Idc5441d673b48640f47415b07b2854fbdf566c8d
Reviewed-on: https://chromium-review.googlesource.com/574915
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Olli Etuaho <oetuaho@nvidia.com>
|
|
e5285d29
|
2017-07-14T16:23:53
|
|
Handle ANGLE_multiview state queries
The patch extends glGetIntegerv and glGetFramebufferAttachmentParameteriv
logic to handle the new tokens from the ANGLE_multiview extension.
BUG=angleproject:2062
TEST=angle_end2end_tests
Change-Id: Ide145279cd7b58cd03502458d7d3a1a0f5e9e86d
Reviewed-on: https://chromium-review.googlesource.com/573780
Reviewed-by: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
|
|
4928b7ca
|
2017-06-20T12:57:39
|
|
Proliferate gl::Context everywhere.
This gives the D3D back-end access to the GL state almost anywhere.
This uses the onDestroy hook for Textures to push errors up from
destructors, although they still don't quite make it to the Context.
There are places, such as in EGL object (Context/Surface) destruction,
where we end up calling through to GL implementation internals without
having access to a gl::Context. We handle this via a proxy Context
to a Display, basically a null context, that has access to impl-side
state like the Renderer pointer if necessary. It does not have access
to the normal GL state.
Also Pass gl::Context to RefCountObject::release(). Since we're using
destroy() methods now, we should not ever call the destructor directly.
BUG=angleproject:1156
Change-Id: Ie4c32ad6bf6caaff0289901f30b5c6bafa2ce259
Reviewed-on: https://chromium-review.googlesource.com/529707
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
|
|
4fd95d54
|
2017-04-05T11:22:18
|
|
Stop using FramebufferAttachment::Target.
Target includes the binding (DEPTH/STENCIL/COLOR), which is not useful
for many operations. Simplify this to just passing the mip/layer.
This allows us to stop using this internal struct in other classes.
BUG=angleproject:1635
Change-Id: Ic5a11781bf45fe7835437fa1e363c190b876d453
Reviewed-on: https://chromium-review.googlesource.com/469152
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
1e5499db
|
2017-04-05T11:22:16
|
|
Refactor Signal utils into template classes.
This will allow us to pass on extra information to the receiving end,
such as the specific texture levels that are dirty.
BUG=angleproject:1635
Change-Id: Idb7ca1d625499e50e7712c458b694f6e9bfc0595
Reviewed-on: https://chromium-review.googlesource.com/453382
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
|
|
a02315b0
|
2017-02-23T14:14:47
|
|
WebGL Compat: Add DEPTH_STENCIL attachments.
This is a special WebGL 1 binding point, that does not correspond to
any native functionality. Due to particularities in validation we
need to represent this with additional state in the Framebuffer.
WebGL 2 fixes this oddity by resolving to the GLES 3 native spec.
In order to pass the WebGL framebuffer objects test, we will also
need a chromium-side CL to work with the additional state tracking
it does in the blink layer, and an additional patch to ANGLE to
clear the depth buffer before the first use (robust resource init).
BUG=angleproject:1708
Change-Id: I111f8f5a451cce7de6cf281a6bc335b92dd2daf2
Reviewed-on: https://chromium-review.googlesource.com/444095
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
|
|
57e6d50e
|
2016-12-09T14:46:39
|
|
FramebufferAttachment: make attach(nullptr) work like detach
Otherwise when trying to use a DEPTH texture for DEPTH_STENCIL,
attach(nullptr) gets called but the FramebufferAttachment still returns
true when isAttached is called.
BUG=angleproject:1523
Change-Id: I30b78aff619eb6cd63e0befac886bddc177a2e58
Reviewed-on: https://chromium-review.googlesource.com/418403
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
|
|
a3944d4f
|
2016-07-22T22:13:26
|
|
Add gl::Format to represent a texture/rb/surface format.
This has a few advantages: it preserves all the information of the
internal format, such as if it is sized or unsized. It also saves
looking up the format multiple times in the table, which should
improve speed in some cases.
The extra sized-ness information will allow us to perform the
correct validation in CopyTexSubImage calls.
BUG=angleproject:1228
Change-Id: I42954771b0a9a968f5d787b8cf6e0af721791855
Reviewed-on: https://chromium-review.googlesource.com/362626
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
362876b1
|
2016-06-16T14:46:59
|
|
Cache Framebuffer completeness.
Improves performance on the render-to-texture microbenchmark
by ~3x on the OpenGL back-end. Wipes out several of the top profling
hotspots on that benchmark.
BUG=angleproject:1388
Change-Id: I6a35a0b435b2ed3c83d32acdb9df090df98214ad
Reviewed-on: https://chromium-review.googlesource.com/348957
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
|
|
35170f5c
|
2016-05-25T12:57:38
|
|
Fix Renderer generator script.
This script breaks peridocially because we don't have automated tests
for it. Split the FBO attachment object class into its own file, and
also fix a couple other small snags that prevented the script from
running.
This will facilitate generating Vulkan renderer stubs.
BUG=angleproject:1319
Change-Id: I30a6ce4ab0adad962cea76731dbe82837c5c9a1b
Reviewed-on: https://chromium-review.googlesource.com/347064
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
086d59ae
|
2016-04-29T09:06:49
|
|
In ES3, validate that depth and stencil are the same image
BUG=605775
Change-Id: I9508c70a588270dae871dde79fea1df1c3fd1558
Reviewed-on: https://chromium-review.googlesource.com/341440
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
|
|
314f9b33
|
2015-08-20T14:13:20
|
|
FramebufferAttachment: do not attach with an uninitialized mResource
Otherwise attach will try to call onDetach on mResource, causing an UB
(and a segfault in most cases).
This fixes a crash when running angle_unittests on Mac with another
patch.
BUG=angleproject:891
Change-Id: I09d34d7246849059a13bc2fb00a61837cccd97d7
Reviewed-on: https://chromium-review.googlesource.com/294830
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Corentin Wallez <cwallez@chromium.org>
|
|
51706eae
|
2015-08-07T14:39:22
|
|
Make FramebufferAttachmentObject not refcountable
Re-land with a fix for an unitialized variable
Instead the refcount is done via callbacks. This allows Surface to
ignore this refcounting which will be useful in a follow-up CL.
BUG=angleproject:891
Change-Id: I1925ccaa4ce7b502b33088660d31c404b8313cb5
Reviewed-on: https://chromium-review.googlesource.com/293712
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Corentin Wallez <cwallez@chromium.org>
|
|
0020426e
|
2015-08-12T19:07:29
|
|
Revert "Make FramebufferAttachmentObject not refcountable"
BUG=
This reverts commit 19ba57469aa02074d094a9aef104f84d0b6d881e.
Change-Id: I5dce6c8a81570e22affbcaf32183a97c97849718
Reviewed-on: https://chromium-review.googlesource.com/293351
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Tested-by: Corentin Wallez <cwallez@chromium.org>
|
|
19ba5746
|
2015-08-07T14:39:22
|
|
Make FramebufferAttachmentObject not refcountable
Instead the refcount is done via callbacks. This allows Surface to
ignore this refcounting which will be useful in a follow-up CL.
BUG=angleproject:891
Change-Id: I39b028476e0e3ab1837c033e1121ea21e54d7970
Reviewed-on: https://chromium-review.googlesource.com/291651
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Tested-by: Corentin Wallez <cwallez@chromium.org>
|
|
2d06b738
|
2015-04-20T12:53:28
|
|
Store value types for FBO attachments.
*re-land with fix for Mac*
This prevents us from re-allocating FBO attachments every set.
This change requires quite a bit of refactoring.
BUG=angleproject:963
Change-Id: Ia1f83e3c427d446ddbe16c6703db136942149e91
Reviewed-on: https://chromium-review.googlesource.com/266691
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>
|
|
aed081ce
|
2015-04-21T13:55:21
|
|
Revert "Store value types for FBO attachments."
In file included from ../../third_party/angle/src/libANGLE/Framebuffer.cpp:10:
In file included from ../../third_party/angle/src/libANGLE/Framebuffer.h:13:
In file included from /Applications/Xcode5.1.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.6.sdk/usr/include/c++/4.2.1/vector:68:
/Applications/Xcode5.1.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.6.sdk/usr/include/c++/4.2.1/bits/stl_construct.h:81:38: error: call to implicitly-deleted copy constructor of 'gl::FramebufferAttachment'
::new(static_cast<void*>(__p)) _T1(__value);
^ ~~~~~~~
This reverts commit 13773b26dfb29b963ea727e1ebf7bdabdc5892b1.
Change-Id: If79f2797fe46798cbe5b39d83c9bcb1a7e87026d
Reviewed-on: https://chromium-review.googlesource.com/266643
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>
|
|
13773b26
|
2015-04-20T12:53:28
|
|
Store value types for FBO attachments.
This prevents us from re-allocating FBO attachments every set.
This change requires quite a bit of refactoring.
BUG=angleproject:963
Change-Id: Iafa4e4a0f3dd66c9e7452e0e96a0cbb9753487bb
Reviewed-on: https://chromium-review.googlesource.com/263489
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Brandon Jones <bajones@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>
|
|
5160ec11
|
2015-04-14T08:13:48
|
|
Squash the attachment types.
We can store all relevant information in the base class, which
lets us avoid using any virtual methods. This will finally let
us avoid using reallocations on FBO attachment sets.
BUG=angleproject:963
Change-Id: Ib4b61da14efaf843478b059499c01e34f9c65e4f
Reviewed-on: https://chromium-review.googlesource.com/263488
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Reviewed-by: Brandon Jones <bajones@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>
|
|
79481d65
|
2015-04-14T08:13:47
|
|
Add FramebufferAttachmentObject base class.
This lets us share objects (Textures/RBs/Surface) in the attachment
class. It will let us squash the attachment classes into one type,
which will in turn let us store them by-value, instead of by-pointer.
BUG=angleproject:963
Change-Id: Ia9a43dbc3b99475c00f6bc2ed5475deef55addc3
Reviewed-on: https://chromium-review.googlesource.com/263487
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>
|
|
8cf4a39b
|
2015-04-02T11:36:04
|
|
Return a ref for FBO attachment image indexes.
This cleans up the syntax somewhat. Also place some more of the
helper methods in the header.
BUG=angleproject:963
Change-Id: I62419095a7b65486f54d74791027594e8e595e48
Reviewed-on: https://chromium-review.googlesource.com/263629
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>
|
|
7936a6d3
|
2015-04-02T13:52:34
|
|
Move the texture index to attachment base.
This will let us squash the attachment types in a follow-up patch.
BUG=angleproject:963
Change-Id: I1efb2e41aa08766189499995b3150aec6fd61c4e
Reviewed-on: https://chromium-review.googlesource.com/263486
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>
|
|
f813eb46
|
2015-04-02T17:15:34
|
|
Revert "Revert "Move resource storage to attachment base.""
Fix in https://chromium-review.googlesource.com/#/c/263730/
This reverts commit 0d91328b99d2a8b2c3bfe45d64faad3e7907637c.
Change-Id: Ibab792001798eff94652345b7c12fb9a42cddb55
Reviewed-on: https://chromium-review.googlesource.com/263740
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>
|
|
0d91328b
|
2015-04-02T16:44:20
|
|
Revert "Move resource storage to attachment base."
Giving compile errors on Clang/OSX.
http://build.chromium.org/p/chromium.gpu.fyi/builders/GPU%20Mac%20Builder%20%28dbg%29/builds/30008
This reverts commit 7f67b030a8ae26e3ff54f6d33c655fc69c0b9fdb.
Change-Id: I5fb7d237c99ca9f2a8d50538f86dfc334d56ddd9
Reviewed-on: https://chromium-review.googlesource.com/263722
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>
|
|
7f67b030
|
2015-04-02T11:36:02
|
|
Move resource storage to attachment base.
We can use GetAs() to retrieve the corresponding API object.
BUG=angleproject:963
Change-Id: I472e13664e45f9f05621dea3d28135d4e833fb3d
Reviewed-on: https://chromium-review.googlesource.com/263485
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>
|
|
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>
|
|
c46f45d9
|
2015-03-31T13:20:55
|
|
Refactor DefaultAttachments.
Instead of using an Impl type for default attachments, store the
egl::Surface pointer where possible.
BUG=angleproject:963
Change-Id: I3e34849e8b1ccae0c91a79617ec6f64aaaab6b10
Reviewed-on: https://chromium-review.googlesource.com/263483
Tested-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
|
|
811b6352
|
2015-02-09T10:17:09
|
|
Add a script to generate a new Renderer.
Also refactor our current Impl headers slightly to facilitate
parsing by the generation script.
BUG=angle:905
Change-Id: Ib86cff71d18e7f911cf526b27b8a82757bacd738
Reviewed-on: https://chromium-review.googlesource.com/245497
Tested-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
|
|
c2e75afa
|
2015-01-05T14:26:24
|
|
Rename RenderTarget to RenderTargetD3D and move it into the d3d folder.
BUG=angle:681
Change-Id: I1946e01ce09d99405c318723c254fe300cc5ac53
Reviewed-on: https://chromium-review.googlesource.com/238471
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Tested-by: Geoff Lang <geofflang@chromium.org>
|
|
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>
|
|
a9be0dc6
|
2014-12-17T12:34:40
|
|
Refactor Texture to track image information for size and format queries.
BUG=angle:681
Change-Id: Ifb3f52d6348e4479181e66f1c39578f49e9dcf76
Reviewed-on: https://chromium-review.googlesource.com/235613
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Brandon Jones <bajones@chromium.org>
Tested-by: Geoff Lang <geofflang@chromium.org>
|
|
d8a2258c
|
2014-12-17T15:28:23
|
|
Remove all uses of "actual" formats.
BUG=angle:861
Change-Id: I7cd2d1a56772fdf18bcf926456399322d13e7a4f
Reviewed-on: https://chromium-review.googlesource.com/236305
Reviewed-by: Brandon Jones <bajones@chromium.org>
Tested-by: Geoff Lang <geofflang@chromium.org>
|
|
4f4207f7
|
2014-12-01T10:07:56
|
|
Make some FramebufferAttachment methods const.
BUG=angle:841
Change-Id: I4670e417c1976ebd2198ea4c8927a00fff7bb15c
Reviewed-on: https://chromium-review.googlesource.com/232380
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Geoff Lang <geofflang@chromium.org>
|
|
2b5420c0
|
2014-11-19T14:20:15
|
|
Merge libGLESv2 and libEGL classes into libANGLE.
BUG=angle:733
Change-Id: Ic491c971411fe82c56cd97c5c8325ac14ec218df
Reviewed-on: https://chromium-review.googlesource.com/230830
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Tested-by: Geoff Lang <geofflang@chromium.org>
|