[Mesa-dev] [PATCH 02/12] intel: Clarify the depthRb == stencilRb logic.
Chad Versace
chad at chad-versace.us
Wed Jul 13 15:52:57 PDT 2011
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 07/12/2011 03:22 PM, Eric Anholt wrote:
> ---
> src/mesa/drivers/dri/intel/intel_fbo.c | 31 +++++++++++++++----------------
> 1 files changed, 15 insertions(+), 16 deletions(-)
>
> diff --git a/src/mesa/drivers/dri/intel/intel_fbo.c b/src/mesa/drivers/dri/intel/intel_fbo.c
> index 1669af2..55bcc75 100644
> --- a/src/mesa/drivers/dri/intel/intel_fbo.c
> +++ b/src/mesa/drivers/dri/intel/intel_fbo.c
> @@ -783,22 +783,21 @@ intel_validate_framebuffer(struct gl_context *ctx, struct gl_framebuffer *fb)
> * The depth and stencil renderbuffers are the same renderbuffer or wrap
> * the same texture.
> */
> - bool depth_stencil_are_same;
> - if (depthRb && stencilRb && depthRb == stencilRb)
> - depth_stencil_are_same = true;
> - else if (depthRb && stencilRb && depthRb != stencilRb
> - && (fb->Attachment[BUFFER_DEPTH].Type == GL_TEXTURE)
> - && (fb->Attachment[BUFFER_STENCIL].Type == GL_TEXTURE)
> - && (fb->Attachment[BUFFER_DEPTH].Texture->Name
> - == fb->Attachment[BUFFER_STENCIL].Texture->Name))
> - depth_stencil_are_same = true;
> - else
> - depth_stencil_are_same = false;
> -
> - if (!intel->has_separate_stencil
> - && depthRb && stencilRb
> - && !depth_stencil_are_same) {
> - fb->_Status = GL_FRAMEBUFFER_UNSUPPORTED_EXT;
> + if (depthRb && stencilRb) {
> + bool depth_stencil_are_same;
> + if (depthRb == stencilRb)
> + depth_stencil_are_same = true;
> + else if ((fb->Attachment[BUFFER_DEPTH].Type == GL_TEXTURE) &&
> + (fb->Attachment[BUFFER_STENCIL].Type == GL_TEXTURE) &&
> + (fb->Attachment[BUFFER_DEPTH].Texture->Name ==
> + fb->Attachment[BUFFER_STENCIL].Texture->Name))
> + depth_stencil_are_same = true;
> + else
> + depth_stencil_are_same = false;
> +
> + if (!intel->has_separate_stencil && !depth_stencil_are_same) {
> + fb->_Status = GL_FRAMEBUFFER_UNSUPPORTED_EXT;
> + }
> }
>
> for (i = 0; i < Elements(fb->Attachment); i++) {
Reviewed-by: Chad Versace <chad at chad-versace.us>
- --
Chad Versace
chad at chad-versace.us
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iQIcBAEBAgAGBQJOHiHJAAoJEAIvNt057x8iS+8QAIbq+n07rnsdAKB+BPrezI0n
4IncJv06GPNBkxAnOeFKqVi/lr3yFpMSbufS6cEExoUYDoTB0bwol9GhnhEuVuJr
sUfuVOpdZ3QMPsv5MlAxwR5b9K+oNPwdxod728w+0K0lXDUEAd4zN/OjzxfLLz7m
wdKXadgk2Ncj0cyvr7rZMq7+O2wfuuycz4kp3cmi5KvZxJw6B4iylknojw/3mUyk
YFYdQAh64IEDWDp/ezEVHtLypYRiDpNgQoEsYDCX5nb7vqBPY3NYGUHhtLfwu+Iq
hyKJYVt8vNOE9vl/isq/EpPzEIs15neXgtRvXTJjzkVcmTJVTnm0OkhwqZ9VGqe4
nlczYfiLsw/38LBsQIwPA0nKdr5xMS0ZJUPsdCWUnWXgtVAjCUzuCCTpKHtmGDPd
h7I7Vo/oCnF86V5Q07/A9Qfxml++Ko9FhG5MSH0qtDukwtyBsv6Kvg2xbYzUioKQ
YH3ARrIYMTamW8Z0E9Q/2mxiIaJUURz6cbF89Gm4+J0OVKqqaI3QWzOc4d6S0BV1
swa5nsodL35e7HmEmHDedko08qbaycsmdGaXvKOPbcW5KvM0wqpS8d7H+spvWGlp
3EXsyeoyzgbkfw/0jjT06BRxZ0YtxTFxu9d8trIpWFDylkvkrd7CSOlBzud7ptkc
8Ph8mMcI3QYA3jB/WzkK
=n//C
-----END PGP SIGNATURE-----
More information about the mesa-dev
mailing list