|
a36f8bd4
|
2020-01-29T12:10:17
|
|
Mark MemoryBuffer allocation functions as NO_DISCARD
Not all call sites were checking the return value of
MemoryBuffer::resize, mark the return value as NO_DISCARD and fix all
the warnings.
BUG=chromium:1030835
Change-Id: I762796e3d11efc131a814069d78a195b0d4c9f8f
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2028151
Commit-Queue: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
4967de72
|
2019-03-20T10:35:11
|
|
Work around line loop streaming bug.
This forces a hard limit on the buffer size we allocate from D3D11. It
can work around a D3D11 driver bug on NVIDIA where we would get an
invalid map pointer. This seemed to happen when the buffer sizes were
close to MAX_UINT.
Bug: chromium:943087
Change-Id: I64aa9c55cbb82015101262c19c72741c140964a5
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1531374
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
|
|
7c985f5c
|
2018-11-29T18:16:17
|
|
Make angle::Result an enum.
This moves away from a class type to a value type. This should improve
performance when using angle::Result as a return value. Previously the
generated code would return a pointer instead of a value.
Improves performance in the most targeted microbenchmark by 10%. In
more realistic scanarios it will have a smaller improvement. Also
simplifies the class implementation and usage.
Includes some unrelated code generation changes.
Bug: angleproject:2491
Change-Id: Ifcf86870bf1c00a2f73c39ea6e4f05ca705050aa
Reviewed-on: https://chromium-review.googlesource.com/c/1356139
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
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>
|
|
156da4c9
|
2018-08-15T13:22:24
|
|
ParallelCompile: Make resource tracking thread-safe
ResourceManger11 tracks the total resource count and memoery size.
Such tracking can be concurrently updated from both main thread and
background thread. It can be thread-safe by using std::atomic types
instead.
Also ShaderCache in d3d9 adds a std::mutex to be safe.
Bug: angleproject:2771
Change-Id: Ia7cdcc7fd04579839a5d43e4a02adafb09e6078d
Reviewed-on: https://chromium-review.googlesource.com/1175547
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jie A Chen <jie.a.chen@intel.com>
|
|
7a5814e2
|
2018-07-27T08:12:50
|
|
D3D11: Use angle::Result error pattern. 3/3
This completes the initial refactor for the D3D11 back-end.
Bug: angleproject:2738
Change-Id: I6bc59d6a1a724b3c64d6cd904e6748c2acf8f67d
Reviewed-on: https://chromium-review.googlesource.com/1151452
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
|
|
26143fdd
|
2017-11-01T18:19:05
|
|
ES31: Support bindImageTexture on Texture2D for compute shaders on D3D
BUG=angleproject:1987
TEST=angle_end2end_tests
Change-Id: I3b0afb441a41dbd7f204b1d1bba7884c8d203ce1
Reviewed-on: https://chromium-review.googlesource.com/749004
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
192199a7
|
2017-11-14T16:12:20
|
|
ResourceManager11: Store resource sizes 64-bit.
This prevents possible size count overflow when in 32-bit mode with
a lot of very large resources.
Issue originally reported via Mozilla:
https://bugzilla.mozilla.org/show_bug.cgi?id=1412554
BUG=angleproject:2234
Change-Id: Idacfda98356c13bf22bc493ef7aa2bff1a287f97
Reviewed-on: https://chromium-review.googlesource.com/769749
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
a1506213
|
2017-09-21T10:49:18
|
|
Remove initialization of ImageD3D objects now that lazy init covers them
Inintialize all D3D11 texture allocations with dummy values in debug.
BUG=angleproject:2107
BUG=angleproject:1635
Change-Id: Ibcc6cc30480b32430563143f35f38dda16fdb83c
Reviewed-on: https://chromium-review.googlesource.com/678477
Commit-Queue: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
|
|
6260b7aa
|
2017-06-19T11:07:19
|
|
Fix kResourceTypeNames initialization
Due to a missing comma the kResourceTypeNames array contained a single
long (concatenated) string instead of NumResourceTypes independent
strings.
This incorrect initialization caused a crash in out-of-memory
situations, but this was only noticed on VC++ 2017 for some reason.
This fix adds the missing comma and uses a static_assert to ensure that
the array is initialized correctly.
BUG=chromium:727671,728226,731089
Change-Id: I9f0f3d3725b9f773505506513afb6c349db3a7fb
Reviewed-on: https://chromium-review.googlesource.com/539536
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
63fa2e94
|
2017-06-01T17:11:41
|
|
D3D11: Consolidate Query allocation.
This compiles the resource refactor for D3D11. The only remaining
non-smart handles are for things like SwapChains and ID3D11Blob.
This might be more easily managed by using angle::ComPtr or
similar smart pointers instead of the Resource Manager class.
BUG=angleproject:2034
Change-Id: I53c753a1c19b05c4e72859dd5046e3ed10866847
Reviewed-on: https://chromium-review.googlesource.com/506777
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
0fd806f1
|
2017-06-01T17:11:40
|
|
D3D11: Consolidate Shader allocation.
Similar to the InputLayout init, this adds a small helper type to act
as a wrapper around shader init data (binary and size).
This also adds error trapping to the blit shader compilation. It also
removes the LazyResource2 class, and the CompileXS helper methods.
BUG=angleproject:2034
Change-Id: I3fd718393c8a0250e4263890f00d0e9147ec9567
Reviewed-on: https://chromium-review.googlesource.com/506776
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
5978e28d
|
2017-06-02T11:49:31
|
|
D3D11: Consolidate InputLayout allocation.
This introduces a helper type to act as the initialization data type
for input element arrays. A WrappedArray class acts as a helper class
to wrap a C array and size into a C++ class, similar to std::array
but without the data storage.
Also move resource deallocation memory counting into a single code
path.
BUG=angleproject:2034
Change-Id: I5e108254777f0df65f5f60fe26e760c71b95b542
Reviewed-on: https://chromium-review.googlesource.com/506775
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
b7d5e303
|
2017-06-01T16:04:46
|
|
D3D11: Default init all textures.
The resource manager factory methods will use ClearView or zero-filled
buffers to set initial data. It assumes there are no 3D depth/stencil
textures. This will lead to some wasteful re-creation of RTVs in some
cases.
This is a temporary measure until we can implement more efficient
lazy resource init strategies.
BUG=angleproject:1635
Change-Id: I590e76587d3d96a359beedb79e21d24930e5f2e0
Reviewed-on: https://chromium-review.googlesource.com/503254
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
20805650
|
2017-05-25T12:20:59
|
|
D3D11: Consolidate state allocation.
This cleans up the allocation and deallocation of Blend, DepthStencil,
Rasterizer, and Sampler states.
This patch introduces a LazyResource2 class, basically a replacement
for LazyResource, which will be removed once the refactor is done.
BUG=angleproject:2034
Change-Id: I4fa759ae479807ff69a629f89a08b01800ba3f66
Reviewed-on: https://chromium-review.googlesource.com/503627
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
|
|
bdc1e2a2
|
2017-05-24T14:40:27
|
|
D3D11: Consolidate Buffer allocation.
We now allocate and release all buffer resources from a single place,
allowing us to allocate junk memory, clear on init, and track the
currently allocated buffer memory.
BUG=angleproject:2034
Change-Id: Id60b63a7f77bc369dfc494a7587ab06c8d34a8e2
Reviewed-on: https://chromium-review.googlesource.com/503253
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
2c479d6e
|
2017-05-24T14:37:22
|
|
D3D11: Use TextureHelper11 everywhere.
This consolidates all texture allocation into ResourceManager11.
It removes a lot of error checking and resource management code.
In a few places we're storing some redundant information, like in
TextureStorage11, we might store the Format pointer in two places,
or the Texture's size.
BUG=angleproject:2034
Change-Id: I9369e76925a67632c444c662e5667c5ed7875547
Reviewed-on: https://chromium-review.googlesource.com/503252
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
e0e009fe
|
2017-05-19T14:13:03
|
|
D3D11: Consolidate SRV allocation.
This change also moves all SRV storage to use the custom smart
pointer classes in ResourceManager11. Every single SRV is now
allocated in ResourceManager11. For TextureStorage11 and
RenderTarget11, we use a shared pointer type since the SRVs use
shared ownership by both classes.
BUG=angleproject:2034
Change-Id: I90666fbbbc23ff10870b7401f3da09ef79258136
Reviewed-on: https://chromium-review.googlesource.com/503250
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
764a1e76
|
2017-05-18T11:11:47
|
|
D3D11: Consolidate DSV allocation.
This uses the new classes introduced in ResourceManager11. Smart
pointers mean we can use ANGLE_TRY in more places, and don't need
to manually release these views. There is now a single point in the
D3D11 back-end where depth stencil views are allocated.
BUG=angleproject:2034
Change-Id: If0de2529ece1298e8babf24c07cc4be9849cc4de
Reviewed-on: https://chromium-review.googlesource.com/503249
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
403c1682
|
2017-05-18T11:11:46
|
|
D3D11: Add resource manager classes.
The resource manager tracks the allocations and deallocations of all
D3D11 resources that have device memory: Buffers and Textures (which
are either 2D or 3D). It also tracks the number of active Views (DSV,
RTV, and SRV, potentially UAV with ES 3.1).
A new smart pointer type will wrap the resource deallocation so that
the object notifies the manager when ANGLE is done with the resouce.
This allows us to track precisely how much GPU memory we think we're
using at any point, and will help prevent resource leaks for these
object types. It also makes initialization and releasing much more
trivial.
The base class for a resource uses a template template parameter so
that we can use a unique or shared pointer depending on if the object
in question needs unique or shared ownership. For some resources
(in our case, SRVs are shared between the TextureStorage11 and
RenderTarget11 classes, and Textures are shared in many places) we
need to have the ability to have shared ownership. Unique ownership is
a little bit more efficient so supporting both can be helpful.
In this patch RenderTargetView allocation is moved to use the unique
smart pointer.
BUG=angleproject:2034
Change-Id: Idb1245c24cd66733b8b5ca524c727350b2d2c745
Reviewed-on: https://chromium-review.googlesource.com/503248
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
|