diff options
author | Brian Paul <brianp@vmware.com> | 2012-04-04 16:04:00 -0600 |
---|---|---|
committer | Brian Paul <brianp@vmware.com> | 2012-04-06 14:10:50 -0600 |
commit | d7707ef5a554ca0a1ec17b9491055e8c8db570c4 (patch) | |
tree | 73f1d4ec53f37b8aade0aa32b5c7d5edf6e474d8 | |
parent | 0adc5d9cfdd94bc5cbc3d45b9ada3d13ac4adb7c (diff) |
svga: return 1 for PIPE_CAP_VERTEX_COLOR_UNCLAMPED query
Before, we weren't clamping the vertex colors produced by ARB vertex
programs. This could result in some rendering being too bright (in
ETQW, for example).
Also add cases for PIPE_CAP_VERTEX_COLOR_CLAMPED and
PIPE_CAP_FRAGMENT_COLOR_CLAMPED with comments to be complete.
Reviewed-by: José Fonseca <jfonseca@vmware.com>
-rw-r--r-- | src/gallium/drivers/svga/svga_screen.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/gallium/drivers/svga/svga_screen.c b/src/gallium/drivers/svga/svga_screen.c index 8badcb2a595..b2f3e33a6f0 100644 --- a/src/gallium/drivers/svga/svga_screen.c +++ b/src/gallium/drivers/svga/svga_screen.c @@ -203,6 +203,13 @@ svga_get_param(struct pipe_screen *screen, enum pipe_cap param) case PIPE_CAP_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION: return 0; + case PIPE_CAP_VERTEX_COLOR_UNCLAMPED: + return 1; /* The color outputs of vertex shaders are not clamped */ + case PIPE_CAP_VERTEX_COLOR_CLAMPED: + return 0; /* The driver can't clamp vertex colors */ + case PIPE_CAP_FRAGMENT_COLOR_CLAMPED: + return 0; /* The driver can't clamp fragment colors */ + default: return 0; } |