src/libANGLE/renderer/d3d/FramebufferD3D.cpp


Log

Author Commit Date CI Message
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>