vc4: Mark the driver as supporting fragment color clamping in rast.
authorEric Anholt <eric@anholt.net>
Tue, 17 May 2016 19:15:54 +0000 (12:15 -0700)
committerEric Anholt <eric@anholt.net>
Wed, 18 May 2016 01:07:39 +0000 (18:07 -0700)
We always clamp fragment colors, since they're always 8-bit unorm, so
there's no need to have us compile separate shaders based on
GL_ARB_color_buffer_float.  This gives us precompilation of fragment
programs to the vc4_shader_state_create() level.

src/gallium/drivers/vc4/vc4_screen.c

index 6a56820709b281f5df09fbb3ac7a55db2fcec354..809ba5410aaa93938834558823b940175c44a918 100644 (file)
@@ -92,6 +92,7 @@ vc4_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
         switch (param) {
                 /* Supported features (boolean caps). */
         case PIPE_CAP_VERTEX_COLOR_UNCLAMPED:
+        case PIPE_CAP_FRAGMENT_COLOR_CLAMPED:
         case PIPE_CAP_BUFFER_MAP_PERSISTENT_COHERENT:
         case PIPE_CAP_NPOT_TEXTURES:
         case PIPE_CAP_SHAREABLE_SHADERS:
@@ -156,7 +157,6 @@ vc4_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
         case PIPE_CAP_TGSI_FS_COORD_ORIGIN_LOWER_LEFT:
         case PIPE_CAP_TGSI_FS_COORD_PIXEL_CENTER_INTEGER:
         case PIPE_CAP_TGSI_CAN_COMPACT_CONSTANTS:
-        case PIPE_CAP_FRAGMENT_COLOR_CLAMPED:
         case PIPE_CAP_VERTEX_COLOR_CLAMPED:
         case PIPE_CAP_USER_VERTEX_BUFFERS:
         case PIPE_CAP_QUERY_PIPELINE_STATISTICS: