This will mainly affect the Chromium bots.
BUG=angleproject:790
Change-Id: I0c4318e83eedba851f15b3b139551cdb6a2fde12
Reviewed-on: https://chromium-review.googlesource.com/346103
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
The pattern of gen context, share context, free context, then allocate
a shared GL object in the second context would cause a use-after-free
of the ContextImpl as a GLFactory. Fix this by passing the factory
as a parameter to the resource manager allocation methods instead of
storing the factory pointer. This allows the same ResourceManager to
work with separate Context implementations, which will work with
non-virtual contexts.
BUG=612931
Change-Id: Ifceeb893bebd072f318963d935ff9d17181f5305
Reviewed-on: https://chromium-review.googlesource.com/347463
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Currently enabled for Windows by default.
BUG=angleproject:1319
Change-Id: I87921c579bee466465fb1e3f629bb3a40fdff659
Reviewed-on: https://chromium-review.googlesource.com/328730
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
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>
We can consolidate exposing these extensions in initCaps. Otherwise
we have to maintain the lists in every Renderer back-end.
Also do the same treatment for select egl::Display extensions.
BUG=angleproject:1319
Change-Id: I529dd120c6d2cdbb789bd9dd20491e796e97f3f6
Reviewed-on: https://chromium-review.googlesource.com/345914
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
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>
We decided some time ago to make our lives easier and raise the
lower bound on the feature level to 10.1 from 10.0. This makes
using some multisample samplers easier in HLSL. It is also a very
small and poorly suppoted fraction of our userbase.
BUG=angleproject:1381
Change-Id: I25d330a6097f71ec772899d49ff5d3a97c0cb0d2
Reviewed-on: https://chromium-review.googlesource.com/346102
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
According to GLES 3.0.4 section 3.8.10, GenerateMipmap should generate
levels based on the base level, and generate them at most up to the
max level. Levels outside the base/max level range should be unchanged
by GenerateMipmap.
The Texture class is fixed so that the image descs are set only for
the changed mipmap range when GenerateMipmap is called.
The D3D backend is fixed so that mipmap generation is correctly
started from the base level instead of level 0, and making sure that
mipmaps are generated only up to the max level. Generating mipmaps for
array textures is also fixed for cases where the base level depth >=
max(width, height) * 2.
The GL backend is fixed to sync texture state before GenerateMipmap is
called, so that base level and max level are set correctly in the
driver.
The GenerateMipmap entry point is refactored so that it has a separate
validation function and a context function which does the work.
Validation for out-of-range base levels is added.
New tests are added to verify the functionality. One corner case in
the tests fails on NVIDIA GL drivers likely due to a driver bug -
similar rules for GenerateMipmap are found from newer GLES specs and
also OpenGL specs (checked versions 3.3 and 4.4).
BUG=angleproject:596
TEST=angle_end2end_tests
Change-Id: Ifc7b4126281967fc4f6dc4f9452e5b01e39f83d7
Reviewed-on: https://chromium-review.googlesource.com/344514
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
This will allow us to select the Impl constructor more easily
createWindowSurface
createPbufferSurface
createPbufferSurfaceFromClientBuffer
createPixmapSurface
This in turn lets us pass an EGLImplFactory to the constructor and
will allow us to pass in the local SurfaceState to the constructor.
BUG=angleproject:1369
Change-Id: I6b13c1548c54bd5c493d59b68bfdaf55226b6bb5
Reviewed-on: https://chromium-review.googlesource.com/342060
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
We were getting a compile warning due to variable shadowing from
redeclaring a local egl::Error. Fix this using the ANGLE_TRY macro.
BUG=angleproject:596
Change-Id: I38954bd1c9f171f264d7ecbf58d634ae721296ad
Reviewed-on: https://chromium-review.googlesource.com/346092
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Removed the tests that didn't fail in the latest 20 runs on the bots,
skipping a couple test categories that are known to flake with a very
low probability. Some flakes might still go through and will have to be
resuppressed later.
BUG=angleproject:504
BUG=angleproject:1027
BUG=angleproject:1032
BUG=angleproject:1051
BUG=angleproject:1092
BUG=angleproject:1093
BUG=angleproject:1095
BUG=angleproject:1097
BUG=angleproject:1101
BUG=angleproject:1143
BUG=angleproject:1323
BUG=angleproject:1324
Change-Id: I5943cd5bc125c64a45ad383c8bf22e48596a4f7e
Reviewed-on: https://chromium-review.googlesource.com/346050
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
The code didn't previously take base level properly into account
when determining how many levels to check when checking for texture
completeness.
The code is refactored so that the "q" value in spec, that is the
maximum mipmap level for determining completeness, can be queried from
TextureState. This value is used now for checking completeness.
This requires moving ImageDescs under TextureState. Functions that
operate on the ImageDesc array are also moved from Texture to
TextureState. TextureState members are also renamed to start with the
"m" prefix and made private.
Also handle levels outside the base/max level range consistently in
eglCreateImageKHR validation. We interpret the spec so that if the
level used for the EGL image is not a part of the texture levels that
affect texture completeness, an error is generated.
BUG=angleproject:596
TEST=angle_end2end_tests
Change-Id: I038ef24aa83e0a6905ca3c0bbada5989eecb00d9
Reviewed-on: https://chromium-review.googlesource.com/344880
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
This can be useful in the Vulkan back-end to make validation layer
errors cause test cases to fail.
BUG=angleproject:1319
Change-Id: I523f3c874e892a2646600e4c5c554319ed8d770c
Reviewed-on: https://chromium-review.googlesource.com/342050
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
This works around GL drivers that neglect to clamp the base level or
max level of immutable textures.
BUG=angleproject:596
BUG=610800
TEST=angle_end2end_tests
Change-Id: Ie4e04aaa9253f2befd73bccefa7759486b3ef487
Reviewed-on: https://chromium-review.googlesource.com/344590
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
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>
Remove unnecessary scale parameter from MipmapTestES3, and use the
GLColor class and EXPECT_PIXEL_COLOR_EQ instead of EXPECT_PIXEL_EQ for
greater readability.
BUG=angleproject:596
TEST=angle_end2end_tests
Change-Id: I79c30ce85be5d554d89197f8f1ce7ab0c51c11b6
Reviewed-on: https://chromium-review.googlesource.com/344513
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Different levels of the same texture may have different formats, so
changing the base level may affect the format that should be used for
the storage. Take this into account in the D3D backend.
The added test fails on some GL drivers.
TEST=angle_end2end_tests
BUG=angleproject:596
Change-Id: I5380e942694a75685ebb510edb01c0489e0d5179
Reviewed-on: https://chromium-review.googlesource.com/344230
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
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>
So we can run dEQP on the GL ES back end.
BUG=angleproject:1371
Change-Id: I7694d766f04997f9ba60ad0dd0bb4b30e714b4ae
Reviewed-on: https://chromium-review.googlesource.com/342843
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Frank Henigman <fjhenigman@chromium.org>
Samples and end2end tests mostly work. Only one config, and no input.
BUG=angleproject:1297
Change-Id: I5b69babccc5b97e486d86e1721a0a1740ad80941
Reviewed-on: https://chromium-review.googlesource.com/319460
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Frank Henigman <fjhenigman@chromium.org>
This should ensure that d3dcompiler_47.dll is saved into an isolate in
chromium, as it's used at runtime.
BUG=611235
Change-Id: I64801f00bf90f2be68c7a691724609bbf4d28dfa
Reviewed-on: https://chromium-review.googlesource.com/344351
Tryjob-Request: John Bauman <jbauman@chromium.org>
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: John Bauman <jbauman@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
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>
This file will allow ANGLE to update the build files and roll dEQP
in the same CL, making life a pleasure to live for maintainers.
BUG=chromium:605987
Change-Id: I8f574e80a5f7b176f08a9f51c2369e042cae56b7
Reviewed-on: https://chromium-review.googlesource.com/343010
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Previously we allowed copies to a sized format only if the depth of each
component matched (including 0 depth). Now we require that the bit depth of
non-empty component matches.
BUG=605775
Change-Id: If8abab886b0da5a1c8e89adabf3809f928dcedce
Reviewed-on: https://chromium-review.googlesource.com/340382
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
The size of the texture storage is now determined by extrapolating
the level zero texture dimensions from the base level dimensions.
This fixes crashing when images for levels below the base level are
not defined, and also fixes texture storage dimensions being
calculated wrong in case the levels outside the used level range have
dimensions that are inconsistent with the dimensions inside the used
level range.
Checking texture level completeness in TextureD3D is now done based on
the dimensions of the base level, and levels that are outside the base
level to max level range are not taken into account. Textures are
marked incomplete in case their base level is greater than their max
level.
Changing the base level can also affect the size of the storage
required for the texture. Old storage is now discarded when the base
level is changed and the new base level calls for different storage
dimensions.
Code in TextureD3D is refactored so that "base level" actually means
the base level of the texture specified through the GLES API, and
"level zero" is used where TextureD3D would sometimes previously use
"base level".
Changing either the base level or max level can also affect texture
completeness, so invalidate the cached completeness in Texture if
they are changed.
Some of the added tests are still failing on Intel and NVIDIA OpenGL
drivers because of driver bugs. Tests also fail on OSX.
BUG=angleproject:596
TEST=angle_end2end_tests,
dEQP-GLES3.functional.texture.* (no regressions),
dEQP-GLES3.functional.shaders.texture_functions.* (no regressions),
dEQP-GLES3.functional.state_query.texture.* (no regressions)
Change-Id: Icd73d6e29f84a341ed5ff36d5ec5cb2f469cb4e8
Reviewed-on: https://chromium-review.googlesource.com/333352
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
This was incorrectly acquiring every plane to texture 0.
BUG=angleproject:1332
Change-Id: I6df1401b705d903078e2631634b6bf20a07570de
Reviewed-on: https://chromium-review.googlesource.com/342513
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: John Bauman <jbauman@chromium.org>
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>