[Mesa-stable] [Mesa-dev] [PATCH 1/3] Revert "common: Fix PBOs for 1D_ARRAY."

Emil Velikov emil.l.velikov at gmail.com
Sat Mar 7 09:42:15 PST 2015


On 4 March 2015 at 23:15, Emil Velikov <emil.l.velikov at gmail.com> wrote:
> On 4 March 2015 at 17:22, Neil Roberts <neil at linux.intel.com> wrote:
>> This reverts commit 546aba143d13ba3f993ead4cc30b2404abfc0202.
>>
>> I think the changes to the calls to glBlitFramebuffer from this patch
>> are no different to what it was doing previously because it used to
>> set height to 1 before doing the blits. However it was introducing
>> some problems with the blit for layer 0 because this was no longer
>> special cased. It didn't fix problems with the yoffset which needs to
>> be interpreted as a slice offset. I think a better solution would be
>> to modify the original if statement to cope with the yoffset.
>>
> Neil, if others agree with this revert can you cc stable. Seems that
> the offending commit already has the tag, plus I've already picked it
> up :-\
>
Hi Neil,

There was a conflict while picking this for 10.5 due to commit
a44606eb816(meta: In pbo_{Get,}TexSubImage don't repeatedly rebind the
source tex). I've resolved it as follows, and I'm planning to commit
it around Tuesday lunchtime. Do let me know if you have any comments.

Thanks
Emil

diff --cc src/mesa/drivers/common/meta_tex_subimage.c
index 9f0c115,1fef79d..0000000
--- a/src/mesa/drivers/common/meta_tex_subimage.c
+++ b/src/mesa/drivers/common/meta_tex_subimage.c
@@@ -213,12 -229,7 +219,9 @@@ _mesa_meta_pbo_TexSubImage(struct gl_co
                                    GL_COLOR_BUFFER_BIT, GL_NEAREST))
        goto fail;

-    iters = tex_image->TexObject->Target == GL_TEXTURE_1D_ARRAY ?
-            height : depth;
-
-    for (z = 1; z < iters; z++) {
+    for (z = 1; z < depth; z++) {
 +      _mesa_meta_bind_fbo_image(GL_READ_FRAMEBUFFER, GL_COLOR_ATTACHMENT0,
 +                                pbo_tex_image, z);
        _mesa_meta_bind_fbo_image(GL_DRAW_FRAMEBUFFER, GL_COLOR_ATTACHMENT0,
                                  tex_image, zoffset + z);

@@@ -342,16 -352,9 +344,11 @@@ _mesa_meta_pbo_GetTexSubImage(struct gl
                                    GL_COLOR_BUFFER_BIT, GL_NEAREST))
        goto fail;

-    if (tex_image && tex_image->TexObject->Target == GL_TEXTURE_1D_ARRAY)
-       iters = height;
-    else
-       iters = depth;
-
-    for (z = 1; z < iters; z++) {
+    for (z = 1; z < depth; z++) {
        _mesa_meta_bind_fbo_image(GL_READ_FRAMEBUFFER, GL_COLOR_ATTACHMENT0,
                                  tex_image, zoffset + z);
 +      _mesa_meta_bind_fbo_image(GL_DRAW_FRAMEBUFFER, GL_COLOR_ATTACHMENT0,
 +                                pbo_tex_image, z);


More information about the mesa-stable mailing list