src/libANGLE/Renderbuffer.cpp


Log

Author Commit Date CI Message
Yuxiang Qian 44853559 2025-02-25T17:29:54 Correct GLES renderbuffer default values For GLES renderbuffer, the initial value queried for RGBA bits should be 0, and the component type should be GL_NONE according to spec. Correct the default values on ANGLE now. An end2end test is also added. Bug: angleproject:399693196 Change-Id: If8366b3d2350add917054813d3cb9a6a23727da7 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6312514 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Xin Yuan c7cfbbc9 2025-01-20T22:31:42 Check if the GLES resources are bound to EGL image Per spec, The resource that will be used to create egl image must not itself be an EGLImage sibling, so validation for the resource in this case should be include. Bug: angleproject:388310036 Change-Id: I2b47e3de4f92beca7ff7a80383a7598c79fdedb0 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6170833 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Marius Kintel 5e790bfb 2024-04-11T14:58:58 Remove unnecessary D3D include Bug: b/329414677 Change-Id: If96e10f3762fe849485f52783565658889491c97 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5444810 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Charlie Lao b19d17b8 2022-12-09T14:38:08 Vulkan: Split Serial class into UniqueSerial and Serial This CL splits Serial class into two classes: UniqueSerial and Serial. UniqueSerial supports the object unique serial usage where there is == and != operator but no > or < comparison. UniqueSerial can have invalid value, but Serial will not have invalid value (in next CL). The main reason is for next CL we can further optimize out the invalid value check in the QueueSerial comparison. Bug: b/262047600 Change-Id: Ieaed2a0d5546b012a6d63aa18b6006595e4aee1b Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4093557 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Charlie Lao <cclao@google.com> Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com>
Mark Lobodzinski fb3e2def 2022-05-24T15:47:01 Extend labelObject functionality Modify interface to fully support labelObject return codes. Fix issues with texture implementation, including handling deferred Vulkan object creation. Bug: b/229105865 Change-Id: I0c64b72dd0b54642fb643ee7f5ccbb2a134c6787 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3703184 Commit-Queue: Ian Elliott <ianelliott@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Ian Elliott <ianelliott@google.com>
Jamie Madill 2dd13ebb 2022-04-21T11:25:00 Track Surface color & depth/stencil init separately. This clears up some trace testing confusion due when robust resource init is enabled, and the app clears color but not depth on the default surface. Bug: angleproject:7221 Change-Id: Id97871aec32ad831b663aaa9116e04b582ab5a36 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3600375 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Geoff Lang 5c6998e4 2021-03-30T09:33:55 Mark objects as initialized when robust init is disabled. If a context with robust resource init disabled allocates a texture, make sure it's marked as initialized or else the texture may be reinitialized later by a context with robust resource init enabled. Bug: chromium:1192632 Change-Id: I643f616c89420312f341b53cedbd1a4e4dc58675 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2794621 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Justin Novosad <junov@chromium.org>
Geoff Lang a8000240 2021-10-05T13:12:22 Don't release EGLImage refs until backends are respecified orphanImages is called before impl methods to respecify textures and renderbuffers. This can cause the backend objects to reference deleted images. TextureVk::handleImmutableSamplerTransition is one such function that is called using "previousImage". Fix this by having orphanImages return a RAII object that deletes the image when the caller chooses. In this case, after the impl methods have been called to respecify the backend data. Bug: b/194432407 Change-Id: Ifb265b4409ba43478731a1701e2409f089976b1d Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3206430 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Tim Van Patten <timvp@google.com>
Jeff Vigil 6136620b 2021-03-25T15:43:06 Reland "EGL: GLES: Implement GL_EXT_protected_textures" This is a reland of 6210a9b34a721df2c84cf69170ad9bf7ba40e4aa This removes changes in gl backend. Original change's description: > EGL: GLES: Implement GL_EXT_protected_textures > > Implement EGL_EXT_protected_content Images > Add protected member to Images and Textures > Add error when creating objects if not supported or > does't match native buffer > When creating siblings pass protected state > Add extension caps > Add Validation > Add GetTexParameter and SetTextparameter > Add protected to Texture and state > Expand tests for images and textures > > Test: angle_end2end_test --gtest_filter=EGLProtectedContentTest > > Bug: angleproject:3965 > Change-Id: I35a89b4e80bba6d9b6831c68e71630eef304dacb > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2802852 > Commit-Queue: Mohan Maiya <m.maiya@samsung.com> > Reviewed-by: Geoff Lang <geofflang@chromium.org> > Reviewed-by: Jamie Madill <jmadill@chromium.org> > Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Test: angle_end2end_test --gtest_filter=EGLProtectedContentTest Bug: angleproject:3965 Change-Id: Id36d697c53afc0f0dadf92bda4565f9157f4fc2a Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3076825 Commit-Queue: Brandon Schade <b.schade@samsung.com> Reviewed-by: Ian Elliott <ianelliott@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill c408926f 2021-07-22T12:00:59 Revert "EGL: GLES: Implement GL_EXT_protected_textures" This reverts commit 6210a9b34a721df2c84cf69170ad9bf7ba40e4aa. Reason for revert: Suspected for breaking ANGLE->Chrome roller. Bug: angleproject:6204 Original change's description: > EGL: GLES: Implement GL_EXT_protected_textures > > Implement EGL_EXT_protected_content Images > Add protected member to Images and Textures > Add error when creating objects if not supported or > does't match native buffer > When creating siblings pass protected state > Add extension caps > Add Validation > Add GetTexParameter and SetTextparameter > Add protected to Texture and state > Expand tests for images and textures > > Test: angle_end2end_test --gtest_filter=EGLProtectedContentTest > > Bug: angleproject:3965 > Change-Id: I35a89b4e80bba6d9b6831c68e71630eef304dacb > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2802852 > Commit-Queue: Mohan Maiya <m.maiya@samsung.com> > Reviewed-by: Geoff Lang <geofflang@chromium.org> > Reviewed-by: Jamie Madill <jmadill@chromium.org> > Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Bug: angleproject:3965 Change-Id: Ia3ef260a17097b474189ccad5b235a9db99ee00b Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3043889 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org> Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Jeff Vigil 6210a9b3 2021-03-25T15:43:06 EGL: GLES: Implement GL_EXT_protected_textures Implement EGL_EXT_protected_content Images Add protected member to Images and Textures Add error when creating objects if not supported or does't match native buffer When creating siblings pass protected state Add extension caps Add Validation Add GetTexParameter and SetTextparameter Add protected to Texture and state Expand tests for images and textures Test: angle_end2end_test --gtest_filter=EGLProtectedContentTest Bug: angleproject:3965 Change-Id: I35a89b4e80bba6d9b6831c68e71630eef304dacb Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2802852 Commit-Queue: Mohan Maiya <m.maiya@samsung.com> Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Tim Van Patten 9ddaa686 2021-07-16T14:57:13 Call getNearestSamples() in Framebuffer::setAttachment() The app jp.garud.ssimulator uses the same sample count of '2' for both glRenderbufferStorageMultisampleEXT() and glFramebufferTexture2DMultisampleEXT(). However, when glRenderbufferStorageMultisampleEXT() is called, Renderbuffer::setStorageMultisample() calls TextureCaps::getNearestSamples() which rounds up the sample count from '2' to '4'. Later, when the app tries to draw with the framebuffer, an error is generated by ANGLE: Framebuffer is incomplete: Attachments have different sample counts. The fix is to also call TextureCaps::getNearestSamples() in Framebuffer::setAttachment() to make sure the sample count passed into glFramebufferTexture2DMultisampleEXT() is also rounded up to match the renderbuffer. Bug: angleproject:6183 Test: MultisampledRenderToTextureTest.FramebufferCompletenessSmallSampleCount Change-Id: I58be9986077257f4767f2e528c2f87e496d9d774 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3036254 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Tim Van Patten <timvp@google.com>
Brandon Schade 1e494cae 2020-10-07T19:26:01 Vulkan: Add support for EXT_copy_image Add support for GL_EXT_copy_image which allows image data transfer between image objects. This is implemented by using the vkCmdCopyImage API call. Bug: angleproject:3593 Test: dEQP-GLES31.functional.copy_image.* Change-Id: I30a34a8711b5d2e5834064d7453e03d6ec0df478 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2393955 Commit-Queue: Brandon Schade <b.schade@samsung.com> Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Geoff Lang 32f0dd6a 2020-10-15T10:08:51 Add Queries and Setters for resource initialization state. There are cases where we know that the next draw operation will fully initialize a texture/renderbuffer and we can save the robust resource init cost. Default all resource init state to Initialized, any redefinition will set it back to MayNeedInit. After setting an individual texture image to initialized, check if all images are now initialized and update the TextureState::mInitState to match. The cost of this check is only performed after initializing an image and allows future init checks to be faster. Bug: chromium:1132514 Change-Id: Ia23664ae162559d1614f1eb5643e24a491d87f7f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2475456 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi 37457d08 2020-09-15T14:38:53 Vulkan: Support MSRTT color renderbuffers Color renderbuffers are similar to multisampled-render-to-texture textures, but much simpler. The same mechanism is used to implement them. Bug: angleproject:4836 Change-Id: I298529c9fd1b03e78b1e37cdbe595e66166ee130 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2412847 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Tim Van Patten <timvp@google.com>
Shahbaz Youssefi d8b037d6 2020-09-15T05:05:14 Change renderbuffer width/height/sample types to GLsizei This matches the types used by GL and stored in the state. setStorage and setStorageMultisampled calls were using size_t instead with a number of unnecessary casts in places which are now removed. Bug: angleproject:4836 Change-Id: Ibb570f0c088a6f29abe10f513de27c30ba4dd098 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2411697 Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi b3a8f0bc 2020-09-11T15:41:16 Distinguish MSRTT renderbuffers in the front-end glRenderbufferStorageMultisampleEXT has different semantics from glRenderbufferStorageMultisample. This change makes this differentiation in the front-end and passes a flag to the backends. This extension is currently only supported on Vulkan and D3D backends. Support for the former will be done in a follow up. Support for the latter is not planned. Bug: angleproject:4836 Change-Id: I75bc3d7990a4b1ce06264280a386d5e467983b7d Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2405396 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 185d9d08 2020-08-14T22:48:15 Re-land "Feedback Loop Redesign 2/3: Track bound FBOs in Texture." Re-land fixes the crash when drawing with no bound Program executable. Currently we track feedback loops by counting the times a Texture is bound as a sampler or image in a particular context. This is a bit tricky because Texture bindings change frequently. Relative to the number of times we need to check for a feedback loop this causes excess overhead. Usually Framebuffers have a low number of Textures bound (in many cases just 1). And Textures aren't usually bound to many different FBOs. So instead of counting the number of times a Texture is bound as a sampler or image we will track the Framebuffers that the Texture is bound to. This CL adds a small vector class to gl::Texture which tracks all the Framebufer Serials of its bound Framebuffers. We can use this set to quickly check if there's any potential feedback loop between the a FBO and this Texture. We also update the feedback loop check to use this new method. We will be able to remove the old counting method when we switch the Vulkan feedback loop handling to use the new tracking in this CL. Bug: angleproject:4500 Bug: angleproject:4959 Change-Id: If2bd25b08298a99f5e64b4055137f9154b0f0860 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2365595 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Khushal f6fb6da8 2020-08-19T21:04:35 Revert "Feedback Loop Redesign 2/3: Track bound FBOs in Texture." This reverts commit 699bcde0b729853f33474941a313f6d5c9e63faf. Reason for revert: Breaking GLES2WebGLDecoderPassthroughTest.DrawArraysInstancedANGLEEnablement. Here is a sample build : https://ci.chromium.org/p/chromium/builders/ci/Win10%20FYI%20x64%20Release%20%28NVIDIA%29/4240 Original change's description: > Feedback Loop Redesign 2/3: Track bound FBOs in Texture. > > Currently we track feedback loops by counting the times a Texture is > bound as a sampler or image in a particular context. This is a bit > tricky because Texture bindings change frequently. Relative to the > number of times we need to check for a feedback loop this causes excess > overhead. > > Usually Framebuffers have a low number of Textures bound (in many cases > just 1). And Textures aren't usually bound to many different FBOs. So > instead of counting the number of times a Texture is bound as a sampler > or image we will track the Framebuffers that the Texture is bound to. > > This CL adds a small vector class to gl::Texture which tracks all the > Framebufer Serials of its bound Framebuffers. We can use this set to > quickly check if there's any potential feedback loop between the a FBO > and this Texture. > > We also update the feedback loop check to use this new method. We will > be able to remove the old counting method when we switch the Vulkan > feedback loop handling to use the new tracking in this CL. > > Bug: angleproject:4500 > Bug: angleproject:4959 > Change-Id: I84a2f0ed8480d1da63d5879e0e56a8be4af4e735 > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2358850 > Reviewed-by: Tobin Ehlis <tobine@google.com> > Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com> > Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> > Commit-Queue: Jamie Madill <jmadill@chromium.org> TBR=tobine@google.com,courtneygo@google.com,jonahr@google.com,jmadill@chromium.org Change-Id: Ica795036895652add37ac8ed319031f9d5a321ac No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: angleproject:4500 Bug: angleproject:4959 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2365077 Reviewed-by: Khushal <khushalsagar@chromium.org> Commit-Queue: Khushal <khushalsagar@chromium.org>
Jamie Madill 699bcde0 2020-08-14T22:48:15 Feedback Loop Redesign 2/3: Track bound FBOs in Texture. Currently we track feedback loops by counting the times a Texture is bound as a sampler or image in a particular context. This is a bit tricky because Texture bindings change frequently. Relative to the number of times we need to check for a feedback loop this causes excess overhead. Usually Framebuffers have a low number of Textures bound (in many cases just 1). And Textures aren't usually bound to many different FBOs. So instead of counting the number of times a Texture is bound as a sampler or image we will track the Framebuffers that the Texture is bound to. This CL adds a small vector class to gl::Texture which tracks all the Framebufer Serials of its bound Framebuffers. We can use this set to quickly check if there's any potential feedback loop between the a FBO and this Texture. We also update the feedback loop check to use this new method. We will be able to remove the old counting method when we switch the Vulkan feedback loop handling to use the new tracking in this CL. Bug: angleproject:4500 Bug: angleproject:4959 Change-Id: I84a2f0ed8480d1da63d5879e0e56a8be4af4e735 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2358850 Reviewed-by: Tobin Ehlis <tobine@google.com> Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com> Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Manh Nguyen aca14d47 2020-07-29T13:52:28 Add renderbuffer serialization capability Serializes renderbuffers' states stored on CPU. Gets renderbuffers content from GPU then serialize them. Adds renderbuffers serialization to serializeContext method so that capture replay regresssion testing now compares the states of renderbuffers too. Bug: angleproject:4817 Change-Id: I537b11ee85decb14eea461ebbd62ce6ab0402f85 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2327173 Commit-Queue: Manh Nguyen <nguyenmh@google.com> Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 1fc354fa 2020-04-22T11:49:00 Re-land: "Vulkan: Forward RenderBuffer/Surface dirty messages." Re-land fixes ASSERT on Android GLES. Previously we were only forwarding Texture staging changes to the Framebuffer for re-sync. We could miss out on clears that were staged in Surfaces and Renderbuffer attachments. Complete the chain by making the SurfaceVk and RenderbufferVk forward notifications from the VkImage. Bug: angleproject:4517 Change-Id: I91d31213b115a58546b574caa574eebbb098266c Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2159294 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 623d0443 2020-04-21T15:15:03 Revert "Vulkan: Forward RenderBuffer/Surface dirty messages." This reverts commit 3fb33ade6ec8f286797bff5645304df580b1a963. Reason for revert: Causing WebGL test failures on GLES/ANGLE/Android. Bug: chromium:1072739 Original change's description: > Vulkan: Forward RenderBuffer/Surface dirty messages. > > Previously we were only forwarding Texture staging changes to the > Framebuffer for re-sync. We could miss out on clears that were staged > in Surfaces and Renderbuffer attachments. Complete the chain by making > the SurfaceVk and RenderbufferVk forward notifications from the > VkImage. > > Bug: angleproject:4517 > Change-Id: I15f36c225517e915f656d0c2464a99631ef9f945 > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2150699 > Reviewed-by: Cody Northrop <cnorthrop@google.com> > Commit-Queue: Jamie Madill <jmadill@chromium.org> TBR=cnorthrop@google.com,timvp@google.com,jmadill@chromium.org # Not skipping CQ checks because original CL landed > 1 day ago. Bug: angleproject:4517 Change-Id: I4fd4d79dc11da0ba86065d3a80975de4c791a2a0 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2159288 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 3fb33ade 2020-04-09T15:27:12 Vulkan: Forward RenderBuffer/Surface dirty messages. Previously we were only forwarding Texture staging changes to the Framebuffer for re-sync. We could miss out on clears that were staged in Surfaces and Renderbuffer attachments. Complete the chain by making the SurfaceVk and RenderbufferVk forward notifications from the VkImage. Bug: angleproject:4517 Change-Id: I15f36c225517e915f656d0c2464a99631ef9f945 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2150699 Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill c431d596 2019-12-16T10:59:44 Add Serial to all GL resources. The Serial will help track active resources for filtering out inactive setup calls in capture/replay. Bug: angleproject:4223 Change-Id: I64ba50f27d656c12d45155dc735e9b6f9c04528f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1969062 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Ian Elliott c6458072 2019-12-05T11:45:10 Fix multisample renderbuffer compliance (e.g. 3->4 samples) This change ensures that the following spec language is correctly implemented: the resulting value for RENDERBUFFER_SAMPLES is guaranteed to be greater than or equal to samples and no more than the next larger sample count supported by the implementation. For example, if 2, 4, and 8 samples are supported, and if 5 samples are requested, ANGLE should use 8 samples, and return 8 when GL_RENDERBUFFER_SAMPLES is queried. Note: There is a known problem with NVIDIA OpenGL driver that causes another test to be expected to fail. Bug: angleproject:2222 Bug: angleproject:4196 Change-Id: I28921badf9568427799b0af347198b5df06c2aaa Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1954444 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Ian Elliott <ianelliott@google.com>
Ian Elliott 5f857839 2019-12-04T15:30:50 Improve current multisampled renderbuffer/texture support This is split off from a change to implement multisampled textures for the Vulkan back-end, and will come before that change. The changes include: - Make a common utility rx::GetSamplePosition() function. D3D11 and Vulkan use the same standard sample positions/locations for 1, 2, 4, 8, and 16 samples. The D3D11 back-end has a utility function for this, which is being moved to a common location--for use by both the D3D11 and Vulkan back-ends. - Texture::setStorageMultisample() handles converting the "requested number of samples" to the actual number of samples used (e.g. converting 3 to 4), supported by the underlying back-end). The actual number used is stored in gl::TextureState::mImageDescs, for use by other GLES commands. - Change some end2end tests to not make assumptions about the supported number of samples, but to properly query what is supported. Bug: angleproject:3565 Bug: angleproject:4196 Change-Id: I1dc12fedd0f8fb4975f90d87486e443b069b7141 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1948535 Commit-Queue: Ian Elliott <ianelliott@google.com> Reviewed-by: Ian Elliott <ianelliott@google.com>
Jamie Madill dfc20daf 2019-10-28T13:51:42 Plumb more logic for ANGLE_get_image. Also implements and tests validation / negative API. Bug: angleproject:3944 Change-Id: I3385a4255f4fab6a12eee2abfa5ffcce2107359a Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1879961 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com>
Jamie Madill f703443b 2019-09-21T14:10:35 Use Resource IDs in RefCountObject. This lets us use strongly typed IDs pretty much everywhere. Only one or two additional places still use GLuint IDs. Mostly for external queries and for Framebuffer Attachments. With some clever type reflection helpers lets us define a single template function for handling operator== and != for resource IDs. Refactor in preparation for more Capture/Replay work. Bug: angleproject:3611 Change-Id: I1c0c848e89eb8a4b769714d57686f816daf01634 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1815550 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Tobin Ehlis <tobine@google.com>
Stuart Morgan 9d737966 2019-08-14T12:25:12 Standardize copyright notices to project style For all "ANGLE Project" copyrights, standardize to the format specified by the style guide. Changes: - "Copyright (c)" and "Copyright(c)" changed to just "Copyright". - Removed the second half of date ranges ("Y1Y1-Y2Y2"->"Y1Y1"). - Fixed a small number of files that had no copyright date using the initial commit year from the version control history. - Fixed one instance of copyright being "The ANGLE Project" rather than "The ANGLE Project Authors" These changes are applied both to the copyright of source file, and where applicable to copyright statements that are generated by templates. BUG=angleproject:3811 Change-Id: I973dd65e4ef9deeba232d5be74c768256a0eb2e5 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1754397 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 7c7dec01 2019-08-06T17:44:11 Use RenderbufferID in place of GLuint handles. This will allow frame capture/replay to more easily emulate object handle manipulation. It also provides a bit of type safety. Also generalizes ResourceMap to handle non-GLuint IDs. Bug: angleproject:3611 Change-Id: I174fd260f326e0dbe2aca3f818215c91d82cf48c Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1706559 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill 124f78c2 2019-06-18T11:48:24 Remove gl::Context parameter from Observer functions. It was only used in exactly one instance in VertexArray. Instead we can cache a bool and avoid needing to pass it around. Will make signaling dirty easier in the Vulkan back-end. Bug: angleproject:3539 Change-Id: Ia570aec051a24a5280df49edc4345c54022b46ec Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1663838 Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill e4faae21 2019-05-10T08:27:00 Rename state change notification messages. This makes the style use CamelCase instead of ALL_CAPS. It also cleans up some of the naming. It also changes some uses of the messages in some of the objects to hopefully be more consistent. See the comments added to the enum SubjectMessage in Observer.h for more details. Bug: angleproject:3427 Change-Id: I6dff4f6d335ecf1a27e48df65743b1490bd3025a Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1600411 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill 7c985f5c 2018-11-29T18:16:17 Make angle::Result an enum. This moves away from a class type to a value type. This should improve performance when using angle::Result as a return value. Previously the generated code would return a pointer instead of a value. Improves performance in the most targeted microbenchmark by 10%. In more realistic scanarios it will have a smaller improvement. Also simplifies the class implementation and usage. Includes some unrelated code generation changes. Bug: angleproject:2491 Change-Id: Ifcf86870bf1c00a2f73c39ea6e4f05ca705050aa Reviewed-on: https://chromium-review.googlesource.com/c/1356139 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 66f0d2c1 2018-11-30T15:25:36 Make Framebuffer attachments angle::Subjects. Now that there's storage change notifications in the GL front-end we no longer need to give the back-end access to the angle::Subject. The Texture object is a special case where it has mirrored dirty bits. To keep the gl::Texture class notified of when the Impl has dirty bits we make the TextureImpl class an angle::Subject that is observed by the gl::Texture class. This will enable further dirty bits improvements. Bug: angleproject:2966 Change-Id: Id22da0926f51ff4679e58af3e62903f4d7948915 Reviewed-on: https://chromium-review.googlesource.com/c/1347670 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill e90d4ee9 2018-11-28T14:04:00 Pass Context to setLabel. This is useful for triggering a dirty state notification for Textures. It will lead to improvements for program and texture dirty bits. Bug: angleproject:2966 Change-Id: Iaba625da8a970a558f7d158bfa2f09c964f6761a Reviewed-on: https://chromium-review.googlesource.com/c/1347669 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Jamie Madill b980c563 2018-11-27T11:34:27 Reformat all cpp and h files. This applies git cl format --full to all ANGLE sources. Bug: angleproject:2986 Change-Id: Ib504e618c1589332a37e97696cdc3515d739308f Reviewed-on: https://chromium-review.googlesource.com/c/1351367 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Jamie Madill 666818ea 2018-11-14T09:54:33 Use angle::Result in front-end (Part 8) Refactors the gl::Texture class and a few related methods. Also reduces binary size by up to 4k. Bug: angleproject:2491 Change-Id: Ib9a69d7f507b0dce35abb17b90532f812bf43214 Reviewed-on: https://chromium-review.googlesource.com/c/1291845 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Jamie Madill c2328a15 2018-10-18T15:00:29 Use angle::Result in front-end (Part 4) Handles the gl::Renderbuffer class and its implementation. Bug: angleproject:2491 Change-Id: I3ef718b492dc39ba640c8f68ed80b536f89ff378 Reviewed-on: https://chromium-review.googlesource.com/c/1283309 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Geoff Lang 79b91407 2018-10-04T15:11:30 Add an extension for querying esimated GPU memory size of resources. BUG=892288 Change-Id: I56fc3ab00c06d711e1a21eb1ad4b2224126730dc Reviewed-on: https://chromium-review.googlesource.com/c/1262021 Reviewed-by: Yuly Novikov <ynovikov@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Jamie Madill 1c7f08c3 2018-10-10T16:13:02 Inline RefCountObject::release. Also don't return errors from the object release methods. Not returning errors reduces the amount of code generated. Also we shouldn't be exiting early from destructor type functions. Increases object binding performance. Bug: angleproject:2877 Change-Id: Ieb8120d885b946915e355419825e1f52f31d7b49 Reviewed-on: https://chromium-review.googlesource.com/c/1270218 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Yuly Novikov 2eb54074 2018-08-22T16:41:26 Fix EGLImage pixel format validation This fixes the scenario when EGLImage source and target have different types. For example, a texture is created with unsigned format using glTexImage2D, it is used as a source of EGLImage with eglCreateImageKHR, and then the EGLImage is used to create a renderbuffer target with glEGLImageTargetRenderbufferStorageOES. OES_EGL_image doesn't specify what should happen in this case, but GL implementations (Nexus 5X) seem to allow using this renderbuffer in glFramebufferRenderbuffer and the resulting framebuffer is complete. Thus, in this case, instead of checking whether the renderbuffer format can be used in glFramebufferRenderbuffer, we need to check whether the original texture can be used in glFramebufferTexture2D. Similarly in reverse direction. Also, for the case of source renderbuffer and target texture, presume that glEGLImageTargetTexture2DOES will succeed regardless of renderbuffer format. 1. Add isRenderable and isTexturable checks to egl::Image class, and perform different checks depending on source type. 2. Add isRenderable check to FramebufferAttachment and delegate EGLImage attachments check to egl::Image. 3. Use these checks in validation of EGLImageTargetTexture2D, EGLImageTargetRenderbufferStorage and when checking attachment completeness Bug: angleproject:2567 Change-Id: I8e9f4a2930a4075a4d8464f62582c6825270187e Reviewed-on: https://chromium-review.googlesource.com/1192585 Commit-Queue: Yuly Novikov <ynovikov@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang 9d05b930 2018-07-27T15:47:18 Don't store a ref from an EGL image to its source. ImageSiblings no longer inherit from RefCountObeject because they may be EGL or GL objects and should handle their own deletion. This can cause GL resources to outlive their contexts. When the GL resource is deleted, simply orphan the image. BUG=angleproject:2668 Change-Id: I4a5c12bbe6e725f946209f9b48345a4097c9c91c Reviewed-on: https://chromium-review.googlesource.com/1153601 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jiawei Shao a8802477 2018-05-28T11:17:47 ES31: Implement FramebufferTextureEXT on OpenGL back-ends This patch intends to implement FramebufferTextureEXT on OpenGL back-ends. 1. Support layered framebuffer attachments. 2. Add new framebuffer completeness rules on layered framebuffer attachments. 3. Support FRAMEBUFFER_ATTACHMENT_LAYERED_EXT as a valid <pname> parameter of GetFramebufferAttachmentParameteriv. Note that for an entire level of a cube map: 1. It has no TextureTarget because TEXTURE_CUBE is not a valid target for TexImage*D. 2. It corresponds to 6 ImageDescs (that represents its faces) in class Texture, so when the cube map is cube complete, we return the ImageDesc of its first face, meanwhile we do not allow querying ImageDesc if it is not cube complete. BUG=angleproject:1941 TEST=angle_end2end_tests dEQP-GLES31.functional.geometry_shading.query.framebuffer_attachment_layers dEQP-GLES31.functional.geometry_shading.query.framebuffer_incomplete_layer_targets dEQP-GLES31.functional.geometry_shading.layered.* dEQP-GLES31.functional.geometry_shading.instanced.invocation_per_layer_* dEQP-GLES31.functional.geometry_shading.instanced.multiple_layers_per_invocation_* Change-Id: I44393b513ec8f1a682fd1c47d3eaa6f3b3fae877 Reviewed-on: https://chromium-review.googlesource.com/1075811 Commit-Queue: Jiawei Shao <jiawei.shao@intel.com> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Jamie Madill d7518622 2018-03-27T09:44:31 Buffer11: Refactor Subject/Observer pattern. Instead of having a direct/static observer distinction, add two messages for 'Contents Changed' and 'Storage Changed'. This makes Buffer11 itself the subject with two different message handling cases in the onSubjectStateChange methods. Bug: angleproject:2389 Change-Id: I645cd4b7cc7ce51cb7f48a01c7fc72939cbe89fe Reviewed-on: https://chromium-review.googlesource.com/957940 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Jamie Madill 888081d5 2018-02-27T00:24:46 D3D11: Refactor dependent Framebuffer state changes. Previously, when a state change would cause a Texture to recreate its storage specific to D3D11, we would use a dependent notification from RenderTarget11 to Framebuffer11 to re-check internal dirty bits. In this new method, we instead set dirty bits on the gl::Frambuffer directly. This also means we use fewer internal objects for these notifications, because we share the same structures between the D3D11 back-end notifications and the top-level notifications we use for Robust init and Framebuffer completeness. This also allows us to get rid of one "if" that we check on every draw call in D3D11. This also introduces a dirty bits guard concept - a shadow set of dirty bits that is checked in dependent state changes to ensure that extra bits aren't set inside syncState. This also implements Framebuffer dirty bits for the D3D9 back-end. This has the side effect of cleaning up the "null colorbuffer" D3D9 workaround. Bug: angleproject:2372 Change-Id: Ie346d39030f4f6df583d735685b0babea4e745a8 Reviewed-on: https://chromium-review.googlesource.com/936691 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill d444255a 2018-02-27T22:03:47 Refactor signal utils into Observer pattern. These types were over-generalized. All use cases featured arrays of resources attached to single parent resources. The channel ID is sufficient to identify the child resource in the parent, and having variadic template arguments wasn't necessary. Futhermore we can rename these types to use the common Observer pattern. This should make them more readable to new developers. Also update some classes to inherit from Subject instead of having a member Subject. This cleans up the code in a few places. This should lead to a simpler refactor to allow dependent dirty bits notifications in the Vulkan back-end. In the following patch the signal_utils files will be renamed. They are not renamed in this patch to ensure git history is preserved. Bug: angleproject:2372 Change-Id: I17a3f2c8d92afd4bb3cba2d378c3a2e8a6d7fb11 Reviewed-on: https://chromium-review.googlesource.com/936690 Reviewed-by: Luc Ferron <lucferron@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill e703c606 2018-02-20T10:21:48 Add gl::RenderbufferState shared state helper. This shared state will be read-only visible in the RenderbufferImpl class. It mirrors existing structs for Textures, Buffers, and other classes. It allows the implementation class to have a read-only view as to the current GL state of an object. This will be useful to the Vulkan back-end, which would like to know the current Renderbuffer state before having to redefine the storage. If the current parameters match, it might not have to redefine the storage at all. The solution involves passing around the gl::RenderbufferState through various factory methods. Also name the Renderbuffer implementation pointer consistently and make it use std::unique_ptr. Bug: angleproject:2347 Change-Id: Ied6e0358e24e74a7fedbe4aea692edee909b5838 Reviewed-on: https://chromium-review.googlesource.com/922457 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@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>
Jamie Madill 05b35b21 2017-10-03T09:01:44 D3D11: Lazy robust resource init. This patch moves the robust resource init logic to the GL front-end. Instead of initializing texture resources immediately on creation in D3D11, it defers the clear until before a draw call in some cases, or skips the update if we can determine if a texture (or other resource) has been fully initialized. Currently lazy init is only implemented for Textures, Renderbuffers, and Surfaces. Various places where lazy resource init is triggered: * Framebuffer operations (Draw, Blit, CopyTexImage, Clear, ReadPixels) * Texture operations (SubImage, GenerateMipmap, CopyTexImage) Some efficiency gains remain to be implemented, such as when a SubImage call fills the entire object. Similarly for Blit, and a few other operations. In these cases we can skip lazy init as an optimization. Edge cases with EGLImage are mostly untested. BUG=angleproject:2107 Change-Id: I2bf3a69b1eae0d4feeb5b17daca23451f1037be8 Reviewed-on: https://chromium-review.googlesource.com/576058 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Jamie Madill ea84f6ff 2017-09-20T13:20:30 Pass Context to Framebuffer11 dirty callback. This allows us to call StateManager11::invalidateRenderTarget from the Framebuffer11::signal function, which will then trigger state refresh on the next draw call. This requires passing Context through a few more Renderbuffer methods, and reorganizing the RenderTarget signalling so that it doesn't signal dirty in the destructor. Instead they are signaled as they are destroyed in the containing classes. BUG=angleproject:2151 Change-Id: I4cf575e4a01b48275ff78d75bc55b2d1fced591d Reviewed-on: https://chromium-review.googlesource.com/673139 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Frank Henigman <fjhenigman@chromium.org>
Jamie Madill 71c88b31 2017-09-14T22:20:29 Enable [[nodiscard]] for gl::Error. This forces all return values to be checked for gl::Error. Requires quite a bit of minor refactoring. I also added a macro to swallow an error without returning from a function. We could look at storing the errors in the Context at some point, since almost always when we're generating errors that we need to discard we have access to the Context as a parameter. BUG=angleproject:2150 Change-Id: I457e48a30c002eda0993acbcd3180ba87bf169fb Reviewed-on: https://chromium-review.googlesource.com/665173 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@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 4fd95d54 2017-04-05T11:22:18 Stop using FramebufferAttachment::Target. Target includes the binding (DEPTH/STENCIL/COLOR), which is not useful for many operations. Simplify this to just passing the mip/layer. This allows us to stop using this internal struct in other classes. BUG=angleproject:1635 Change-Id: Ic5a11781bf45fe7835437fa1e363c190b876d453 Reviewed-on: https://chromium-review.googlesource.com/469152 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Geoff Lang 47110bf4 2016-04-20T11:13:22 Implement CHROMIUM_copy_compressed_texture for D3D11. BUG=angleproject:1356 Change-Id: Id563997d2921cf558c52a781ae66d8bde58d1f2f Reviewed-on: https://chromium-review.googlesource.com/339847 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Jamie Madill a3944d4f 2016-07-22T22:13:26 Add gl::Format to represent a texture/rb/surface format. This has a few advantages: it preserves all the information of the internal format, such as if it is sized or unsized. It also saves looking up the format multiple times in the table, which should improve speed in some cases. The extra sized-ness information will allow us to perform the correct validation in CopyTexSubImage calls. BUG=angleproject:1228 Change-Id: I42954771b0a9a968f5d787b8cf6e0af721791855 Reviewed-on: https://chromium-review.googlesource.com/362626 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 362876b1 2016-06-16T14:46:59 Cache Framebuffer completeness. Improves performance on the render-to-texture microbenchmark by ~3x on the OpenGL back-end. Wipes out several of the top profling hotspots on that benchmark. BUG=angleproject:1388 Change-Id: I6a35a0b435b2ed3c83d32acdb9df090df98214ad Reviewed-on: https://chromium-review.googlesource.com/348957 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Geoff Lang 70d0f499 2015-12-10T17:45:46 Implement GL_KHR_debug. BUG=angleproject:520 Change-Id: I9ced3e7ab1515feddf2ec103c26b2610a45b1784 Reviewed-on: https://chromium-review.googlesource.com/319830 Tryjob-Request: Geoff Lang <geofflang@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang 66988745 2015-12-22T19:39:19 Revert "Implement GL_KHR_debug." This reverts commit 6c521b7a70a53b1c9f7762e53e34b5a8146b0f7b. Change-Id: I6ff981198e31f34d3e405edea6277ee75516d6ee Reviewed-on: https://chromium-review.googlesource.com/319820 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang 6c521b7a 2015-12-10T17:45:46 Implement GL_KHR_debug. BUG=angleproject:520 Change-Id: I78d14cc8c94f5cef58604220f0ca847473b25bf8 Reviewed-on: https://chromium-review.googlesource.com/317820 Tryjob-Request: Geoff Lang <geofflang@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill 6b120b9f 2015-11-24T13:00:07 Add checks for FBO attachment layer. We would allow the app to attach layers that were out-of-bounds. Fix this by checking against the underlying resource dimensions. Also rework the code a bit to clean up the texture size query, which is available from the ImageDesc. BUG=angleproject:869 Change-Id: I984f1db16daea6ca650d795884d8ec2cb8f05ebb Reviewed-on: https://chromium-review.googlesource.com/313991 Tryjob-Request: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Corentin Wallez 51706eae 2015-08-07T14:39:22 Make FramebufferAttachmentObject not refcountable Re-land with a fix for an unitialized variable Instead the refcount is done via callbacks. This allows Surface to ignore this refcounting which will be useful in a follow-up CL. BUG=angleproject:891 Change-Id: I1925ccaa4ce7b502b33088660d31c404b8313cb5 Reviewed-on: https://chromium-review.googlesource.com/293712 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Corentin Wallez <cwallez@chromium.org>
Cooper Partin 4d61f7ed 2015-08-12T10:56:50 Reland Fixed compiler warning C4267 'conversion from 'size_t' to 'type', possible loss of data' Additional warnings found with more testing and added C4267 warning disable only for angle_libpng BUG=angleproject:1120 Change-Id: Ic403dcff5a8018056fa51a8c408e64207f3362eb Reviewed-on: https://chromium-review.googlesource.com/293028 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Corentin Wallez 0020426e 2015-08-12T19:07:29 Revert "Make FramebufferAttachmentObject not refcountable" BUG= This reverts commit 19ba57469aa02074d094a9aef104f84d0b6d881e. Change-Id: I5dce6c8a81570e22affbcaf32183a97c97849718 Reviewed-on: https://chromium-review.googlesource.com/293351 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Tested-by: Corentin Wallez <cwallez@chromium.org>
Corentin Wallez 19ba5746 2015-08-07T14:39:22 Make FramebufferAttachmentObject not refcountable Instead the refcount is done via callbacks. This allows Surface to ignore this refcounting which will be useful in a follow-up CL. BUG=angleproject:891 Change-Id: I39b028476e0e3ab1837c033e1121ea21e54d7970 Reviewed-on: https://chromium-review.googlesource.com/291651 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Corentin Wallez <cwallez@chromium.org>
Jamie Madill b195643c 2015-08-12T17:35:20 Revert "Fixed compiler warning C4267 'conversion from 'size_t' to 'type', possible loss of data'" Seems to have quite a few warnings in 64-bit on my machine. BUG=angleproject:1120 This reverts commit c5cf9bc47d0ee028adbbf9e9f94ca567eec601dc. Change-Id: I86768b900aeba52e7a2242d9ae8949f93f1a5ba9 Reviewed-on: https://chromium-review.googlesource.com/293280 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Cooper Partin c5cf9bc4 2015-08-06T10:46:48 Fixed compiler warning C4267 'conversion from 'size_t' to 'type', possible loss of data' BUG=angleproject:1120 Change-Id: I01ef10bea7f487c2b394d030c76628f38d2ea645 Reviewed-on: https://chromium-review.googlesource.com/292780 Tested-by: Cooper Partin <coopp@microsoft.com> Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Geoff Lang a840617a 2015-07-21T16:53:39 Implement the egl and gl layers of EGL Image. Add end2end tests and unittests. BUG=angleproject:970 Change-Id: Ie8306971730a793f08dfd09ead1bfd6ff3e4623d Reviewed-on: https://chromium-review.googlesource.com/291260 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang 4274f7d2 2015-08-05T23:07:38 Revert "Implement the egl and gl layers of EGL Image." This reverts commit 22a4f38c2ca9ca430b5f976fc7fc816d88918eba. Change-Id: I07acbfe28d11675236de2ea7f6b050c25f80579a Reviewed-on: https://chromium-review.googlesource.com/290960 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang 22a4f38c 2015-07-21T16:53:39 Implement the egl and gl layers of EGL Image. Add end2end tests and unittests. BUG=angleproject:970 Change-Id: I13fc501b24c3f11bfedc810c1ff80fcf1318877c Reviewed-on: https://chromium-review.googlesource.com/287343 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@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 79481d65 2015-04-14T08:13:47 Add FramebufferAttachmentObject base class. This lets us share objects (Textures/RBs/Surface) in the attachment class. It will let us squash the attachment classes into one type, which will in turn let us store them by-value, instead of by-pointer. BUG=angleproject:963 Change-Id: Ia9a43dbc3b99475c00f6bc2ed5475deef55addc3 Reviewed-on: https://chromium-review.googlesource.com/263487 Reviewed-by: Kenneth Russell <kbr@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Geoff Lang cd69f1c9 2015-03-18T14:33:23 Implement RenderbufferGL. BUG=angleproject:886 Change-Id: I7480943d678b2cdf6e997c3f8316acdef32f5f0d Reviewed-on: https://chromium-review.googlesource.com/260889 Reviewed-by: Kenneth Russell <kbr@chromium.org> Reviewed-by: Brandon Jones <bajones@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang a08e1bd0 2015-03-24T10:17:18 Split Renderbuffer::setStorage into two functions to match the API. BUG=angleproject:886 Change-Id: I74375351339464b450c2f058adbeed7a1ba18cdd Reviewed-on: https://chromium-review.googlesource.com/262125 Reviewed-by: Brandon Jones <bajones@chromium.org> Reviewed-by: Kenneth Russell <kbr@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill bdd419f9 2015-03-20T15:29:42 Fix ResourceManager create-on-bind reallocations. *re-land with build fix for Clang* We had a funny bug where the Handle Allocator would re-allocate reserved handles after the app layer creates one with Bind rather than using Gen. This affects Textures, Buffers and Renderbuffers. Fix this by using a different allocation scheme. It should still be fast on the "good" case (using Gen) and use tree lookups on the bind case. Also add some unit tests. BUG=angleproject:942 Change-Id: I63ce608fcd6a11f92e2b5421f090551934e729ed Reviewed-on: https://chromium-review.googlesource.com/261591 Tested-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill 21045f5a 2015-03-20T19:28:45 Revert "Fix ResourceManager create-on-bind reallocations." Build break on GPU FYI Bots on Linux/Mac: http://build.chromium.org/p/chromium.gpu.fyi/builders/GPU%20Mac%20Builder/builds/28092 This reverts commit 61ce1a414e74f6a72a520d6adf59bff13aff03a0. Change-Id: If2e7fb35c769708a783a32932b777dc97eaba8a4 Reviewed-on: https://chromium-review.googlesource.com/261590 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 61ce1a41 2015-03-20T13:13:04 Fix ResourceManager create-on-bind reallocations. We had a funny bug where the Handle Allocator would re-allocate reserved handles after the app layer creates one with Bind rather than using Gen. This affects Textures, Buffers and Renderbuffers. Fix this by using a different allocation scheme. It should still be fast on the "good" case (using Gen) and use tree lookups on the bind case. Also add some unit tests. BUG=angleproject:942 Change-Id: I2e3f4c31b28cb86bd3699035f5d55568a2a1d7d5 Reviewed-on: https://chromium-review.googlesource.com/258904 Reviewed-by: Jamie Madill <jmadill@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>
Jamie Madill d98bbc39 2014-12-03T11:36:42 Remove RendererD3D header from Renderbuffer.cpp. BUG=angle:773 Change-Id: Idb9f840c0a83550bd9a58c3c4599c65ee916fa3c Reviewed-on: https://chromium-review.googlesource.com/231853 Tested-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Kenneth Russell <kbr@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>