diff options
author | Stéphane Marchesin <[email protected]> | 2012-06-25 19:45:56 -0700 |
---|---|---|
committer | Stéphane Marchesin <[email protected]> | 2012-06-26 23:18:15 -0700 |
commit | 45fc069600ddbfe07a0a0cd5280161a8c7c55dd0 (patch) | |
tree | 46b57b85495b4f09b588fed561db7da7e8562077 /src/gallium/drivers/i915/i915_screen.c | |
parent | 3bc39414ab960ecd77662e41c8df751c2c9c8984 (diff) |
i915g: Implement sRGB textures
Since we don't have them in hw we emulate them in the shader. Although not
recommended by the spec it is legit.
As a side effect we also get GL 2.1. I think this is as far as we can take
the i915.
Diffstat (limited to 'src/gallium/drivers/i915/i915_screen.c')
-rw-r--r-- | src/gallium/drivers/i915/i915_screen.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/gallium/drivers/i915/i915_screen.c b/src/gallium/drivers/i915/i915_screen.c index 9f293392f81..ff352035fb0 100644 --- a/src/gallium/drivers/i915/i915_screen.c +++ b/src/gallium/drivers/i915/i915_screen.c @@ -110,7 +110,9 @@ i915_get_shader_param(struct pipe_screen *screen, unsigned shader, enum pipe_sha return PIPE_MAX_VERTEX_SAMPLERS; else return 0; - default: + case PIPE_SHADER_CAP_INTEGERS: + return 1; + default: return draw_get_shader_param(shader, cap); } case PIPE_SHADER_FRAGMENT: @@ -290,6 +292,7 @@ i915_is_format_supported(struct pipe_screen *screen, { static const enum pipe_format tex_supported[] = { PIPE_FORMAT_B8G8R8A8_UNORM, + PIPE_FORMAT_B8G8R8A8_SRGB, PIPE_FORMAT_B8G8R8X8_UNORM, PIPE_FORMAT_R8G8B8A8_UNORM, PIPE_FORMAT_R8G8B8X8_UNORM, |