src/libANGLE/renderer/d3d/FramebufferD3D.cpp


Log

Author Commit Date CI Message
Jamie Madill 19fa1c6f 2018-03-08T09:47:21 Return an Error from Framebuffer::syncState. This pipes errors up from the Impl to the top level. There are still a few places were error swallowing is needed, because the Framebuffer API doesn't support returning an error. Bug: angleproject:2372 Change-Id: Idc06bda1817fd28075940f69874d8b6ba69194f9 Reviewed-on: https://chromium-review.googlesource.com/954290 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Luc Ferron <lucferron@chromium.org>
Corentin Wallez 99d492c2 2018-02-27T15:17:10 Use packed enums for the texture types and targets, part 2 This completes the refactor by using the packed enums in the gl:: layer and in the backends. The packed enum code generation is modified to support explicitly assigning values to the packed enums so that the TextureTarget cube map faces are in the correct order and easy to iterate over. BUG=angleproject:2169 Change-Id: I5903235e684ccf382e92a8a1e10c5c85b4b16a04 Reviewed-on: https://chromium-review.googlesource.com/939994 Commit-Queue: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
JiangYizhou 10d41397 2017-12-18T18:13:36 Fix addDummyTextureNoRenderTarget workaround memory leak Add dummy attachment in FramebufferD3D as a private member and release the dummy attchment in destory of FramebufferD3D. BUG=angleproject:2282 TEST=FramebufferTest_ES31.RenderingLimitToDefaultFBOSizeWithNoAttachments/ES3_1_D3D11 TEST=dEQP-GLES31.functional.fbo.no_attachments.* Change-Id: I3a17282ef132185fbc25f4076f624e53661d4b20 Reviewed-on: https://chromium-review.googlesource.com/831847 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Brandon Jones 9fc87331 2017-12-13T15:46:52 Fix Bug in Intel Workaround Fixes an incorrect assert that is hit when trying to find a program output when none are present. It is valid to not have an output, so we should not check for an output when there are none. Bug:angleproject:2283 Change-Id: Ia640482870c6ee589a933b989272177760237e3b Reviewed-on: https://chromium-review.googlesource.com/825957 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill acf2f3ad 2017-11-21T19:22:44 Apply Chromium style fixes. This addresses several minor code quality issues that are validated in Chromium, but not yet applied to ANGLE: * constructors and destructors must be defined out-of-line * auto is not allowed for simple pointer types * use override everywhere instead of virtual * virtual functions must also be defined out-of-line Slightly reduces binary size for me (~2k on Win, 150k on Linux). Bug: angleproject:1569 Change-Id: I073ca3365188caf5f29fb28d9eb207903c1843e6 Reviewed-on: https://chromium-review.googlesource.com/779959 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
JiangYizhou 38d92b59 2017-09-13T13:47:52 Workaround Intel driver bug on D3D when renderering with no render target When rendering with no render target on D3D, two bugs lead to incorrect behavior on Intel drivers < 4815. The rendering samples always pass neglecting discard statement in pixel shader. Two bugs are listed bellow, 1. When a framebuffer has no attachments, the pixel shader will be recompiled to drop 'SV_TARGET'. On Intel drivers, when using a pixel shader with no 'SV_TARGET' in a draw, pixels are always generated even if they should be discard by 'discard' statements. 2. When a framebuffer has no attachments, ID3D11BlendState.RenderTarget [].RenderTargetWriteMask were set to 0 in angle. If RenderTargetWriteMask is 0 and rendertarget is not set, then rendering samples also pass neglecting discard statement in pixel shader on Intel. So we add a dummy texture as render target to workaround this issue. BUG=angleproject:2152 TEST=FramebufferTest_ES31.RenderingLimitToDefaultFBOSizeWithNoAttachments/ES3_1_D3D11 TEST=dEQP-GLES31.functional.fbo.no_attachments.* TEST=dEQP-GLES31.functional.state_query.integer.max_framebuffer* TEST=dEQP-GLES31.functional.state_query.integer.max_color_texture_samples_* TEST=dEQP-GLES31.functional.state_query.integer.max_depth_texture_samples_* TEST=dEQP-GLES31.functional.state_query.integer.max_integer_samples_* Change-Id: I1cb974703b6c05c39b731d147f7c8c4fb7b5fe68 Reviewed-on: https://chromium-review.googlesource.com/741544 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Kenneth Russell ce8602ab 2017-10-03T18:23:08 WebGL requires GL_FRAMEBUFFER_UNSUPPORTED for identical FBO attachments. If the same level of a texture is attached to multiple color attachments of a framebuffer object, for example, the WebGL conformance tests require generating a GL_FRAMEBUFFER_UNSUPPORTED error. The Direct3D backend already had this restriction; apply it to all backends when the WebGL compatibility extension is enabled. Fixes the following WebGL conformance tests with the pass-through command decoder in Chrome: conformance/extensions/webgl-draw-buffers-framebuffer-unsupported conformance2/rendering/framebuffer-unsupported BUG=angleproject:2168 Change-Id: I340d06ca0ee969989c6c5725512b1b9542281477 Reviewed-on: https://chromium-review.googlesource.com/699856 Commit-Queue: Kenneth Russell <kbr@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang c71ea661 2017-09-26T17:06:02 Return HALF_FLOAT as an implementation read type in ES3. BUG=765953 Change-Id: I4dc79921766975cd75c489887b7e57ec4666fbbb Reviewed-on: https://chromium-review.googlesource.com/685897 Reviewed-by: Zhenyao Mo <zmo@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Jamie Madill d4826159 2017-09-21T11:18:59 Vulkan: Only init RenderPass once per frame. This saves some time spent in the driver, by making multiple draw calls happen inside a single RenderPass. This also makes the ReadPixels impl method non-const. I think in the future we should avoid making const Impl methods unless they're totally trivial. BUG=angleproject:1898 Change-Id: I39172270a2f7dc5c1c2e3d4cc50af3bac8a29fa1 Reviewed-on: https://chromium-review.googlesource.com/672148 Reviewed-by: Frank Henigman <fjhenigman@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Jamie Madill 805d281a 2017-09-20T13:21:42 D3D11: Fix ClearBufferiv with STENCIL. For some reason we were using the second GLint value passed into the method, when the spec says we should have a single clear value. Noticed when adding tests for lazy robust resource init (tests will be added in a subsequent patch). BUG=angleproject:2107 Change-Id: Iadfc5072796255072bfb71ff1918253045e29576 Reviewed-on: https://chromium-review.googlesource.com/675049 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Frank Henigman <fjhenigman@chromium.org>
JiangYizhou 5b03f475 2017-01-09T10:22:53 ES31: Implement getMultisamplefv for D3D part. Implement getMultisamplefv for d3d part.Because standard D3D sample positions from https://msdn.microsoft.com/en-us/library/windows/ desktop/ff476218.aspx are fixed sample pattern,we put the sample positions into a constant array in renderer11_utils.cpp with a function to query it. BUG=angleproject:1590 TEST=dEQP-GLES31.functional.texture.multisample.samples_*.sample_position Change-Id: I6e6006ed1c4e22fe006522e9ffd3297247bee75e Reviewed-on: https://chromium-review.googlesource.com/594970 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Frank Henigman 739bd8ba 2017-06-19T21:02:27 Clip FramebufferD3D::readPixels to framebuffer. In GL, ReadPixels() is allowed to modify memory that corresponds to pixels outside the framebuffer. In WebGL it must not do that, so clip the read area to the framebuffer. Enable corresponding test. BUG=angleproject:1815 Change-Id: Ie99401a2102c352ffb1193a57aa66a5b96c184aa Reviewed-on: https://chromium-review.googlesource.com/540556 Commit-Queue: Frank Henigman <fjhenigman@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Corentin Wallez db9e5d31 2017-06-12T12:05:45 D3D11: Only apply attachments that are written by the program This works around a bug in the AMD driver that writes 0's to the first attachment if it isn't written by the pixel shader. BUG=angleproject:2048 Change-Id: I384fd60c0e0a37fbc0fd7b69fe1ec74fe4ffac8f Reviewed-on: https://chromium-review.googlesource.com/531630 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Jamie Madill 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>
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>
Jamie Madill c564c070 2017-06-01T12:45:42 Pass gl::Context to impl methods instead of ContextImpl. In some cases we might have to call back into the GL layer, passing the Context, and if we just have a ContextImpl pointer this isn't possible. It also removes the need for SafeGetImpl. BUG=angleproject:2044 Change-Id: I6363e84b25648c992c25779d4c43f795aa2866d6 Reviewed-on: https://chromium-review.googlesource.com/516835 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 231c7f56 2017-04-26T13:45:37 Apply clang-format to many files. This cleans up the formatting in many places. BUG=None Change-Id: I6c6652ebc042f1f0ffecced53582d09d66b4f384 Reviewed-on: https://chromium-review.googlesource.com/487884 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Shahmeer Esmail 5416f753 2017-03-09T22:02:43 Clear11 Shader Optimizations and Shader Management Rework - ClearShader made into a class that manages all required shaders and input layouts for clears - ClearShader reuses VS for all clear types. This reduces shader compilation time and memory usage significantly - Use constantBuffer for color/z values instead of VB to decouple VB & VS from clearType and allowing for the same VS to be used for multiple clear types - FL10+ Devices: Generate positions using SV_VertexID in VS to avoid having to bind VB. - FL93 Devices: Use an immutable VB containing only position data (SV_VertexID not supported) - Implement CB cache. Incoming color/Z values checked against cache and CB/cache only updated if there is a mismatch. Significantly reduces the frequency of expensive CB map/rename operations especially in common scenarios where most/all clears use the same color/z values BUG=angleproject:1935 Change-Id: I2015fbdcc135ba08b65dbecbe9c62499c2801037 Reviewed-on: https://chromium-review.googlesource.com/453882 Commit-Queue: Shahmeer Esmail <shahmeer.esmail@intel.com> Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 876429b7 2017-04-20T15:46:24 Update gl2.h and update entry points. Some method signatures were updated. Types like GLclampf and GLvoid were replaced with other equivalents. BUG=angleproject:1309 Change-Id: I05e8e2072c5a063d87ad96a855b907424661e680 Reviewed-on: https://chromium-review.googlesource.com/475011 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Yunchao He 4f285443 2017-04-21T12:15:49 Refactoring: replace NULL by nullptr for pointers (2nd CL). This CL mainly handles the pointer comparisons (== or !=). BUG=angleproject:2001 Change-Id: I25ac3b61032e7ad91459a1c6541cadc87cf9b160 Reviewed-on: https://chromium-review.googlesource.com/483935 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Yunchao He d7297bfb 2017-04-19T15:27:10 Code refactoring: replace NULL by nullptr for pointers. This is the frist change to replace NULL by nullptr. It handles the initialization and assignment for pointers. BUG=angleproject:2001 Change-Id: I6d4bb198a72e38b867cd2f65a6e6f2f61339a0b5 Reviewed-on: https://chromium-review.googlesource.com/481600 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Geoff Lang ca27139e 2017-04-05T12:30:00 Key the format tables on internal format and type. Keying the format tables on internal format alone is not enough to fully validate the unsized formats which require additional type information. This CL has no functional changes, it just splits the tables and updates the calls to GetInternalFormat info to provide type information when the format is not sized. BUG=angleproject:1523 BUG=angleproject:1958 BUG=angleproject:1228 Change-Id: I37e5201e7f54fa8eca01b8a6e64b11a6b94484e7 Reviewed-on: https://chromium-review.googlesource.com/468449 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 6de51858 2017-04-12T09:53:01 Optimize angle::BitSetIterator. Adds a new custom bitset template to handle packing as many bits as possible into a single variable. Intelligently select the right class depending on platform features and bit sizes. For now, always use a packed 64-bit set on 64-bit, instead of using a 32-bit set for smaller bitsets. BUG=angleproject:1814 Change-Id: I3ffef815c15515555833f6fc9302d8a4eee5423b Reviewed-on: https://chromium-review.googlesource.com/471827 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 20e005b2 2017-04-07T14:19:22 Rename BitSetIterator.h to bitset_utils.h BUG=angleproject:1814 Change-Id: I152ae13b6b7cf0ba72259967f0f124e199b20e07 Reviewed-on: https://chromium-review.googlesource.com/471826 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill dd43e6cd 2017-03-24T14:18:49 Pass Context to VertexArray and Framebuffer syncstate. This will enable more Vulkan-friendly idioms like clearing the vulkan pipeline caches correctly on GL state changes immediately because we have access to the ContextVk. BUG=angleproject:1898 Change-Id: I16c848d8abdde8e26a38d384e565cec8548a66d0 Reviewed-on: https://chromium-review.googlesource.com/459079 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
JiangYizhou bddc46b4 2016-12-09T09:50:51 ES31: Implement multisampled Textures. Implement TexStorage2DMultisample and getMultisamplefv entry point. Also modify sample state for Textures and Framebuffers. BUG=angleproject:1590 TEST=angle_unittests TEST=angle_end2end_tests TEST=dEQP-GLES31.functional.texture.multisample.samples_*.sample_position TEST=dEQP-GLES31.functional.texture.multisample.samples_*.use_texture_color_2d TEST=dEQP-GLES31.functional.texture.multisample.samples_*.use_texture_depth_2d TEST=dEQP-GLES31.functional.texture.multisample.negative.fbo_attach_different_sample_count_tex_tex TEST=dEQP-GLES31.functional.texture.multisample.negative.fbo_attach_different_sample_count_tex_rbo TEST=dEQP-GLES31.functional.texture.multisample.negative.fbo_attach_non_zero_level TEST=dEQP-GLES31.functional.texture.multisample.negative.texture_high_sample_count TEST=dEQP-GLES31.functional.texture.multisample.negative.texture_zero_sample_count TEST=dEQP-GLES31.functional.shaders.builtin_functions.texture_size.samples_1_texture_2d TEST=dEQP-GLES31.functional.shaders.builtin_functions.texture_size.samples_4_texture_2d Change-Id: I8fa7bd4e73b95745858a3e16b1b92004b4a18712 Reviewed-on: https://chromium-review.googlesource.com/414309 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Yunchao He <yunchao.he@intel.com> Reviewed-by: Geoff Lang <geofflang@chromium.org>
He Yunchao acd1898e 2017-01-04T10:46:42 Replace Error(GL_NO_ERROR) with NoError(). In order to make the errors be consistent throughout ANGLE. BUG=angleproject:1686 Change-Id: I0a2d86091d640aedeac94beae345c1fb6971b00d Reviewed-on: https://chromium-review.googlesource.com/424835 Commit-Queue: Yunchao He <yunchao.he@intel.com> Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
He Yunchao 6be602dc 2016-12-22T14:33:07 Some improvements for BlitFramebuffer. This change can 1. Skip color blitting when draw buffers are disabled. 2. Skip depth/stencil blitting when depth/stencil buffer has no image. 3. Return early if possible. 4. Move the logic above from D3D backend to common part. BUG=angleproject:1677 Change-Id: I1662d214b72fb8caa4a95c86d9b8a67984b6071a Reviewed-on: https://chromium-review.googlesource.com/423135 Commit-Queue: Yunchao He <yunchao.he@intel.com> Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Corentin Wallez 886de369 2016-09-27T10:49:35 Factor code between PixelUnpackState and PixelPackState BUG=angleproject:1512 Change-Id: I4c60472d216bfc5198e635d70fd197a5738dde98 Reviewed-on: https://chromium-review.googlesource.com/390133 Commit-Queue: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang f607c60a 2016-09-21T11:46:48 Fix validation of ReadPixels format and type. The validation for ReadPixels allows for two combations of format/type: 1. Based on the current framebuffer's component type. * GL_RGBA/GL_UNSIGNED_BYTE if the framebuffer is a normalized (signed or unsigned). * GL_RGBA_INTEGER/GL_INTEGER if the framebuffer is an integer format. * GL_RGBA_INTEGER/GL_UNSIGNED_INTEGER if the framebuffer is an unsigned integer format. * GL_RGBA/GL_FLOAT if the framebuffer is any type of float framebuffer (added in EXT_color_buffer_float). * These combations are detailed in the ES2 spec on pg 105 or ES3 on pg 193. 2. The implementation read format/type returned from glGetIntegerv. * These formats are added by specs, OES_texture_float, EXT_texture_rg, EXT_read_format_bgra, etc. Update the GL and D3D backends to perform the conversion from GL_HALF_FLOAT to GL_HALF_FLOAT_OES. Continue allowing reading as BGRA_EXT to support Skia. Should be removed in the future. BUG=607283 BUG=angleproject:1478 Change-Id: I0312cad4d5f138ab036f383d221f8ccd19a77f6d Reviewed-on: https://chromium-review.googlesource.com/346232 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Geoff Lang b21e20da 2016-07-19T15:35:41 D3D: Validate that all color attachments are unique. The previous logic of only checking the currently enabled draw buffers was incorrect. Also updated the logic to be more lenient and allow multiple slices or mips of the same texture. BUG=483282 Change-Id: I0d406d1a9a96e48342baefbaf11e0c2ecc6d390c Reviewed-on: https://chromium-review.googlesource.com/361533 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Geoff Lang 4b7f12b2 2016-06-21T16:47:07 FramebufferD3D: Only make sure that enabled attachments are not the same. It's acceptable to have the same object attached to muliple framebuffer attachments if they are not being drawn to. This was triggering failures in the conformance2/state/gl-object-get-calls.html test. BUG=483282 Change-Id: If088ccd9b1189f060dfa33ebbe4d82f1f47559b0 Reviewed-on: https://chromium-review.googlesource.com/354570 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Olli Etuaho 989cac34 2016-06-08T16:18:49 Validate that unpack skip is in bounds Unpack skip needs to be taken into account when determining which part of the unpack buffer is read. This is now done in the out-of-bounds check when validating texture upload calls. Unpack skip code is removed from D3D9 backend, since skip is not supported in GLES2. BUG=angleproject:1411 TEST=angle_end2end_tests Change-Id: I0db4db0877a352613c57e2820e5b650edb5a73ab Reviewed-on: https://chromium-review.googlesource.com/352450 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Jamie Madill dfde6abf 2016-06-09T07:07:18 Context: Remove mutable gl::State getter. This will preserve layering - the API layer doesn't mutate the state directly, it passes the API call through to the Context. Is also removes the possiblity of any shenanigans of the Validation layer changing the GL state. Also, this CL refactors a few validation entry points to take ValidationContext instead of Context. ValidationContext will be the correct way to interact with the gl::Context in the Validation code. Finally, additional refactorings make ContextState a proper class with private data. This allows the ContextState itself to keep a mutable pointer to the gl::State, so ValidationContext can modify it if necessary (and it will be necessary for Framebuffer completeness caching). BUG=angleproject:1388 Change-Id: I86ab3561573caa9535c8d1b8aad4ab3d0e7cd470 Reviewed-on: https://chromium-review.googlesource.com/348954 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Olli Etuaho 95faa233 2016-06-07T14:01:53 Do not apply UNPACK_SKIP_IMAGES for 2D textures on D3D Resubmitted with test skip added for Intel OpenGL. GLES 3.0.4 section 3.8.3: "For the purposes of decoding the texture image, TexImage2D is equivalent to calling TexImage3D with corresponding arguments and depth of 1, except that UNPACK_SKIP_IMAGES is ignored." An "applySkipImages" boolean parameter is added to the functions in the D3D backend that apply skip offset to the unpack pointer. In case 2D texture data is uploaded, the parameter is set to false and UNPACK_SKIP_IMAGES is not applied. BUG=angleproject:1406 TEST=angle_end2end_tests Change-Id: I5878439e3d38dbae89cc2452a056c2d6bbf9e0b3 Reviewed-on: https://chromium-review.googlesource.com/351330 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Geoff Lang a1d6c4dc 2016-06-09T18:00:42 Revert "Do not apply UNPACK_SKIP_IMAGES for 2D textures on D3D" The Windows Intel GPU FYI bot started failing the Texture2DTestES3.UnpackSkipImages2D/ES3_OPENGL test after this CL. Example: https://build.chromium.org/p/chromium.gpu.fyi/builders/Win7%20Release%20%28New%20Intel%29/builds/866 This reverts commit ac3575b27296398baebeb6c891871c6dac7df338. Change-Id: I5120261f5cf1ece9b21e4a94f63f85e014d2d8e4 Reviewed-on: https://chromium-review.googlesource.com/351280 Reviewed-by: Geoff Lang <geofflang@chromium.org>
Olli Etuaho ac3575b2 2016-06-07T14:01:53 Do not apply UNPACK_SKIP_IMAGES for 2D textures on D3D GLES 3.0.4 section 3.8.3: "For the purposes of decoding the texture image, TexImage2D is equivalent to calling TexImage3D with corresponding arguments and depth of 1, except that UNPACK_SKIP_IMAGES is ignored." An "applySkipImages" boolean parameter is added to the functions in the D3D backend that apply skip offset to the unpack pointer. In case 2D texture data is uploaded, the parameter is set to false and UNPACK_SKIP_IMAGES is not applied. BUG=angleproject:1406 TEST=angle_end2end_tests Change-Id: Iedc2b05377adee8d5c2504511a87421f4b1db18d Reviewed-on: https://chromium-review.googlesource.com/350465 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Jamie Madill e2e406c3 2016-06-02T13:04:10 Add base::numerics for safe math and conversions. This replaces are "IsUnsignedXXXSafe" family of methods. Also add overflow checks to unpack block sizes. BUG=angleproject:1397 Change-Id: Ib47be149b0486c70f795b0d0f8899441faac9340 Reviewed-on: https://chromium-review.googlesource.com/348062 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 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>
Jamie Madill 9082b982 2016-04-27T15:21:51 Rename gl::Data to gl::ContextState. Part of the new world order of renaming the Obj::Data classes to ObjState. BUG=angleproject:1363 Change-Id: I15cf002b8b093d687f540b9e86f045874af24a7e Reviewed-on: https://chromium-review.googlesource.com/340740 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Geoff Lang a15472a3 2015-08-11T11:48:03 Fix bugs with drawbuffer state. * IsAttachmentEnabled was checking the wrong draw buffer state. Instead of checking that drawbuffer[colorAttachment] is in use, it should have been scanning for a drawbuffer state that points to colorAttachment. * Allow for maxDrawBuffer != maxColorAttachments. Tested by the GL backend on some systems that don't have the draw buffers extension. Fixed by updating the helpers and adding a new getDrawBuffer helper. BUG=angleproject:1121 Change-Id: Idd1b0a9ec4a3f944d332c708364408bf5d59e1fd Reviewed-on: https://chromium-review.googlesource.com/292740 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Tryjob-Request: Geoff Lang <geofflang@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill 60ec6ea7 2016-01-22T15:27:19 Implement dirty bits for Framebuffer. The dirty bits set the stage for performance improvements in D3D, but don't actually reduce any of the redundant work just yet. BUG=angleproject:1260 Change-Id: Ib84e6a9b7aa40c37c41790f492361b22faaf4742 Reviewed-on: https://chromium-review.googlesource.com/318730 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tryjob-Request: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Dian Xiang 4028159e 2015-11-19T18:24:44 Using dirty bit notification for D3D11 viewport state BUG=angleproject:1161 This is a continuation of the dirty bit refactor Change-Id: I101f415094dd406f6b0a40cb260f1cbbfec7b62c Reviewed-on: https://chromium-review.googlesource.com/313249 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Tryjob-Request: Dian Xiang <dianx@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Dian Xiang <dianx@google.com>
Jamie Madill cc86d64e 2015-11-24T13:00:07 Make Framebuffer size check ES2-only. This is an ES2-only incompleteness check. We also need to require matching dimensions in D3D11, but make this an implementation specific check. Also make all implementation specific errors 'UNSUPPORTED' since that catches all "non-ES" framebuffer restrictions. Note that we can't be conformant here in D3D11 currently, since the spec only makes an exception for mismatching formats for UNSUPPORTED, not for size checks. However, we don't have an easy solution. BUG=angleproject:1225 Change-Id: Ic80a04bce397fc12643b010c874f432033babc5d Reviewed-on: https://chromium-review.googlesource.com/313990 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tryjob-Request: Jamie Madill <jmadill@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Minmin Gong adff67b5 2015-10-14T10:34:45 Re-land "Implements more pack/unpack states." Pack: row length, skip rows, skip pixels. Unpack: image height, skip images, skip rows, skip pixels. Note that PBOs are not covered by this change. Re-land with fix for test expectations. BUG=angleproject:512 BUG=angleproject:1095 Change-Id: I71d8d3bd8fc1f2c75ca16ac2634d5eafcbd71f26 Reviewed-on: https://chromium-review.googlesource.com/305522 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill c7473924 2015-10-14T14:33:19 Revert "Implements more pack/unpack states. Pack: row length, skip rows, skip pixels. Unpack: image height, skip images, skip rows, skip pixels. Note that PBOs are not covered by this change." Expectations still not correct. This removes suppressions for two failing tests: functional.texture.specification.teximage3d_depth_pbo.depth_component32f_2d_array dEQP-GLES3.functional.texture.specification.teximage3d_depth_pbo.depth32f_stencil8_2d_array BUG=angleproject:512 BUG=angleproject:1095 This reverts commit 72e7013e68a24107b9082629fc52d59a78998eb2. Change-Id: Id81b6e616e61535b8504890ce57591813e22af69 Reviewed-on: https://chromium-review.googlesource.com/305521 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Minmin Gong 72e7013e 2015-10-01T17:19:45 Implements more pack/unpack states. Pack: row length, skip rows, skip pixels. Unpack: image height, skip images, skip rows, skip pixels. Note that PBOs are not covered by this change. BUG=angleproject:512 BUG=angleproject:1095 Change-Id: Ia2fd7e52615d4aa08011dd615fcc20b79672d355 Reviewed-on: https://chromium-review.googlesource.com/304908 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 000b2f49 2015-10-09T15:33:14 Revert "Implements more pack/unpack states. Pack: row length, skip rows, skip pixels. Unpack: image height, skip images, skip rows, skip pixels." This is causing failures in dEQP-GLES3.functional.texture.specification.teximage3d_depth_pbo.depth_component24_2d_array First failing build on the bot: http://build.chromium.org/p/chromium.gpu.fyi/builders/Win7%20Release%20dEQP%20%28NVIDIA%29/builds/3635 Please fix the failure and re-land your CL with the fix. BUG=angleproject:512 BUG=angleproject:1095 This reverts commit f1bb3f0569d5ef41b17f8ad0add7308f9d0f0de1. Change-Id: I30f61db888b0adf73a1d98bbeeb2428068119627 Reviewed-on: https://chromium-review.googlesource.com/304990 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Minmin Gong f1bb3f05 2015-10-01T17:19:45 Implements more pack/unpack states. Pack: row length, skip rows, skip pixels. Unpack: image height, skip images, skip rows, skip pixels. BUG=angleproject:512 BUG=angleproject:1095 Change-Id: I11e3bc05d23419b72c92b96aabd3f0bacd983626 Reviewed-on: https://chromium-review.googlesource.com/304370 Tryjob-Request: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Geoff Lang 6941a556 2015-07-27T11:06:45 Rename Workarounds to WorkaroundsD3D. It is not referenced outside of the d3d classes. BUG=angleproject:884 Change-Id: Ibeec034b1b78b569bea2f1c77d6a686b58b8e010 Reviewed-on: https://chromium-review.googlesource.com/288582 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang a455824c 2015-07-17T14:25:01 Remove GetAttachmentSerial. Cascades to remove serials from many objects. BUG=angleproject:970 Change-Id: I0a74a14519da3203cd5df7ae0fa19f83393951ce Reviewed-on: https://chromium-review.googlesource.com/286554 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Nico Weber 44897140 2015-07-10T09:50:00 clang/win: Fix -Wunused-private-field warnings in debug builds. No intended behavior change. BUG=505317 Change-Id: I5dfa1d67715b18133f3373ca00a6d1d96b678043 Reviewed-on: https://chromium-review.googlesource.com/284850 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Nico Weber <thakis@chromium.org>
Sam McNally 5a0edc62 2015-06-30T12:36:07 Change intializer list order to match field order. BUG=505304 Change-Id: I38149e72732f0b4eb7d398f90b5d11660e2a7fbc Reviewed-on: https://chromium-review.googlesource.com/282465 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Kenneth Russell 62342590 2015-06-18T17:29:52 Revert "Add workaround for flushing before readPixels." This reverts commit 46c13a15fa90130eca14301a4ef6deed12315037. Seems to have introduced significant flakiness on the Windows AMD FYI bot. Reverting while investigating. Change-Id: I9cfdb09a4a0d792a0c5db76c8b0b9d3285c0695a Reviewed-on: https://chromium-review.googlesource.com/280365 Tested-by: Kenneth Russell <kbr@chromium.org> Reviewed-by: Kenneth Russell <kbr@chromium.org>
Kenneth Russell 46c13a15 2015-06-17T16:33:50 Add workaround for flushing before readPixels. This has been found necessary on the D3D11 backend on AMD GPUs, and on the D3D9 backend on all GPUs. Tested an earlier version of this patch overnight on one of the affected Windows AMD bots; it eliminated the flakiness observed on one of the WebGL conformance tests. BUG=491419 Change-Id: I668493eb5ec109b5e0650c154dc97b786e0745bd Reviewed-on: https://chromium-review.googlesource.com/278265 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Kenneth Russell <kbr@chromium.org>
Austin Kinross 08332634 2015-05-05T13:35:47 Implement EXT_discard_framebuffer in D3D11 renderer Change-Id: I52bcf0cfb1aa123e085a35730fdefb006b617c3c Reviewed-on: https://chromium-review.googlesource.com/269232 Tested-by: Austin Kinross <aukinros@microsoft.com> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang c2520564 2015-04-29T11:42:33 Move unsupported depth stencil check to FramebufferD3D. BUG=angleproject:885 Change-Id: I0abc674e365d2b5b65d23e2abf741a02a1146cdd Reviewed-on: https://chromium-review.googlesource.com/268311 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Brandon Jones <bajones@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill 8cf813c7 2015-05-04T12:55:18 Query attachment render targets from Impl class. *re-land with fix for D3D9* This allows us to eradicate the GetAttachmentRenderTarget methods. This improves potential performance, at the cost of exposing a Renderer-specific function at the API object level. BUG=angleproject:963 Change-Id: Iee9f985ddaed668df0c622228004b348eb4d2ea8 Reviewed-on: https://chromium-review.googlesource.com/269006 Tested-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill e737b06c 2015-05-04T16:53:56 Revert "Query attachment render targets from Impl class." D3D9 bug is causing failures in the WebGL depth texture test. BUG=angleproject:963 This reverts commit 804e8436f91733e1d0f769ec10082e4741f2e549. Change-Id: I660f05033360e97258794138cb50b604f5ac16b6 Reviewed-on: https://chromium-review.googlesource.com/269005 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 804e8436 2015-04-30T09:42:23 Query attachment render targets from Impl class. This allows us to eradicate the GetAttachmentRenderTarget methods. This improves potential performance, at the cost of exposing a Renderer-specific function at the API object level. BUG=angleproject:963 Change-Id: Ifc227b5f42e87bd4deb451d685618cf61fea39f1 Reviewed-on: https://chromium-review.googlesource.com/263491 Reviewed-by: Kenneth Russell <kbr@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 7d75e2b7 2015-04-30T09:42:18 Simplify message to FBO Impls of attachment changes. We don't need to pass attachment pointers, since they are now value types, and no longer change their address. BUG=angleproject:963 Change-Id: I02cdce0886512cc847930f61c5bfb62fc1d7cd1a Reviewed-on: https://chromium-review.googlesource.com/265938 Tested-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill 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>
Jamie Madill 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>
Jamie Madill 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>
Jamie Madill b6bda4af 2015-04-20T12:53:26 Make Framebuffer::Data members private. This makes "Data" a proper class, and enforces access control when used in FramebufferImpl. This gives a cleaner refactor when we switch the internals of the class to use value types to store attachments instead of pointer types. BUG=angleproject:963 Change-Id: If825095458eaf9367f616f0bb54084025efb9882 Reviewed-on: https://chromium-review.googlesource.com/265937 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Brandon Jones <bajones@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 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>
Jamie Madill f4bf3811 2015-04-01T16:15:32 Use GetAs/GetImplAs whenever possible. This patch cleans up the rest of our custom casting helper functions. Change-Id: I41975c736765fca855c4498acca31116df3e8317 Reviewed-on: https://chromium-review.googlesource.com/263477 Tested-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Brandon Jones <bajones@chromium.org>
Jamie Madill 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>
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 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>
Jamie Madill d1f5ef2e 2015-04-01T14:17:06 Pass gl::Data to Framebuffer::clear. This allows the implementation object to also check the caps. BUG=angleproject:930 Change-Id: I5a48ad942eaa5271b60cffd931829296e5d2a767 Reviewed-on: https://chromium-review.googlesource.com/263481 Reviewed-by: Brandon Jones <bajones@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang 1ea584c5 2015-03-26T21:08:33 Revert "Implement EXT_discard_framebuffer in D3D11 renderer" Causes failures in video related WebGL tests. Either there is a bug in the implementation or how chrome is using it. This reverts commit b13daa8f79f4d16a990d968d7d2c04da6b72d302. Change-Id: Ic0d74840c664bf4de18d85cc3ff7f7153936d9b0 Reviewed-on: https://chromium-review.googlesource.com/262715 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Austin Kinross b13daa8f 2015-03-19T17:00:44 Implement EXT_discard_framebuffer in D3D11 renderer Change-Id: I0e39a196796813203c841c46aa2a6b89957f6051 Reviewed-on: https://chromium-review.googlesource.com/261355 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 87de3627 2015-03-16T10:41:44 Implement pass-through pack state params. Same as for unpack, this allows us to pass through the state reset code of dEQP without UNIMPLEMENTED errors, while still throwing asserts if they are set to non-default values. BUG=angleproject:901,angleproject:512 Change-Id: I0ce0258b0e91eb83c066c241693aaa5c164b2989 Reviewed-on: https://chromium-review.googlesource.com/257131 Tested-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill f75ab350 2015-03-16T10:46:52 Make ClearParameters an rx-only type. This legacy struct duplicates some methods in the gl::State. We can restrict its use to D3D and on newer back-ends use the State directly. BUG=angleproject:930 Change-Id: I2c298e76b072ee73f2b3e17f6696693031ce1f91 Reviewed-on: https://chromium-review.googlesource.com/258070 Tested-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill f90353e8 2015-03-05T19:37:58 Fix typo "setDepthttachment". BUG=angleproject:930 Change-Id: I7680bbc912c0d961143c38ad82d19746dc9b113d Reviewed-on: https://chromium-review.googlesource.com/256732 Reviewed-by: Kenneth Russell <kbr@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 85a1804d 2015-03-05T15:41:41 Make getColorAttachmentsForRender D3D-only. This encapsulates the workaround in the D3D renderer, and also optimizes the workaround to only compute a new set of attachments when there is a change to the state. BUG=angleproject:930 Change-Id: Ibdc15078236e2d19b544fae8e65b7f2554f31844 Reviewed-on: https://chromium-review.googlesource.com/254102 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 7147f01a 2015-03-05T15:41:40 Cleanups to FramebufferD3D. With the new shared state structure, we can eliminate a lot of the state tracking within the FramebufferD3D implementation. BUG=angleproject:930 Change-Id: I0953e321bae3afe7cde7b73c55af62546665c890 Reviewed-on: https://chromium-review.googlesource.com/254101 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill d1405e51 2015-03-05T15:41:39 Share FBO state with object and Impl. This patch introduces a new Framebuffer::Data class, which stores attachment related state. This will eliminate the need to store duplicated state between the classes. BUG=angleproject:930 Change-Id: I80de4db39ab99d623b0ad8306bf3cbb794cd8bd5 Reviewed-on: https://chromium-review.googlesource.com/254100 Reviewed-by: Kenneth Russell <kbr@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill b885e571 2015-02-03T16:16:04 Implement ReadBuffer functionality. This enables ReadPixels from non-0 FBO attachments. Tested with: dEQP-GLES3.functional.negative_api.buffer.read_buffer (fails due to a possible error in dEQP) dEQP-GLES3.functional.shaders.fragdata.draw_buffers (passes) BUG=angle:903 Change-Id: Ib095e1d50b8fbbc6f197de25f19ec0993309145a Reviewed-on: https://chromium-review.googlesource.com/244841 Tested-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Minmin Gong b8aee3bc 2015-01-27T14:42:36 Add UNPACK_ROW_LENGTH support to D3D11 renderer Change-Id: I31ccffddcb04a45f19d3c3eb9a396c30e794b218 Reviewed-on: https://chromium-review.googlesource.com/243951 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Minmin Gong <mgong@microsoft.com>
Jamie Madill 9236b418 2015-02-02T16:51:52 Add generic Impl casting helper methods. GetAs and GetImplAs are template helpers that can replace all of our custom "makeTextureD3D", etc methods. This will help save code across different back-ends. Change-Id: Ib3215c005bfac5a819c5d8f7d60a73a725241332 Reviewed-on: https://chromium-review.googlesource.com/245390 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Geoff Lang 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>
Geoff Lang 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>
Geoff Lang 54bd5a46 2014-12-01T12:51:04 Move blit to the Framebuffer object and Impl. BUG=angle:841 Change-Id: I482e53a90606d9d6b105c7006234215d51ab1a6b Reviewed-on: https://chromium-review.googlesource.com/232692 Reviewed-by: Kenneth Russell <kbr@chromium.org> Reviewed-by: Brandon Jones <bajones@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang bce529e4 2014-12-01T12:48:41 Move ReadPixels to the Framebuffer object and Impl. BUG=angle:841 Change-Id: I71deac9e755b5dfa010596cd1f8a213c24d895bf Reviewed-on: https://chromium-review.googlesource.com/232691 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang b04dc82e 2014-12-01T12:02:02 Move Framebuffer clearing from Renderer to the Framebuffer object. BUG=angle:841 Change-Id: I95c9cbdc2d1c99731e19c48e18117358d22b9e94 Reviewed-on: https://chromium-review.googlesource.com/232690 Reviewed-by: Kenneth Russell <kbr@chromium.org> Reviewed-by: Brandon Jones <bajones@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang 748f74ef 2014-12-01T11:25:34 Rename Framebuffer::completeness to checkStatus and add an Impl method. BUG=angle:841 Change-Id: I04b4ffd086424569a15aa21447dd552e0a898928 Reviewed-on: https://chromium-review.googlesource.com/232394 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang 9dd95808 2014-12-01T11:12:59 Add set*Attachment methods to FramebufferImpl. BUG=angle:841 Change-Id: Ie819c253a900d105d768aee168a6a2de89754ccc Reviewed-on: https://chromium-review.googlesource.com/232393 Reviewed-by: Brandon Jones <bajones@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang b5d8f23e 2014-12-04T15:43:01 Move GetAttachmentRenderTarget and GetAttachmentSerial to FramebufferD3D.h. BUG=angle:841 Change-Id: Ic341239e848f1daf7cf38f233d79a58f221780f4 Reviewed-on: https://chromium-review.googlesource.com/232969 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang 9ad4bda0 2014-12-01T11:03:09 Move Framebuffer invalidation into the impl. BUG=angle:841 Change-Id: Ibcf58c4f676491f3b2582198c6cf9fd4a7a38b42 Reviewed-on: https://chromium-review.googlesource.com/232392 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang da88adda 2014-12-01T10:22:01 Create stubs for the FramebufferImpl class. BUG=angle:841 Change-Id: I089409981604abe9c65c3019765d8d9eeffe38f5 Reviewed-on: https://chromium-review.googlesource.com/232381 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang 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>