mirror of
https://github.com/utmapp/angle.git
synced 2026-12-01 22:13:25 -10:00
WebGL: Add 3D tex copying feedback loop detection.
When copying to and from the same texture, we need to reject only the feedback loops formed with the same levels of the texture - copying between different unrelated layers and levels is fine. This change also fixes a couple bugs in our D3D11 CopyTexSubImage3D implementation. We were missing some "!" operators, and we actually would hit an ASSERT when trying to blit from a level of a 3D texture. BUG=angleproject:1685 Change-Id: Id715bebafe8336cf8bb95d0d06275a8b95e522e1 Reviewed-on: https://chromium-review.googlesource.com/425494 Commit-Queue: Jamie Madill <[email protected]> Reviewed-by: Corentin Wallez <[email protected]>
This commit is contained in:
1 parent
c8a08f40b2
commit
fd3dd436e5
6 files changed
+147
-81
No files matched your search
@@ -1068,7 +1068,9 @@ bool Framebuffer::formsRenderingFeedbackLoopWith(const State &state) const
|
||||
return false;
|
||||
}
|
||||
|
||||
bool Framebuffer::formsCopyingFeedbackLoopWith(GLuint copyTextureID, GLint copyTextureLevel) const
|
||||
bool Framebuffer::formsCopyingFeedbackLoopWith(GLuint copyTextureID,
|
||||
GLint copyTextureLevel,
|
||||
GLint copyTextureLayer) const
|
||||
{
|
||||
if (mId == 0)
|
||||
{
|
||||
@@ -1081,10 +1083,13 @@ bool Framebuffer::formsCopyingFeedbackLoopWith(GLuint copyTextureID, GLint copyT
|
||||
|
||||
if (readAttachment->isTextureWithId(copyTextureID))
|
||||
{
|
||||
// TODO(jmadill): 3D/Array texture layers.
|
||||
if (readAttachment->getTextureImageIndex().mipIndex == copyTextureLevel)
|
||||
const auto &imageIndex = readAttachment->getTextureImageIndex();
|
||||
if (imageIndex.mipIndex == copyTextureLevel)
|
||||
{
|
||||
return true;
|
||||
// Check 3D/Array texture layers.
|
||||
return imageIndex.layerIndex == ImageIndex::ENTIRE_LEVEL ||
|
||||
copyTextureLayer == ImageIndex::ENTIRE_LEVEL ||
|
||||
imageIndex.layerIndex == copyTextureLayer;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
|
||||
Reference in new issue
Block a user