summaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorBen Skeggs <[email protected]>2008-07-27 00:54:57 +1000
committerBen Skeggs <[email protected]>2008-07-27 00:54:57 +1000
commit9e445d3e6374c2a9b163f1262ea5a1047e596cae (patch)
tree7a63f048928947fb57342de9b53a3d0924f50d5b /src/gallium
parentd1dc937c62083c3d8ab9f420df8e54f5c3217468 (diff)
parentff7a7031caa0ac592f210aca696a20c9de6dc0d4 (diff)
Merge remote branch 'upstream/gallium-0.1' into nouveau-gallium-0.1
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/auxiliary/tgsi/exec/tgsi_exec.h2
-rw-r--r--src/gallium/auxiliary/tgsi/util/tgsi_dump.c8
-rw-r--r--src/gallium/auxiliary/tgsi/util/tgsi_sanity.c2
-rw-r--r--src/gallium/auxiliary/tgsi/util/tgsi_util.c2
-rw-r--r--src/gallium/auxiliary/util/p_debug.c12
-rw-r--r--src/gallium/auxiliary/util/u_snprintf.c10
-rw-r--r--src/gallium/drivers/softpipe/sp_tile_cache.c2
-rw-r--r--src/gallium/include/pipe/p_util.h63
-rw-r--r--src/gallium/winsys/dri/intel/intel_screen.c8
9 files changed, 92 insertions, 17 deletions
diff --git a/src/gallium/auxiliary/tgsi/exec/tgsi_exec.h b/src/gallium/auxiliary/tgsi/exec/tgsi_exec.h
index 18abdd9ac00..4f30650b07b 100644
--- a/src/gallium/auxiliary/tgsi/exec/tgsi_exec.h
+++ b/src/gallium/auxiliary/tgsi/exec/tgsi_exec.h
@@ -100,7 +100,7 @@ struct tgsi_exec_labels
};
-#define TGSI_EXEC_NUM_TEMPS 64
+#define TGSI_EXEC_NUM_TEMPS 128
#define TGSI_EXEC_NUM_TEMP_EXTRAS 6
#define TGSI_EXEC_NUM_IMMEDIATES 256
diff --git a/src/gallium/auxiliary/tgsi/util/tgsi_dump.c b/src/gallium/auxiliary/tgsi/util/tgsi_dump.c
index 94180f7e507..d2e6375212f 100644
--- a/src/gallium/auxiliary/tgsi/util/tgsi_dump.c
+++ b/src/gallium/auxiliary/tgsi/util/tgsi_dump.c
@@ -491,9 +491,17 @@ tgsi_dump_instruction(
src->SrcRegisterExtSwz.ExtSwizzleZ != TGSI_EXTSWIZZLE_Z ||
src->SrcRegisterExtSwz.ExtSwizzleW != TGSI_EXTSWIZZLE_W) {
CHR( '.' );
+ if (src->SrcRegisterExtSwz.NegateX)
+ TXT("-");
ENM( src->SrcRegisterExtSwz.ExtSwizzleX, extswizzle_names );
+ if (src->SrcRegisterExtSwz.NegateY)
+ TXT("-");
ENM( src->SrcRegisterExtSwz.ExtSwizzleY, extswizzle_names );
+ if (src->SrcRegisterExtSwz.NegateZ)
+ TXT("-");
ENM( src->SrcRegisterExtSwz.ExtSwizzleZ, extswizzle_names );
+ if (src->SrcRegisterExtSwz.NegateW)
+ TXT("-");
ENM( src->SrcRegisterExtSwz.ExtSwizzleW, extswizzle_names );
}
diff --git a/src/gallium/auxiliary/tgsi/util/tgsi_sanity.c b/src/gallium/auxiliary/tgsi/util/tgsi_sanity.c
index 9673f061ce3..2e3ec96b5b5 100644
--- a/src/gallium/auxiliary/tgsi/util/tgsi_sanity.c
+++ b/src/gallium/auxiliary/tgsi/util/tgsi_sanity.c
@@ -198,7 +198,7 @@ iter_instruction(
inst->FullSrcRegisters[i].SrcRegister.File,
inst->FullSrcRegisters[i].SrcRegister.Index,
"source",
- inst->FullSrcRegisters[i].SrcRegister.Indirect );
+ (boolean)inst->FullSrcRegisters[i].SrcRegister.Indirect );
if (inst->FullSrcRegisters[i].SrcRegister.Indirect) {
uint file;
int index;
diff --git a/src/gallium/auxiliary/tgsi/util/tgsi_util.c b/src/gallium/auxiliary/tgsi/util/tgsi_util.c
index 10762b6c1a0..09486e649e1 100644
--- a/src/gallium/auxiliary/tgsi/util/tgsi_util.c
+++ b/src/gallium/auxiliary/tgsi/util/tgsi_util.c
@@ -119,7 +119,7 @@ tgsi_util_get_full_src_register_extswizzle(
if( swizzle <= TGSI_SWIZZLE_W ) {
swizzle = tgsi_util_get_src_register_swizzle(
&reg->SrcRegister,
- component );
+ swizzle );
}
return swizzle;
diff --git a/src/gallium/auxiliary/util/p_debug.c b/src/gallium/auxiliary/util/p_debug.c
index b0240ad7375..cdc7e66361d 100644
--- a/src/gallium/auxiliary/util/p_debug.c
+++ b/src/gallium/auxiliary/util/p_debug.c
@@ -73,8 +73,7 @@ _EngDebugPrint(const char *format, ...)
void _debug_vprintf(const char *format, va_list ap)
{
-#ifdef PIPE_SUBSYSTEM_WINDOWS_DISPLAY
-#ifndef WINCE
+#if defined(PIPE_SUBSYSTEM_WINDOWS_DISPLAY)
/* EngDebugPrint does not handle float point arguments, so we need to use
* our own vsnprintf implementation. It is also very slow, so buffer until
* we find a newline. */
@@ -85,9 +84,6 @@ void _debug_vprintf(const char *format, va_list ap)
_EngDebugPrint("%s", buf);
buf[0] = '\0';
}
-#else
- /* TODO: Implement debug print for WINCE */
-#endif
#elif defined(PIPE_SUBSYSTEM_WINDOWS_USER)
/* EngDebugPrint does not handle float point arguments, so we need to use
* our own vsnprintf implementation. It is also very slow, so buffer until
@@ -99,7 +95,9 @@ void _debug_vprintf(const char *format, va_list ap)
OutputDebugStringA(buf);
buf[0] = '\0';
}
-#else
+#elif defined(PIPE_SUBSYSTEM_WINDOWS_CE) || defined(PIPE_SUBSYSTEM_WINDOWS_MINIPORT)
+ /* TODO */
+#else /* !PIPE_SUBSYSTEM_WINDOWS */
vfprintf(stderr, format, ap);
#endif
}
@@ -211,7 +209,7 @@ _debug_get_option(const char *name)
#else
return NULL;
#endif
-#elif defined(PIPE_SUBSYSTEM_WINDOWS_CE)
+#elif defined(PIPE_SUBSYSTEM_WINDOWS_CE) || defined(PIPE_SUBSYSTEM_WINDOWS_MINIPORT)
/* TODO: implement */
return NULL;
#else
diff --git a/src/gallium/auxiliary/util/u_snprintf.c b/src/gallium/auxiliary/util/u_snprintf.c
index c4f4bbd30c2..7fa84d8bec6 100644
--- a/src/gallium/auxiliary/util/u_snprintf.c
+++ b/src/gallium/auxiliary/util/u_snprintf.c
@@ -162,6 +162,8 @@
* <http://www.jhweiss.de/software/snprintf.html>.
*/
+#include "pipe/p_config.h"
+
#if HAVE_CONFIG_H
#include <config.h>
#else
@@ -1102,7 +1104,11 @@ again:
* Factor of ten with the number of digits needed for the fractional
* part. For example, if the precision is 3, the mask will be 1000.
*/
+#if defined(PIPE_SUBSYSTEM_WINDOWS_MINIPORT)
+ mask = (unsigned long)mypow10(precision);
+#else
mask = (UINTMAX_T)mypow10(precision);
+#endif
/*
* We "cheat" by converting the fractional part to integer by
* multiplying by a factor of ten.
@@ -1354,7 +1360,11 @@ cast(LDOUBLE value)
if (value >= UINTMAX_MAX)
return UINTMAX_MAX;
+#if defined(PIPE_SUBSYSTEM_WINDOWS_MINIPORT)
+ result = (unsigned long)value;
+#else
result = (UINTMAX_T)value;
+#endif
/*
* At least on NetBSD/sparc64 3.0.2 and 4.99.30, casting long double to
* an integer type converts e.g. 1.9 to 2 instead of 1 (which violates
diff --git a/src/gallium/drivers/softpipe/sp_tile_cache.c b/src/gallium/drivers/softpipe/sp_tile_cache.c
index bfdaaa6b8f4..5d10234945f 100644
--- a/src/gallium/drivers/softpipe/sp_tile_cache.c
+++ b/src/gallium/drivers/softpipe/sp_tile_cache.c
@@ -364,7 +364,6 @@ void
sp_flush_tile_cache(struct softpipe_context *softpipe,
struct softpipe_tile_cache *tc)
{
- struct pipe_context *pipe = &softpipe->pipe;
struct pipe_surface *ps = tc->surface;
int inuse = 0, pos;
@@ -414,7 +413,6 @@ struct softpipe_cached_tile *
sp_get_cached_tile(struct softpipe_context *softpipe,
struct softpipe_tile_cache *tc, int x, int y)
{
- struct pipe_context *pipe = &softpipe->pipe;
struct pipe_surface *ps = tc->surface;
/* tile pos in framebuffer: */
diff --git a/src/gallium/include/pipe/p_util.h b/src/gallium/include/pipe/p_util.h
index 7dcdd282875..892bd4bf8a8 100644
--- a/src/gallium/include/pipe/p_util.h
+++ b/src/gallium/include/pipe/p_util.h
@@ -33,8 +33,71 @@
#include "p_debug.h"
#include "p_format.h"
#include "p_pointer.h"
+
+#if defined(PIPE_SUBSYSTEM_WINDOWS_MINIPORT) || defined(PIPE_SUBSYSTEM_WINDOWS_CE)
+__inline double ceil(double val)
+{
+ double ceil_val;
+
+ if((val - (long) val) == 0) {
+ ceil_val = val;
+ } else {
+ if(val > 0) {
+ ceil_val = (long) val + 1;
+ } else {
+ ceil_val = (long) val;
+ }
+ }
+
+ return ceil_val;
+}
+
+#ifndef PIPE_SUBSYSTEM_WINDOWS_CE
+__inline double floor(double val)
+{
+ double floor_val;
+
+ if((val - (long) val) == 0) {
+ floor_val = val;
+ } else {
+ if(val > 0) {
+ floor_val = (long) val;
+ } else {
+ floor_val = (long) val - 1;
+ }
+ }
+
+ return floor_val;
+}
+#endif
+
+#pragma function(pow)
+__inline double __cdecl pow(double val, double exponent)
+{
+ /* XXX */
+ assert(0);
+ return 0;
+}
+
+#pragma function(log)
+__inline double __cdecl log(double val)
+{
+ /* XXX */
+ assert(0);
+ return 0;
+}
+
+#pragma function(atan2)
+__inline double __cdecl atan2(double val)
+{
+ /* XXX */
+ assert(0);
+ return 0;
+}
+#else
#include <math.h>
#include <stdarg.h>
+#endif
#ifdef __cplusplus
diff --git a/src/gallium/winsys/dri/intel/intel_screen.c b/src/gallium/winsys/dri/intel/intel_screen.c
index f2412217f36..b3022fd17a9 100644
--- a/src/gallium/winsys/dri/intel/intel_screen.c
+++ b/src/gallium/winsys/dri/intel/intel_screen.c
@@ -253,12 +253,10 @@ intel_flush_frontbuffer( struct pipe_winsys *winsys,
struct pipe_surface *surf,
void *context_private)
{
- //struct intel_context *intel = (struct intel_context *) context_private;
- //__DRIdrawablePrivate *dPriv = intel->driDrawable;
+ struct intel_context *intel = (struct intel_context *) context_private;
+ __DRIdrawablePrivate *dPriv = intel->driDrawable;
- assert((int)"Doesn't work currently" & 0);
-
- //intelDisplaySurface(dPriv, surf, NULL);
+ intelDisplaySurface(dPriv, surf, NULL);
}
static boolean