Module: Mesa
Branch: master
Commit: f61ceeb3fd368cec18b13416a65a35fc233d7799
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=f61ceeb3fd368cec18b13416a65a35fc233d7799

Author: Eric Anholt <e...@anholt.net>
Date:   Sat Jun 20 15:21:40 2015 -0700

vc4: Enable MSAA.

We still have several failures in the newly enabled tests in simulation:
sRGB downsampling is done as if it was just linear, stencil blits are not
supported on MSAA either, and derivatives are still not supported
(breaking some MSAA simulation shaders).  So, other than sRGB downsampling
quality, things seem to be in good shape.

---

 src/gallium/drivers/vc4/vc4_screen.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/gallium/drivers/vc4/vc4_screen.c 
b/src/gallium/drivers/vc4/vc4_screen.c
index 88ee48c..090579c 100644
--- a/src/gallium/drivers/vc4/vc4_screen.c
+++ b/src/gallium/drivers/vc4/vc4_screen.c
@@ -95,6 +95,7 @@ vc4_screen_get_param(struct pipe_screen *pscreen, enum 
pipe_cap param)
         case PIPE_CAP_BLEND_EQUATION_SEPARATE:
         case PIPE_CAP_TWO_SIDED_STENCIL:
         case PIPE_CAP_USER_INDEX_BUFFERS:
+        case PIPE_CAP_TEXTURE_MULTISAMPLE:
                 return 1;
 
                 /* lying for GL 2.0 */
@@ -140,7 +141,6 @@ vc4_screen_get_param(struct pipe_screen *pscreen, enum 
pipe_cap param)
         case PIPE_CAP_PREFER_BLIT_BASED_TEXTURE_TRANSFER:
         case PIPE_CAP_CONDITIONAL_RENDER:
         case PIPE_CAP_PRIMITIVE_RESTART:
-        case PIPE_CAP_TEXTURE_MULTISAMPLE:
         case PIPE_CAP_TEXTURE_BARRIER:
         case PIPE_CAP_SM3:
         case PIPE_CAP_INDEP_BLEND_ENABLE:
@@ -358,7 +358,6 @@ vc4_screen_is_format_supported(struct pipe_screen *pscreen,
         unsigned retval = 0;
 
         if ((target >= PIPE_MAX_TEXTURE_TYPES) ||
-            (sample_count > 1) ||
             !util_format_is_supported(format, usage)) {
                 return FALSE;
         }
@@ -417,11 +416,13 @@ vc4_screen_is_format_supported(struct pipe_screen 
*pscreen,
         }
 
         if ((usage & PIPE_BIND_RENDER_TARGET) &&
+            (sample_count == 0 || sample_count == VC4_MAX_SAMPLES) &&
             vc4_rt_format_supported(format)) {
                 retval |= PIPE_BIND_RENDER_TARGET;
         }
 
         if ((usage & PIPE_BIND_SAMPLER_VIEW) &&
+            (sample_count == 0 || sample_count == VC4_MAX_SAMPLES) &&
             (vc4_tex_format_supported(format))) {
                 retval |= PIPE_BIND_SAMPLER_VIEW;
         }

_______________________________________________
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to