<html>
<head>
<base href="https://bugs.freedesktop.org/" />
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - piglit: fbo-depth copypixels GL_DEPTH_COMPONENT32F"
href="https://bugs.freedesktop.org/show_bug.cgi?id=91433#c1">Comment # 1</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - piglit: fbo-depth copypixels GL_DEPTH_COMPONENT32F"
href="https://bugs.freedesktop.org/show_bug.cgi?id=91433">bug 91433</a>
from <span class="vcard"><a class="email" href="mailto:chris@chris-wilson.co.uk" title="Chris Wilson <chris@chris-wilson.co.uk>"> <span class="fn">Chris Wilson</span></a>
</span></b>
<pre>The right answer must be to fix the pixel transfer routines to do the copy
properly, but we can workaround the issue and ignore it for another day:
diff --git a/src/mesa/drivers/dri/i965/intel_pixel_copy.c
b/src/mesa/drivers/dri/i965/intel_pixel_copy.c
index 4313588..910f334 100644
--- a/src/mesa/drivers/dri/i965/intel_pixel_copy.c
+++ b/src/mesa/drivers/dri/i965/intel_pixel_copy.c
@@ -81,12 +81,38 @@ do_blit_copypixels(struct gl_context * ctx,
read_irb =
intel_renderbuffer(read_fb->Attachment[BUFFER_DEPTH].Renderbuffer);
break;
+
+ /* We can only blit between separate depth/stencil buffers of identical
+ * pitches (so that W-tiling anomalies are hidden by identical swizzling
+ * on both sides).
+ */
case GL_DEPTH:
- perf_debug("glCopyPixels() fallback: GL_DEPTH\n");
- return false;
+ draw_irb =
+ intel_renderbuffer(fb->Attachment[BUFFER_DEPTH].Renderbuffer);
+ read_irb =
+ intel_renderbuffer(read_fb->Attachment[BUFFER_DEPTH].Renderbuffer);
+ if (draw_irb->mt->format != MESA_FORMAT_Z_FLOAT32 ||
+ read_irb->mt->format != MESA_FORMAT_Z_FLOAT32) {
+ perf_debug("glCopyPixels() fallback: GL_DEPTH\n");
+ return false;
+ }
+ break;
case GL_STENCIL:
- perf_debug("glCopyPixels() fallback: GL_STENCIL\n");
- return false;
+ draw_irb =
+ intel_renderbuffer(fb->Attachment[BUFFER_STENCIL].Renderbuffer);
+ read_irb =
+ intel_renderbuffer(read_fb->Attachment[BUFFER_STENCIL].Renderbuffer);
+ if (draw_irb->mt->format != MESA_FORMAT_S_UINT8 ||
+ read_irb->mt->format != MESA_FORMAT_S_UINT8) {
+ perf_debug("glCopyPixels() fallback: GL_STENCIL\n");
+ return false;
+ }
+ if (draw_irb->mt->stencil_mt || read_irb->mt->stencil_mt) {
+ /* Too much complexity for proof-of-principle */
+ perf_debug("glCopyPixels() fallback: GL_STENCIL\n");
+ return false;
+ }
+ break;
default:
perf_debug("glCopyPixels(): Unknown type\n");
return false;
@@ -112,7 +138,7 @@ do_blit_copypixels(struct gl_context * ctx,
return false;
}
- if (ctx->Depth.Test) {
+ if (ctx->Depth.Test && ctx->Depth.Func != GL_ALWAYS) {
perf_debug("glCopyPixels(): Unsupported depth test state\n");
return false;
}</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the QA Contact for the bug.</li>
</ul>
</body>
</html>