diff options
author | Brian Paul <[email protected]> | 2014-05-05 10:19:56 -0600 |
---|---|---|
committer | Brian Paul <[email protected]> | 2014-05-07 11:32:11 -0600 |
commit | 9ced3fc649ec04710a5f5c855bfb582b898cff83 (patch) | |
tree | c2619a04d906f3a2a854f51bd7b34edc6e2779cc /src | |
parent | 9b1ae44ae114d0e2ee74e3e8d0ed0bd7ad983c9a (diff) |
svga: add switch case for PIPE_SHADER_CAP_PREFERRED_IR, remove default case
Remove default switch case so we're warned of missing cases at compile
time.
Reviewed-by: José Fonseca <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/gallium/drivers/svga/svga_screen.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/src/gallium/drivers/svga/svga_screen.c b/src/gallium/drivers/svga/svga_screen.c index 8c70bb7184f..bc914b7af7f 100644 --- a/src/gallium/drivers/svga/svga_screen.c +++ b/src/gallium/drivers/svga/svga_screen.c @@ -343,11 +343,12 @@ static int svga_get_shader_param(struct pipe_screen *screen, unsigned shader, en case PIPE_SHADER_CAP_MAX_TEXTURE_SAMPLERS: case PIPE_SHADER_CAP_MAX_SAMPLER_VIEWS: return 16; - default: - debug_printf("Unexpected fragment shader query %u\n", param); - return 0; + case PIPE_SHADER_CAP_PREFERRED_IR: + return PIPE_SHADER_IR_TGSI; } - break; + /* If we get here, we failed to handle a cap above */ + debug_printf("Unexpected fragment shader query %u\n", param); + return 0; case PIPE_SHADER_VERTEX: switch (param) { @@ -394,11 +395,12 @@ static int svga_get_shader_param(struct pipe_screen *screen, unsigned shader, en case PIPE_SHADER_CAP_MAX_TEXTURE_SAMPLERS: case PIPE_SHADER_CAP_MAX_SAMPLER_VIEWS: return 0; - default: - debug_printf("Unexpected vertex shader query %u\n", param); - return 0; + case PIPE_SHADER_CAP_PREFERRED_IR: + return PIPE_SHADER_IR_TGSI; } - break; + /* If we get here, we failed to handle a cap above */ + debug_printf("Unexpected vertex shader query %u\n", param); + return 0; case PIPE_SHADER_GEOMETRY: case PIPE_SHADER_COMPUTE: /* no support for geometry or compute shaders at this time */ |