Skip to content

Commit

Permalink
llvmpipe: improve some if/switch code in llvmpipe_get_shader_param()
Browse files Browse the repository at this point in the history
Move the PIPE_SHADER_CAP_PREFERRED_IR case into the switch statement.

Signed-off-by: Brian Paul <brianp@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19289>
  • Loading branch information
brianpaul authored and Marge Bot committed Oct 25, 2022
1 parent 68f507d commit 11275ce
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/gallium/drivers/llvmpipe/lp_screen.c
Original file line number Diff line number Diff line change
Expand Up @@ -405,13 +405,12 @@ llvmpipe_get_shader_param(struct pipe_screen *screen,
FALLTHROUGH;
case PIPE_SHADER_VERTEX:
case PIPE_SHADER_GEOMETRY:
if (param == PIPE_SHADER_CAP_PREFERRED_IR) {
switch (param) {
case PIPE_SHADER_CAP_PREFERRED_IR:
if (lscreen->use_tgsi)
return PIPE_SHADER_IR_TGSI;
else
return PIPE_SHADER_IR_NIR;
}
switch (param) {
case PIPE_SHADER_CAP_MAX_TEXTURE_SAMPLERS:
/* At this time, the draw module and llvmpipe driver only
* support vertex shader texture lookups when LLVM is enabled in
Expand Down

0 comments on commit 11275ce

Please sign in to comment.