summaryrefslogtreecommitdiff
path: root/src/gallium/auxiliary/util
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/auxiliary/util')
-rw-r--r--src/gallium/auxiliary/util/p_debug.c4
-rw-r--r--src/gallium/auxiliary/util/p_debug_mem.c7
-rw-r--r--src/gallium/auxiliary/util/p_tile.c24
-rw-r--r--src/gallium/auxiliary/util/u_blit.c2
-rw-r--r--src/gallium/auxiliary/util/u_gen_mipmap.c31
-rw-r--r--src/gallium/auxiliary/util/u_time.c6
6 files changed, 43 insertions, 31 deletions
diff --git a/src/gallium/auxiliary/util/p_debug.c b/src/gallium/auxiliary/util/p_debug.c
index 8ef2880191..4ec1746662 100644
--- a/src/gallium/auxiliary/util/p_debug.c
+++ b/src/gallium/auxiliary/util/p_debug.c
@@ -104,7 +104,7 @@ void _debug_break(void)
__asm("int3");
#elif (defined(__i386__) || defined(__386__)) && defined(__MSC__)
_asm {int 3};
-#elif defined(PIPE_SUBSYSTEM_WINDOWS_DISPLAY) && !defined(WINCE)
+#elif defined(PIPE_SUBSYSTEM_WINDOWS_DISPLAY)
EngDebugBreak();
#else
abort();
@@ -413,6 +413,7 @@ char *pf_sprint_name( char *str, enum pipe_format format )
}
+#ifdef DEBUG
void debug_print_format(const char *msg, unsigned fmt )
{
char fmtstr[80];
@@ -421,3 +422,4 @@ void debug_print_format(const char *msg, unsigned fmt )
debug_printf("%s: %s\n", msg, fmtstr);
}
+#endif
diff --git a/src/gallium/auxiliary/util/p_debug_mem.c b/src/gallium/auxiliary/util/p_debug_mem.c
index 9321cf71bb..3b5e4fbaee 100644
--- a/src/gallium/auxiliary/util/p_debug_mem.c
+++ b/src/gallium/auxiliary/util/p_debug_mem.c
@@ -34,9 +34,11 @@
#include "pipe/p_config.h"
-#ifdef PIPE_SUBSYSTEM_WINDOWS_DISPLAY
+#if defined(PIPE_SUBSYSTEM_WINDOWS_DISPLAY)
#include <windows.h>
#include <winddi.h>
+#elif defined(PIPE_SUBSYSTEM_WINDOWS_MINIPORT)
+#include <wdm.h>
#else
#include <stdio.h>
#include <stdlib.h>
@@ -52,6 +54,9 @@
#if defined(PIPE_SUBSYSTEM_WINDOWS_DISPLAY) && !defined(WINCE)
#define real_malloc(_size) EngAllocMem(0, _size, 'D3AG')
#define real_free(_ptr) EngFreeMem(_ptr)
+#elif defined(PIPE_SUBSYSTEM_WINDOWS_MINIPORT)
+#define real_malloc(_size) ExAllocatePool(0, _size)
+#define real_free(_ptr) ExFreePool(_ptr)
#else
#define real_malloc(_size) malloc(_size)
#define real_free(_ptr) free(_ptr)
diff --git a/src/gallium/auxiliary/util/p_tile.c b/src/gallium/auxiliary/util/p_tile.c
index 13175ca46e..63e1cc6013 100644
--- a/src/gallium/auxiliary/util/p_tile.c
+++ b/src/gallium/auxiliary/util/p_tile.c
@@ -385,7 +385,7 @@ z16_get_tile_rgba(ushort *src,
-/*** PIPE_FORMAT_U_L8 ***/
+/*** PIPE_FORMAT_L8_UNORM ***/
static void
l8_get_tile_rgba(ubyte *src,
@@ -408,7 +408,7 @@ l8_get_tile_rgba(ubyte *src,
}
-/*** PIPE_FORMAT_U_A8 ***/
+/*** PIPE_FORMAT_A8_UNORM ***/
static void
a8_get_tile_rgba(ubyte *src,
@@ -476,7 +476,7 @@ r16g16b16a16_put_tile_rgba(short *dst,
-/*** PIPE_FORMAT_U_I8 ***/
+/*** PIPE_FORMAT_I8_UNORM ***/
static void
i8_get_tile_rgba(ubyte *src,
@@ -499,7 +499,7 @@ i8_get_tile_rgba(ubyte *src,
}
-/*** PIPE_FORMAT_U_A8_L8 ***/
+/*** PIPE_FORMAT_A8L8_UNORM ***/
static void
a8_l8_get_tile_rgba(ushort *src,
@@ -708,16 +708,16 @@ pipe_get_tile_rgba(struct pipe_context *pipe,
case PIPE_FORMAT_R5G6B5_UNORM:
r5g6b5_get_tile_rgba((ushort *) packed, w, h, p, dst_stride);
break;
- case PIPE_FORMAT_U_L8:
+ case PIPE_FORMAT_L8_UNORM:
l8_get_tile_rgba((ubyte *) packed, w, h, p, dst_stride);
break;
- case PIPE_FORMAT_U_A8:
+ case PIPE_FORMAT_A8_UNORM:
a8_get_tile_rgba((ubyte *) packed, w, h, p, dst_stride);
break;
- case PIPE_FORMAT_U_I8:
+ case PIPE_FORMAT_I8_UNORM:
i8_get_tile_rgba((ubyte *) packed, w, h, p, dst_stride);
break;
- case PIPE_FORMAT_U_A8_L8:
+ case PIPE_FORMAT_A8L8_UNORM:
a8_l8_get_tile_rgba((ushort *) packed, w, h, p, dst_stride);
break;
case PIPE_FORMAT_R16G16B16A16_SNORM:
@@ -787,16 +787,16 @@ pipe_put_tile_rgba(struct pipe_context *pipe,
break;
case PIPE_FORMAT_R8G8B8A8_UNORM:
break;
- case PIPE_FORMAT_U_L8:
+ case PIPE_FORMAT_L8_UNORM:
/*l8_put_tile_rgba((ubyte *) packed, w, h, p, src_stride);*/
break;
- case PIPE_FORMAT_U_A8:
+ case PIPE_FORMAT_A8_UNORM:
/*a8_put_tile_rgba((ubyte *) packed, w, h, p, src_stride);*/
break;
- case PIPE_FORMAT_U_I8:
+ case PIPE_FORMAT_I8_UNORM:
/*i8_put_tile_rgba((ubyte *) packed, w, h, p, src_stride);*/
break;
- case PIPE_FORMAT_U_A8_L8:
+ case PIPE_FORMAT_A8L8_UNORM:
/*a8_l8_put_tile_rgba((ushort *) packed, w, h, p, src_stride);*/
break;
case PIPE_FORMAT_R16G16B16A16_SNORM:
diff --git a/src/gallium/auxiliary/util/u_blit.c b/src/gallium/auxiliary/util/u_blit.c
index 9e9912c6e4..568d62ced1 100644
--- a/src/gallium/auxiliary/util/u_blit.c
+++ b/src/gallium/auxiliary/util/u_blit.c
@@ -295,6 +295,8 @@ util_blit_pixels(struct blit_state *ctx,
src, srcLeft, srcTop, /* src */
srcW, srcH); /* size */
+ pipe->texture_update(pipe, tex, 0, 1 << 0);
+
/* save state (restored below) */
cso_save_blend(ctx->cso);
cso_save_depth_stencil_alpha(ctx->cso);
diff --git a/src/gallium/auxiliary/util/u_gen_mipmap.c b/src/gallium/auxiliary/util/u_gen_mipmap.c
index b8dc6c66c0..c53c512268 100644
--- a/src/gallium/auxiliary/util/u_gen_mipmap.c
+++ b/src/gallium/auxiliary/util/u_gen_mipmap.c
@@ -493,18 +493,21 @@ format_to_type_comps(enum pipe_format pformat,
*datatype = USHORT_5_6_5;
*comps = 3;
return;
- case PIPE_FORMAT_U_L8:
- case PIPE_FORMAT_U_A8:
- case PIPE_FORMAT_U_I8:
+ case PIPE_FORMAT_L8_UNORM:
+ case PIPE_FORMAT_A8_UNORM:
+ case PIPE_FORMAT_I8_UNORM:
*datatype = UBYTE;
*comps = 1;
return;
- case PIPE_FORMAT_U_A8_L8:
+ case PIPE_FORMAT_A8L8_UNORM:
*datatype = UBYTE;
*comps = 2;
return;
default:
assert(0);
+ *datatype = UBYTE;
+ *comps = 0;
+ break;
}
}
@@ -775,23 +778,23 @@ set_vertex_data(struct gen_mipmap_state *ctx, float width, float height)
{
void *buf;
- ctx->vertices[0][0][0] = -0.5f; /*x*/
- ctx->vertices[0][0][1] = -0.5f; /*y*/
+ ctx->vertices[0][0][0] = 0.0f; /*x*/
+ ctx->vertices[0][0][1] = 0.0f; /*y*/
ctx->vertices[0][1][0] = 0.0f; /*s*/
ctx->vertices[0][1][1] = 0.0f; /*t*/
- ctx->vertices[1][0][0] = width - 0.5f; /*x*/
- ctx->vertices[1][0][1] = -0.5f; /*y*/
- ctx->vertices[1][1][0] = 1.0f; /*s*/
- ctx->vertices[1][1][1] = 0.0f; /*t*/
+ ctx->vertices[1][0][0] = width;
+ ctx->vertices[1][0][1] = 0.0f;
+ ctx->vertices[1][1][0] = 1.0f;
+ ctx->vertices[1][1][1] = 0.0f;
- ctx->vertices[2][0][0] = width - 0.5f;
- ctx->vertices[2][0][1] = height - 0.5f;
+ ctx->vertices[2][0][0] = width;
+ ctx->vertices[2][0][1] = height;
ctx->vertices[2][1][0] = 1.0f;
ctx->vertices[2][1][1] = 1.0f;
- ctx->vertices[3][0][0] = -0.5f;
- ctx->vertices[3][0][1] = height - 0.5f;
+ ctx->vertices[3][0][0] = 0.0f;
+ ctx->vertices[3][0][1] = height;
ctx->vertices[3][1][0] = 0.0f;
ctx->vertices[3][1][1] = 1.0f;
diff --git a/src/gallium/auxiliary/util/u_time.c b/src/gallium/auxiliary/util/u_time.c
index dd28ff4134..9b97050d51 100644
--- a/src/gallium/auxiliary/util/u_time.c
+++ b/src/gallium/auxiliary/util/u_time.c
@@ -37,11 +37,11 @@
#if defined(PIPE_OS_LINUX)
#include <sys/time.h>
-#elif defined(PIPE_OS_WINDOWS)
+#elif defined(PIPE_SUBSYSTEM_WINDOWS_DISPLAY)
#include <windows.h>
-#if defined(PIPE_SUBSYSTEM_WINDOWS_DISPLAY)
#include <winddi.h>
-#endif
+#elif defined(PIPE_SUBSYSTEM_WINDOWS_USER)
+#include <windows.h>
#else
#error Unsupported OS
#endif