[virglrenderer-devel] [PATCH] renderer: remove the extra block in fb_bind_texture()

ramin.azarmehr at gmail.com ramin.azarmehr at gmail.com
Fri Jun 15 18:18:41 UTC 2018


From: Ramin Azarmehr <ramin.azarmehr at gmail.com>

---
 src/vrend_renderer.c | 17 ++++++++---------
 1 file changed, 8 insertions(+), 9 deletions(-)

diff --git a/src/vrend_renderer.c b/src/vrend_renderer.c
index 8b0a1e0..141fa18 100644
--- a/src/vrend_renderer.c
+++ b/src/vrend_renderer.c
@@ -1466,15 +1466,14 @@ void vrend_fb_bind_texture(struct vrend_resource *res,
    const struct util_format_description *desc = util_format_description(res->base.format);
    GLenum attachment = GL_COLOR_ATTACHMENT0_EXT + idx;
 
-   if (vrend_format_is_ds(res->base.format)) { {
-         if (util_format_has_stencil(desc)) {
-            if (util_format_has_depth(desc))
-               attachment = GL_DEPTH_STENCIL_ATTACHMENT;
-            else
-               attachment = GL_STENCIL_ATTACHMENT;
-         } else
-            attachment = GL_DEPTH_ATTACHMENT;
-      }
+   if (vrend_format_is_ds(res->base.format)) {
+      if (util_format_has_stencil(desc)) {
+         if (util_format_has_depth(desc))
+            attachment = GL_DEPTH_STENCIL_ATTACHMENT;
+         else
+            attachment = GL_STENCIL_ATTACHMENT;
+      } else
+         attachment = GL_DEPTH_ATTACHMENT;
    }
 
    switch (res->target) {
-- 
2.17.1



More information about the virglrenderer-devel mailing list