diff options
author | Brian Paul <[email protected]> | 2012-06-26 14:41:46 -0600 |
---|---|---|
committer | Brian Paul <[email protected]> | 2012-06-26 15:03:44 -0600 |
commit | 55a89889ba8b9e58fdccf9d363d22aac93ba1281 (patch) | |
tree | b4c74573d8631c89fc8c9235c8be915944ba30ed /src/gallium | |
parent | 056e9b45117dee45189aa91dd6c01da08ed23ee8 (diff) |
svga: handle missing PIPE_CAP_x queries
And fix incorrect error message for a bad shader type/number.
Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/gallium')
-rw-r--r-- | src/gallium/drivers/svga/svga_screen.c | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/src/gallium/drivers/svga/svga_screen.c b/src/gallium/drivers/svga/svga_screen.c index 0d8b1d20cf9..09d76468523 100644 --- a/src/gallium/drivers/svga/svga_screen.c +++ b/src/gallium/drivers/svga/svga_screen.c @@ -118,11 +118,15 @@ svga_get_paramf(struct pipe_screen *screen, enum pipe_capf param) case PIPE_CAPF_MAX_TEXTURE_LOD_BIAS: return 15.0; - - default: - debug_printf("Unexpected PIPE_CAPF_ query %u\n", param); - return 0; + case PIPE_CAPF_GUARD_BAND_LEFT: + case PIPE_CAPF_GUARD_BAND_TOP: + case PIPE_CAPF_GUARD_BAND_RIGHT: + case PIPE_CAPF_GUARD_BAND_BOTTOM: + return 0.0; } + + debug_printf("Unexpected PIPE_CAPF_ query %u\n", param); + return 0; } @@ -233,6 +237,7 @@ svga_get_param(struct pipe_screen *screen, enum pipe_cap param) case PIPE_CAP_TGSI_INSTANCEID: case PIPE_CAP_VERTEX_ELEMENT_INSTANCE_DIVISOR: case PIPE_CAP_MAX_TEXTURE_ARRAY_LAYERS: + case PIPE_CAP_SCALED_RESOLVE: case PIPE_CAP_MIN_TEXEL_OFFSET: case PIPE_CAP_MAX_TEXEL_OFFSET: case PIPE_CAP_CONDITIONAL_RENDER: @@ -245,15 +250,15 @@ svga_get_param(struct pipe_screen *screen, enum pipe_cap param) case PIPE_CAP_GLSL_FEATURE_LEVEL: case PIPE_CAP_VERTEX_BUFFER_OFFSET_4BYTE_ALIGNED_ONLY: case PIPE_CAP_VERTEX_BUFFER_STRIDE_4BYTE_ALIGNED_ONLY: + case PIPE_CAP_COMPUTE: case PIPE_CAP_START_INSTANCE: return 0; case PIPE_CAP_VERTEX_ELEMENT_SRC_OFFSET_4BYTE_ALIGNED_ONLY: return 1; - - default: - debug_printf("Unexpected PIPE_CAP_ query %u\n", param); - return 0; } + + debug_printf("Unexpected PIPE_CAP_ query %u\n", param); + return 0; } static int svga_get_shader_param(struct pipe_screen *screen, unsigned shader, enum pipe_shader_cap param) @@ -364,7 +369,7 @@ static int svga_get_shader_param(struct pipe_screen *screen, unsigned shader, en /* no support for geometry shaders at this time */ return 0; default: - debug_printf("Unexpected vertex shader query %u\n", param); + debug_printf("Unexpected shader type (%u) query\n", shader); return 0; } return 0; |