[Mesa-dev] [PATCH] softpipe: check if we use llvm before calling draw_get_shader_param
Marek Olšák
maraeo at gmail.com
Tue Jul 3 17:57:46 PDT 2012
draw_get_shader_param returns correct CAPs if Draw was created using
draw_create.
tgsi_exec_get_shader_param should be used if draw_create_no_llvm was used.
---
This is a follow-up to my other patch:
"draw: draw_get_shader_param should return correct values WRT llvm"
src/gallium/drivers/softpipe/sp_screen.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/src/gallium/drivers/softpipe/sp_screen.c b/src/gallium/drivers/softpipe/sp_screen.c
index ade97a7..64fa22c 100644
--- a/src/gallium/drivers/softpipe/sp_screen.c
+++ b/src/gallium/drivers/softpipe/sp_screen.c
@@ -198,7 +198,11 @@ softpipe_get_shader_param(struct pipe_screen *screen, unsigned shader, enum pipe
#endif
/* fallthrough */
default:
- return draw_get_shader_param(shader, param);
+#ifdef HAVE_LLVM
+ if (sp_screen->use_llvm)
+ return draw_get_shader_param(shader, param);
+#endif
+ return tgsi_exec_get_shader_param(param);
}
default:
return 0;
--
1.7.4.1
More information about the mesa-dev
mailing list