diff options
author | Marek Olšák <[email protected]> | 2012-01-23 03:11:17 +0100 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2012-01-25 12:35:18 +0100 |
commit | bc1c8369384b5e16547c5bf9728aa78f8dfd66cc (patch) | |
tree | a09267d88b2c604491a607467e28a7f8fbae4146 /src/gallium/drivers/i915 | |
parent | c2e2b58a58880c9b9f189fc154205e99144e9502 (diff) |
st/mesa: do vertex and fragment color clamping in shaders
For ARB_color_buffer_float. Most hardware can't do it and st/mesa is
the perfect place for a fallback.
The exceptions are:
- r500 (vertex clamp only)
- nv50 (both)
- nvc0 (both)
- softpipe (both)
We also have to take into account that r300 can do CLAMPED vertex colors only,
while r600 can do UNCLAMPED vertex colors only. The difference can be expressed
with the two new CAPs.
Diffstat (limited to 'src/gallium/drivers/i915')
-rw-r--r-- | src/gallium/drivers/i915/i915_screen.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/gallium/drivers/i915/i915_screen.c b/src/gallium/drivers/i915/i915_screen.c index 6fc854f20f1..aef0ed6980d 100644 --- a/src/gallium/drivers/i915/i915_screen.c +++ b/src/gallium/drivers/i915/i915_screen.c @@ -181,6 +181,7 @@ i915_get_param(struct pipe_screen *screen, enum pipe_cap cap) case PIPE_CAP_VERTEX_ELEMENT_INSTANCE_DIVISOR: case PIPE_CAP_BLEND_EQUATION_SEPARATE: case PIPE_CAP_TGSI_INSTANCEID: + case PIPE_CAP_VERTEX_COLOR_CLAMPED: return 1; /* Unsupported features (boolean caps). */ @@ -196,12 +197,13 @@ i915_get_param(struct pipe_screen *screen, enum pipe_cap cap) case PIPE_CAP_SEAMLESS_CUBE_MAP: case PIPE_CAP_SEAMLESS_CUBE_MAP_PER_TEXTURE: case PIPE_CAP_SCALED_RESOLVE: - case PIPE_CAP_FRAGMENT_COLOR_CLAMP_CONTROL: + case PIPE_CAP_FRAGMENT_COLOR_CLAMPED: case PIPE_CAP_MIXED_COLORBUFFER_FORMATS: case PIPE_CAP_CONDITIONAL_RENDER: case PIPE_CAP_TEXTURE_BARRIER: case PIPE_CAP_TGSI_CAN_COMPACT_VARYINGS: case PIPE_CAP_TGSI_CAN_COMPACT_CONSTANTS: + case PIPE_CAP_VERTEX_COLOR_UNCLAMPED: return 0; /* Features we can lie about (boolean caps). */ |