Skip to content

Commit

Permalink
gles: Pullback texture data for all multiview layers.
Browse files Browse the repository at this point in the history
Previously we weren't considering multiview, and the 0'th view was only displayed in the texture view.
  • Loading branch information
ben-clayton committed Dec 9, 2017
1 parent c41f7ac commit 5f74594
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions gapis/api/gles/api/draw_commands.api
Original file line number Diff line number Diff line change
Expand Up @@ -306,12 +306,16 @@ sub void PrimitiveBoundingBox(GLfloat minX, GLfloat minY, GLfloat minZ, GLfloat

// WriteGPUFramebufferData updates the data of the given FramebufferAttachment.
sub void WriteGPUFramebufferAttachment(FramebufferAttachment a) {
img := GetTextureImage(a.Texture, a.TextureLevel, a.TextureLayer)
if img != null {
if img.Data == null {
img.Data = ReadGPUTextureData(a.Texture, a.TextureLevel, a.TextureLayer)
} else {
copy(img.Data, ReadGPUTextureData(a.Texture, a.TextureLevel, a.TextureLayer))
numViews := a.NumViews
for view in (0 .. numViews) {
layer := a.TextureLayer + as!GLint(view)
img := GetTextureImage(a.Texture, a.TextureLevel, layer)
if img != null {
if img.Data == null {
img.Data = ReadGPUTextureData(a.Texture, a.TextureLevel, layer)
} else {
copy(img.Data, ReadGPUTextureData(a.Texture, a.TextureLevel, layer))
}
}
}
}
Expand Down

0 comments on commit 5f74594

Please sign in to comment.