<div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div>Hello,</div><div><br></div><div>I tried to compile latest mesa master this morning but faced with a compilation error:</div><div> intel_fbo.c: In function ‘intel_validate_framebuffer’:<br> intel_fbo.c:696:25: error: ‘GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS’ undeclared (first use in this function); did you mean ‘GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_EXT’?<br> fbo_incomplete(fb, GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS,<br> ^<br> intel_fbo.c:642:21: note: in definition of macro ‘fbo_incomplete’<br> fb->_Status = error_id; \<br> ^~~~~~~~<br> intel_fbo.c:696:25: note: each undeclared identifier is reported only once for each function it appears in<br> fbo_incomplete(fb, GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS,<br> ^<br> intel_fbo.c:642:21: note: in definition of macro ‘fbo_incomplete’<br> fb->_Status = error_id; \</div><div><br></div><div>This small change helped me but I can't say for sure that it is right:</div><div>diff --git a/src/mesa/drivers/dri/i965/intel_fbo.c b/src/mesa/drivers/dri/i965/intel_fbo.c<br>index febd1aca98..5d870c65f8 100644<br>--- a/src/mesa/drivers/dri/i965/intel_fbo.c<br>+++ b/src/mesa/drivers/dri/i965/intel_fbo.c<br>@@ -693,7 +693,7 @@ intel_validate_framebuffer(struct gl_context *ctx, struct gl_framebuffer *fb)<br> d_depth != s_depth ||<br> depthRb->mt_level != stencilRb->mt_level ||<br> depthRb->mt_layer != stencilRb->mt_layer) {<br>- fbo_incomplete(fb, GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS,<br>+ fbo_incomplete(fb, GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_EXT,<br> "FBO incomplete: depth and stencil must match in"<br> "width, height, depth, LOD and layer\n");<br> }<br></div><div><br></div><div>Thanks,</div><div>Andrii.<br></div><div><br><div class="gmail_quote"><div dir="ltr">On Thu, Nov 15, 2018 at 8:01 PM Gert Wollny <<a href="mailto:gert.wollny@collabora.com">gert.wollny@collabora.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">The driver was returning GL_FRAMEBUFFER_UNSUPPORTED for all cases of an<br>
incomplete fbo, be a bit more specific about this following the description<br>
of glCheckFramebufferStatus.<br>
<br>
This helps to keeps dEQP happy when adding EXT_texture_sRGB_R8 support.<br>
<br>
Signed-off-by: Gert Wollny <<a href="mailto:gert.wollny@collabora.com" target="_blank">gert.wollny@collabora.com</a>><br>
---<br>
src/mesa/drivers/dri/i965/intel_fbo.c | 42 +++++++++++++++------------<br>
1 file changed, 23 insertions(+), 19 deletions(-)<br>
<br>
diff --git a/src/mesa/drivers/dri/i965/intel_fbo.c b/src/mesa/drivers/dri/i965/intel_fbo.c<br>
index 2bbbc34114..d657fdf8e4 100644<br>
--- a/src/mesa/drivers/dri/i965/intel_fbo.c<br>
+++ b/src/mesa/drivers/dri/i965/intel_fbo.c<br>
@@ -629,7 +629,7 @@ intel_render_texture(struct gl_context * ctx,<br>
}<br>
<br>
<br>
-#define fbo_incomplete(fb, ...) do { \<br>
+#define fbo_incomplete(fb, error_id, ...) do { \<br>
static GLuint msg_id = 0; \<br>
if (unlikely(ctx->Const.ContextFlags & GL_CONTEXT_FLAG_DEBUG_BIT)) { \<br>
_mesa_gl_debug(ctx, &msg_id, \<br>
@@ -639,7 +639,7 @@ intel_render_texture(struct gl_context * ctx,<br>
__VA_ARGS__); \<br>
} \<br>
DBG(__VA_ARGS__); \<br>
- fb->_Status = GL_FRAMEBUFFER_UNSUPPORTED; \<br>
+ fb->_Status = error_id; \<br>
} while (0)<br>
<br>
/**<br>
@@ -693,7 +693,7 @@ intel_validate_framebuffer(struct gl_context *ctx, struct gl_framebuffer *fb)<br>
d_depth != s_depth ||<br>
depthRb->mt_level != stencilRb->mt_level ||<br>
depthRb->mt_layer != stencilRb->mt_layer) {<br>
- fbo_incomplete(fb,<br>
+ fbo_incomplete(fb, GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS,<br>
"FBO incomplete: depth and stencil must match in"<br>
"width, height, depth, LOD and layer\n");<br>
}<br>
@@ -705,7 +705,7 @@ intel_validate_framebuffer(struct gl_context *ctx, struct gl_framebuffer *fb)<br>
*/<br>
if (depthRb->mt_level != stencilRb->mt_level ||<br>
depthRb->mt_layer != stencilRb->mt_layer) {<br>
- fbo_incomplete(fb,<br>
+ fbo_incomplete(fb, GL_FRAMEBUFFER_UNSUPPORTED,<br>
"FBO incomplete: depth image level/layer %d/%d != "<br>
"stencil image %d/%d\n",<br>
depthRb->mt_level,<br>
@@ -715,13 +715,14 @@ intel_validate_framebuffer(struct gl_context *ctx, struct gl_framebuffer *fb)<br>
}<br>
} else {<br>
if (!brw->has_separate_stencil) {<br>
- fbo_incomplete(fb, "FBO incomplete: separate stencil "<br>
- "unsupported\n");<br>
+ fbo_incomplete(fb, GL_FRAMEBUFFER_UNSUPPORTED,<br>
+ "FBO incomplete: separate stencil unsupported\n");<br>
}<br>
if (stencil_mt->format != MESA_FORMAT_S_UINT8) {<br>
- fbo_incomplete(fb, "FBO incomplete: separate stencil is %s "<br>
- "instead of S8\n",<br>
- _mesa_get_format_name(stencil_mt->format));<br>
+ fbo_incomplete(fb, GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT,<br>
+ "FBO incomplete: separate stencil is %s "<br>
+ "instead of S8\n",<br>
+ _mesa_get_format_name(stencil_mt->format));<br>
}<br>
if (devinfo->gen < 7 && !intel_renderbuffer_has_hiz(depthRb)) {<br>
/* Before Gen7, separate depth and stencil buffers can be used<br>
@@ -730,8 +731,8 @@ intel_validate_framebuffer(struct gl_context *ctx, struct gl_framebuffer *fb)<br>
* [DevSNB]: This field must be set to the same value (enabled<br>
* or disabled) as Hierarchical Depth Buffer Enable.<br>
*/<br>
- fbo_incomplete(fb, "FBO incomplete: separate stencil "<br>
- "without HiZ\n");<br>
+ fbo_incomplete(fb, GL_FRAMEBUFFER_UNSUPPORTED,<br>
+ "FBO incomplete: separate stencil without HiZ\n");<br>
}<br>
}<br>
}<br>
@@ -749,29 +750,32 @@ intel_validate_framebuffer(struct gl_context *ctx, struct gl_framebuffer *fb)<br>
*/<br>
rb = fb->Attachment[i].Renderbuffer;<br>
if (rb == NULL) {<br>
- fbo_incomplete(fb, "FBO incomplete: attachment without "<br>
- "renderbuffer\n");<br>
+ fbo_incomplete(fb, GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT,<br>
+ "FBO incomplete: attachment without "<br>
+ "renderbuffer\n");<br>
continue;<br>
}<br>
<br>
if (fb->Attachment[i].Type == GL_TEXTURE) {<br>
if (rb->TexImage->Border) {<br>
- fbo_incomplete(fb, "FBO incomplete: texture with border\n");<br>
+ fbo_incomplete(fb, GL_FRAMEBUFFER_UNSUPPORTED,<br>
+ "FBO incomplete: texture with border\n");<br>
continue;<br>
}<br>
}<br>
<br>
irb = intel_renderbuffer(rb);<br>
if (irb == NULL) {<br>
- fbo_incomplete(fb, "FBO incomplete: software rendering "<br>
- "renderbuffer\n");<br>
+ fbo_incomplete(fb, GL_FRAMEBUFFER_UNSUPPORTED,<br>
+ "FBO incomplete: software rendering renderbuffer\n");<br>
continue;<br>
}<br>
<br>
if (!brw_render_target_supported(brw, rb)) {<br>
- fbo_incomplete(fb, "FBO incomplete: Unsupported HW "<br>
- "texture/renderbuffer format attached: %s\n",<br>
- _mesa_get_format_name(intel_rb_format(irb)));<br>
+ fbo_incomplete(fb, GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT,<br>
+ "FBO incomplete: Unsupported HW "<br>
+ "texture/renderbuffer format attached: %s\n",<br>
+ _mesa_get_format_name(intel_rb_format(irb)));<br>
}<br>
}<br>
}<br>
-- <br>
2.19.1<br>
<br>
_______________________________________________<br>
mesa-dev mailing list<br>
<a href="mailto:mesa-dev@lists.freedesktop.org" target="_blank">mesa-dev@lists.freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/mesa-dev" rel="noreferrer" target="_blank">https://lists.freedesktop.org/mailman/listinfo/mesa-dev</a><br>
</blockquote></div></div></div></div></div></div></div></div></div>