src/tests/gl_tests/D3DTextureTest.cpp


Log

Author Commit Date CI Message
Yunchao He 9550c603 2018-02-13T14:47:05 Code refactoring for end2end tests. This change: 1) uses the new style ANGLE_SKIP_TEST_IF to skip tests. 2) replaces compile-time definition for OSX to skip tests by run-time function IsOSX() to skip tests, in order to align with ANGLE_SKIP_TEST_IF. 3) fixes a couple of typos. BUG=angleproject:2005 Change-Id: I5af77d82257536b9eb79e26afa502f5b91ff6d31 Reviewed-on: https://chromium-review.googlesource.com/915861 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Brandon Jones f0d3b901 2018-02-08T08:57:14 Enable Multisample Sources in copyImageInternal For D3D11 This enables the copyTexImage2D and copyTexSubImage2D to handle multisampled source through through the blit path. We attempt to use a cached texture as an intermediate to resolve to, or create a new texture if there's a mismatch. The resolved texture is sent through blit11::copyTexture as normal. BUG:angleproject:2316 Change-Id: Ie3490b45b1a368300ee13fe5a0b35dc3920364ff Reviewed-on: https://chromium-review.googlesource.com/911889 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Olli Etuaho d66e1939 2018-01-17T11:36:24 Allow creating EGL pbuffers from typeless D3D textures A new extension EGL_ANGLE_d3d_typeless_texture_client_buffer is added that allows creating EGL pbuffers from typeless D3D textures. The extension increases the flexibility of the API compared to plain EGL_ANGLE_D3D_texture_client_buffer. The colorspace for the created EGL pbuffer can be set by using the EGL_GL_COLORSPACE attribute. Internally this sets the ANGLE format of the buffer. There are new ANGLE formats that are used specifically for typeless textures, separate ones for SRGB and linear views into the D3D textures. The extension is only supported on the D3D11 backend of ANGLE. BUG=angleproject:2300 TEST=angle_white_box_tests Change-Id: I6a6cb873d2cc0dca0b7f18a0f2cd35e7bafcb7d8 Reviewed-on: https://chromium-review.googlesource.com/873917 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Olli Etuaho ceffd20c 2018-01-08T16:39:45 Set colorspace of D3D pbuffers according to DXGI format When a EGL pbuffer is created based on a D3D SRGB texture using EGL_ANGLE_d3d_texture_client_buffer, SRGB conversions are performed as if it was an SRGB surface. The value of EGL_GL_COLORSPACE now reflects that correctly. If the pbuffer is bound to a texture and used as a framebuffer attachment, querying GL_FRAMEBUFFER_COLOR_ATTACHMENT also reflects that correctly. The behavior is the same on both the D3D backend, where there is no native interop involved, and on the GL backend using WGL_NV_DX_interop(2). There are a few limitations on the GL backend that relies on native interop: 1. SRGB conversion for textures created this way can't be disabled using the GL_FRAMEBUFFER_SRGB_EXT toggle that's exposed in ANGLE through EXT_sRGB_write_control. This is now documented in the EGL_ANGLE_d3d_texture_client_buffer spec. On the D3D backend this is not a problem since EXT_sRGB_write_control is not supported either way. 2. Creating a pbuffer out of a D3D11 texture with the format DXGI_FORMAT_B8G8R8A8_UNORM_SRGB does not work, even though it was listed as one of the supported formats in the EGL_ANGLE_d3d_texture_client_buffer spec. It's now mentioned that support for this format is optional. BUG=angleproject:2300 TEST=angle_white_box_tests Change-Id: I70ee0646680805e4469291a5b2ce59e92fda009e Reviewed-on: https://chromium-review.googlesource.com/866743 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Corentin Wallez 3acfc625 2017-12-12T13:25:40 Add test for Chromium's EGL_D3D_TEXTURE pbuffer creation When creating the pbuffer, Chromium specifies EGL_WIDTH and EGL_HEIGHT attributes that are unnecessary because they are extracted from the D3D11 texture passed as <buffer> to eglCreatePbufferFromClientBuffer. This is a regression test for crbug.com/794086 where a change to ValidateCreatePbufferFromClientBuffer made EGL_WIDTH and EGL_HEIGHT invalid for <buftype> EGL_D3D_TEXTURE and caused Chromium to fail creating the pbuffer, causing all black rendering. BUG=chromium:794086 Change-Id: I262fd0991e0f46f255aeac25528ddb4a62fa1309 Reviewed-on: https://chromium-review.googlesource.com/822296 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Sami Väisänen 935cb7c5 2017-11-08T15:53:41 Support B8G8R8A8_UNORM_SRGB as D3D11 texture format Support B8G8R8A8_UNORM_SRGB as D3D11 texture format. BUG=angleproject:2172 Change-Id: I2f15a55123601735d7fc6caa40bb056243a91b44 Reviewed-on: https://chromium-review.googlesource.com/758600 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Olli Etuaho a20af6d7 2017-09-18T13:32:29 Use C++11 raw string literals instead of SHADER_SOURCE macro This is better in many ways: 1. It doesn't confuse clang format 2. \n doesn't need to be included after preprocessor directives like the version directive. 3. It's using built-in functionality instead of something custom. Raw string literals should be the preferred way to include shader source in C++ files going forward. BUG=angleproject:2157 TEST=angle_end2end_tests Change-Id: I8b236a6e2d5c25d920297e5bc5b5b143eddeba1f Reviewed-on: https://chromium-review.googlesource.com/671046 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Jamie Madill 3ed60424 2017-09-07T11:32:52 Test using the same texture with multiple samplers. This covers a regression introduced with texture dirty bits. BUG=angleproject:1387 Change-Id: Ic8112718c185298ef54ec5a6f6ed2cd519e010d6 Reviewed-on: https://chromium-review.googlesource.com/653586 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill a42a4e5e 2017-08-28T14:02:12 D3D11: Copy external offscreen texture when required. In some cases ANGLE gets an external back buffer texture for our SwapChain11 class, and in some of these cases we get an offscreen texture that can't be used as a shader resource. The becomes a problem for some copy operations that use a shader to convert texture formats. Work around this problem by making a shadow copy of the texture that has sampling enabled - it is possible to use CopyResource to copy between them. BUG=chromium:752917 Change-Id: Ib757949d3d06295a118b055bf37311f820f7149c Reviewed-on: https://chromium-review.googlesource.com/638551 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Bryan Bernhart (Intel Americas Inc) caf20889 2017-07-05T15:26:44 Fix incorrect quality level with depth-stencil buffer and MSAA configs. Using a depth buffer format requires that the DSV and RTV have equal quality levels; otherwise, the bound render target will discard writes. BUG=angleproject:1917 Change-Id: Ife25b0a8958fa2b31b43a0d877d27e440916a9bf Reviewed-on: https://chromium-review.googlesource.com/560716 Reviewed-by: Bryan Bernhart <bryan.bernhart@intel.com> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Jamie Madill fe54834f 2017-06-19T11:13:24 Proliferate gl::Context. This enables a few small things: it will enable making the platform a property of the Display rather than a global. The same goes for the global logging annotator. Also it ensures all back-end implementations have access to the GL / EGL state when available. Also introduces a smart pointer helper class to angleutils for objects that prefer to be destroyed with a context (gl::Context/egl::Display) parameter. We were using std::unique_ptr in a few places that would not work well with these objects. BUG=angleproject:1156 Change-Id: I59e288a3d6f766ff8a0f4b48ff3a1fbf7489daba Reviewed-on: https://chromium-review.googlesource.com/529706 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Bryan Bernhart (Intel Americas Inc) 151d5de6 2017-04-13T09:52:23 Enable MSAA for texture client buffers Enhancement to the EGL_ANGLE_d3d_texture_client_buffer extension to allow use of a shared D3D texture that can be multi-sampled. BUG=angleproject:1917 Change-Id: Iaf59bbd575a5dfb29345f55b549bc4017bf2d7d0 Reviewed-on: https://chromium-review.googlesource.com/446907 Reviewed-by: Bryan Bernhart <bryan.bernhart@intel.com> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Geoff Lang 067cdb4a 2017-04-05T13:42:49 Create depth stencils for D3D texture EGL surfaces. BUG=angleproject:1144 Change-Id: I42d80293c06e40197fe100bcac31a5c6bd414edf Reviewed-on: https://chromium-review.googlesource.com/469106 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Jamie Madill 14154827 2017-02-14T13:53:26 Fix D3DTextureTest. This test was not releasing resource in the correct order. BUG=chromium:691136 Change-Id: Ie95c4d595eac49da2707afde033eff744131fcbe Reviewed-on: https://chromium-review.googlesource.com/442684 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Yuly Novikov 77c13aaf 2016-10-27T22:06:51 Disable D3DTextureTest on Windows Intel OpenGL BUG=angleproject:1585 Change-Id: I550750e0e94bd15c0b076f911d05f8dd92e4a202 Reviewed-on: https://chromium-review.googlesource.com/404499 Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Commit-Queue: Yuly Novikov <ynovikov@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>