diff options
author | Marek Olšák <[email protected]> | 2014-09-04 14:38:18 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2014-09-05 15:41:47 +0200 |
commit | 1a00f247512f22e58548053a99a706615a178672 (patch) | |
tree | 72aa85dbbf6da543e75edc7264e26418d9604e64 | |
parent | d67db73458c8d66861b97675660289a9555695ce (diff) |
st/mesa: use 1.0f as boolean true on drivers without integer support
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=82882
Cc: 10.2 10.3 [email protected]
Reviewed-by: Brian Paul <[email protected]>
Reviewed-by: Matt Turner <[email protected]>
-rw-r--r-- | src/mesa/state_tracker/st_extensions.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/mesa/state_tracker/st_extensions.c b/src/mesa/state_tracker/st_extensions.c index 9db648c036f..286c56a5563 100644 --- a/src/mesa/state_tracker/st_extensions.c +++ b/src/mesa/state_tracker/st_extensions.c @@ -34,6 +34,7 @@ #include "pipe/p_context.h" #include "pipe/p_defines.h" #include "pipe/p_screen.h" +#include "util/u_math.h" #include "st_context.h" #include "st_extensions.h" @@ -274,8 +275,6 @@ void st_init_limits(struct pipe_screen *screen, c->MinProgramTextureGatherOffset = screen->get_param(screen, PIPE_CAP_MIN_TEXTURE_GATHER_OFFSET); c->MaxProgramTextureGatherOffset = screen->get_param(screen, PIPE_CAP_MAX_TEXTURE_GATHER_OFFSET); - c->UniformBooleanTrue = ~0; - c->MaxTransformFeedbackBuffers = screen->get_param(screen, PIPE_CAP_MAX_STREAM_OUTPUT_BUFFERS); c->MaxTransformFeedbackBuffers = MIN2(c->MaxTransformFeedbackBuffers, MAX_FEEDBACK_BUFFERS); @@ -700,6 +699,8 @@ void st_init_extensions(struct pipe_screen *screen, } } + consts->UniformBooleanTrue = consts->NativeIntegers ? ~0 : fui(1.0f); + /* Below are the cases which cannot be moved into tables easily. */ if (!has_lib_dxtc && !options->force_s3tc_enable) { |