aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/gallium/auxiliary
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2014-10-12 21:11:32 +0200
committermarha <marha@users.sourceforge.net>2014-10-12 21:38:35 +0200
commit1a83b8e49a75e2dab63805de25e384e0e38c27ed (patch)
tree5280fe2a1bd2ce227e4bce9ce06134986e181de1 /mesalib/src/gallium/auxiliary
parent4aea4b223604c589828beb1145875a5fbcc41eed (diff)
parent9480392b8817f8bfa79cbc694ff039a73fc0a57f (diff)
downloadvcxsrv-1a83b8e49a75e2dab63805de25e384e0e38c27ed.tar.gz
vcxsrv-1a83b8e49a75e2dab63805de25e384e0e38c27ed.tar.bz2
vcxsrv-1a83b8e49a75e2dab63805de25e384e0e38c27ed.zip
Merge remote-tracking branch 'origin/released'
Conflicts: mesalib/src/glsl/glsl_symbol_table.h mesalib/src/mesa/drivers/common/meta_blit.c xorg-server/dix/dispatch.c xorg-server/glx/indirect_dispatch.c xorg-server/glx/indirect_dispatch_swap.c xorg-server/mi/miexpose.c
Diffstat (limited to 'mesalib/src/gallium/auxiliary')
-rw-r--r--mesalib/src/gallium/auxiliary/Android.mk4
-rw-r--r--mesalib/src/gallium/auxiliary/Makefile.sources1
-rw-r--r--mesalib/src/gallium/auxiliary/hud/hud_context.c9
-rw-r--r--mesalib/src/gallium/auxiliary/util/u_math.h12
-rw-r--r--mesalib/src/gallium/auxiliary/util/u_pstipple.c8
5 files changed, 21 insertions, 13 deletions
diff --git a/mesalib/src/gallium/auxiliary/Android.mk b/mesalib/src/gallium/auxiliary/Android.mk
index 11fc2256a..8046943c1 100644
--- a/mesalib/src/gallium/auxiliary/Android.mk
+++ b/mesalib/src/gallium/auxiliary/Android.mk
@@ -30,7 +30,9 @@ include $(CLEAR_VARS)
LOCAL_SRC_FILES := $(C_SOURCES)
-LOCAL_C_INCLUDES := $(GALLIUM_TOP)/auxiliary/util
+LOCAL_C_INCLUDES := \
+ $(GALLIUM_TOP)/auxiliary/util \
+ $(MESA_TOP)/src
LOCAL_MODULE := libmesa_gallium
diff --git a/mesalib/src/gallium/auxiliary/Makefile.sources b/mesalib/src/gallium/auxiliary/Makefile.sources
index 58d8af71f..f6621ef99 100644
--- a/mesalib/src/gallium/auxiliary/Makefile.sources
+++ b/mesalib/src/gallium/auxiliary/Makefile.sources
@@ -75,6 +75,7 @@ C_SOURCES := \
tgsi/tgsi_exec.c \
tgsi/tgsi_info.c \
tgsi/tgsi_iterate.c \
+ tgsi/tgsi_lowering.c \
tgsi/tgsi_parse.c \
tgsi/tgsi_sanity.c \
tgsi/tgsi_scan.c \
diff --git a/mesalib/src/gallium/auxiliary/hud/hud_context.c b/mesalib/src/gallium/auxiliary/hud/hud_context.c
index b6e018423..18a878118 100644
--- a/mesalib/src/gallium/auxiliary/hud/hud_context.c
+++ b/mesalib/src/gallium/auxiliary/hud/hud_context.c
@@ -44,6 +44,7 @@
#include "util/u_inlines.h"
#include "util/u_memory.h"
#include "util/u_math.h"
+#include "util/u_sampler.h"
#include "util/u_simple_shaders.h"
#include "util/u_string.h"
#include "util/u_upload_mgr.h"
@@ -1050,12 +1051,8 @@ hud_create(struct pipe_context *pipe, struct cso_context *cso)
}
/* sampler view */
- memset(&view_templ, 0, sizeof(view_templ));
- view_templ.format = hud->font.texture->format;
- view_templ.swizzle_r = PIPE_SWIZZLE_RED;
- view_templ.swizzle_g = PIPE_SWIZZLE_GREEN;
- view_templ.swizzle_b = PIPE_SWIZZLE_BLUE;
- view_templ.swizzle_a = PIPE_SWIZZLE_ALPHA;
+ u_sampler_view_default_template(
+ &view_templ, hud->font.texture, hud->font.texture->format);
hud->font_sampler_view = pipe->create_sampler_view(pipe, hud->font.texture,
&view_templ);
diff --git a/mesalib/src/gallium/auxiliary/util/u_math.h b/mesalib/src/gallium/auxiliary/util/u_math.h
index 39bd40fa1..f95c11166 100644
--- a/mesalib/src/gallium/auxiliary/util/u_math.h
+++ b/mesalib/src/gallium/auxiliary/util/u_math.h
@@ -727,6 +727,18 @@ util_bitcount(unsigned n)
#endif
}
+
+static INLINE unsigned
+util_bitcount64(uint64_t n)
+{
+#ifdef HAVE___BUILTIN_POPCOUNTLL
+ return __builtin_popcountll(n);
+#else
+ return util_bitcount(n) + util_bitcount(n >> 32);
+#endif
+}
+
+
/**
* Reverse bits in n
* Algorithm taken from:
diff --git a/mesalib/src/gallium/auxiliary/util/u_pstipple.c b/mesalib/src/gallium/auxiliary/util/u_pstipple.c
index 4f2e70234..509f815c5 100644
--- a/mesalib/src/gallium/auxiliary/util/u_pstipple.c
+++ b/mesalib/src/gallium/auxiliary/util/u_pstipple.c
@@ -407,7 +407,6 @@ util_pstipple_create_fragment_shader(struct pipe_context *pipe,
struct pipe_shader_state *new_fs;
struct pstip_transform_context transform;
const uint newLen = tgsi_num_tokens(fs->tokens) + NUM_NEW_TOKENS;
- unsigned i;
new_fs = MALLOC(sizeof(*new_fs));
if (!new_fs)
@@ -433,11 +432,8 @@ util_pstipple_create_fragment_shader(struct pipe_context *pipe,
tgsi_scan_shader(fs->tokens, &transform.info);
- /* find fragment coordinate origin property */
- for (i = 0; i < transform.info.num_properties; i++) {
- if (transform.info.properties[i].name == TGSI_PROPERTY_FS_COORD_ORIGIN)
- transform.coordOrigin = transform.info.properties[i].data[0];
- }
+ transform.coordOrigin =
+ transform.info.properties[TGSI_PROPERTY_FS_COORD_ORIGIN];
tgsi_transform_shader(fs->tokens,
(struct tgsi_token *) new_fs->tokens,