summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarek Olšák <marek.olsak@amd.com>2014-09-04 14:38:18 +0200
committerEmil Velikov <emil.l.velikov@gmail.com>2014-09-09 21:29:21 +0100
commit3f570286fc220fb898d5d41e4ff8a6e3ce862f1a (patch)
tree9d4342530f16a9141b70e2a02d87ac4a4f549ac3
parent92427707243940521fe55bab92a347d3608a5353 (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 mesa-stable@lists.freedesktop.org Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Matt Turner <mattst88@gmail.com> (cherry picked from commit 1a00f247512f22e58548053a99a706615a178672) [emil velikov: s|consts->|ctx->Const.|] Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
-rw-r--r--src/mesa/state_tracker/st_extensions.c5
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 33cd1295bfd..88891590f78 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"
@@ -278,8 +279,6 @@ void st_init_limits(struct st_context *st)
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);
@@ -643,6 +642,8 @@ void st_init_extensions(struct st_context *st)
}
}
+ ctx->Const.UniformBooleanTrue = ctx->Const.NativeIntegers ? ~0 : fui(1.0f);
+
/* Below are the cases which cannot be moved into tables easily. */
if (!ctx->Mesa_DXTn && !st->options.force_s3tc_enable) {