[virglrenderer-devel] [PATCH 1/2] allow non-samplable formats can be renderable

Erik Faye-Lund erik.faye-lund at collabora.com
Mon Jul 9 15:03:36 UTC 2018


OpenGL allows for formats that are non-samplable, yet can be
rendered to. It's not very likely to occur, but there's no reason
to artifically tie these two traits together.

Signed-off-by: Erik Faye-Lund <erik.faye-lund at collabora.com>
---
 src/vrend_renderer.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/src/vrend_renderer.c b/src/vrend_renderer.c
index 23494a8..d0a53bf 100644
--- a/src/vrend_renderer.c
+++ b/src/vrend_renderer.c
@@ -7167,11 +7167,10 @@ static bool vrend_renderer_fill_caps_common(uint32_t set, UNUSED uint32_t versio
       uint32_t index = i % 32;
 
       if (tex_conv_table[i].internalformat != 0) {
-         if (vrend_format_can_sample(i)) {
+         if (vrend_format_can_sample(i))
             caps->v1.sampler.bitmask[offset] |= (1 << index);
-            if (vrend_format_can_render(i))
-               caps->v1.render.bitmask[offset] |= (1 << index);
-         }
+         if (vrend_format_can_render(i))
+            caps->v1.render.bitmask[offset] |= (1 << index);
       }
    }
 
-- 
2.18.0.rc2



More information about the virglrenderer-devel mailing list