st/mesa: use a generic varying to pass the clear color to the FS
authorMarek Olšák <maraeo@gmail.com>
Mon, 14 Jan 2013 16:17:20 +0000 (17:17 +0100)
committerMarek Olšák <maraeo@gmail.com>
Tue, 15 Jan 2013 15:47:18 +0000 (16:47 +0100)
The color varying may have reduced precision or be even clamped.

Reviewed-by: Brian Paul <brianp@vmware.com>
src/mesa/state_tracker/st_cb_clear.c

index aabea6335ff35a78cc6f85cb732836d68a79572d..d01236e280624f0476b1eeca6656b55c56f23694 100644 (file)
@@ -97,7 +97,7 @@ set_fragment_shader(struct st_context *st)
 {
    if (!st->clear.fs)
       st->clear.fs =
-         util_make_fragment_passthrough_shader(st->pipe, TGSI_SEMANTIC_COLOR,
+         util_make_fragment_passthrough_shader(st->pipe, TGSI_SEMANTIC_GENERIC,
                                                TGSI_INTERPOLATE_CONSTANT);
 
    cso_set_fragment_shader_handle(st->cso_context, st->clear.fs);
@@ -116,7 +116,7 @@ set_vertex_shader(struct st_context *st)
    if (!st->clear.vs)
    {
       const uint semantic_names[] = { TGSI_SEMANTIC_POSITION,
-                                      TGSI_SEMANTIC_COLOR };
+                                      TGSI_SEMANTIC_GENERIC };
       const uint semantic_indexes[] = { 0, 0 };
       st->clear.vs = util_make_vertex_passthrough_shader(st->pipe, 2,
                                                          semantic_names,