summaryrefslogtreecommitdiff
path: root/src/gallium/state_trackers/xorg/xorg_exa.c
diff options
context:
space:
mode:
authorKeith Whitwell <keithw@vmware.com>2009-11-27 14:03:10 +0000
committerKeith Whitwell <keithw@vmware.com>2009-11-27 14:03:10 +0000
commit6810ce005a067f20c04f0b3abd1e422adec71d28 (patch)
tree2bc1382cdb8ce6283e5edc460551af075a31a7aa /src/gallium/state_trackers/xorg/xorg_exa.c
parent124ae596806f1a77af46f1f0e446d448da6e953a (diff)
Revert "st/xorg: fix composite after texture size changes"
This reverts commit 124ae596806f1a77af46f1f0e446d448da6e953a. Pushed by mistake
Diffstat (limited to 'src/gallium/state_trackers/xorg/xorg_exa.c')
-rw-r--r--src/gallium/state_trackers/xorg/xorg_exa.c32
1 files changed, 5 insertions, 27 deletions
diff --git a/src/gallium/state_trackers/xorg/xorg_exa.c b/src/gallium/state_trackers/xorg/xorg_exa.c
index cbada42e0e..a22f15f64a 100644
--- a/src/gallium/state_trackers/xorg/xorg_exa.c
+++ b/src/gallium/state_trackers/xorg/xorg_exa.c
@@ -48,7 +48,6 @@
#include "util/u_debug.h"
#define DEBUG_PRINT 0
-#define ROUND_UP_TEXTURES 1
/*
* Helper functions
@@ -274,18 +273,13 @@ ExaPrepareAccess(PixmapPtr pPix, int index)
PIPE_REFERENCED_FOR_WRITE)
exa->pipe->flush(exa->pipe, 0, NULL);
- assert(pPix->drawable.width <= priv->tex->width[0]);
- assert(pPix->drawable.height <= priv->tex->height[0]);
-
priv->map_transfer =
exa->scrn->get_tex_transfer(exa->scrn, priv->tex, 0, 0, 0,
#ifdef EXA_MIXED_PIXMAPS
PIPE_TRANSFER_MAP_DIRECTLY |
#endif
PIPE_TRANSFER_READ_WRITE,
- 0, 0,
- pPix->drawable.width,
- pPix->drawable.height );
+ 0, 0, priv->tex->width[0], priv->tex->height[0]);
if (!priv->map_transfer)
#ifdef EXA_MIXED_PIXMAPS
return FALSE;
@@ -826,22 +820,6 @@ xorg_exa_get_pixmap_handle(PixmapPtr pPixmap, unsigned *stride_out)
}
static Bool
-size_match( int width, int tex_width )
-{
-#if ROUND_UP_TEXTURES
- if (width > tex_width)
- return FALSE;
-
- if (width * 2 < tex_width)
- return FALSE;
-
- return TRUE;
-#else
- return width == tex_width;
-#endif
-}
-
-static Bool
ExaModifyPixmapHeader(PixmapPtr pPixmap, int width, int height,
int depth, int bitsPerPixel, int devKind,
pointer pPixData)
@@ -887,9 +865,9 @@ ExaModifyPixmapHeader(PixmapPtr pPixmap, int width, int height,
/* Deal with screen resize */
if ((exa->accel || priv->flags) &&
(!priv->tex ||
- !size_match(priv->tex->width[0], width) ||
- !size_match(priv->tex->height[0], height) ||
- priv->tex_flags != priv->flags)) {
+ (priv->tex->width[0] != width ||
+ priv->tex->height[0] != height ||
+ priv->tex_flags != priv->flags))) {
struct pipe_texture *texture = NULL;
struct pipe_texture template;
@@ -897,7 +875,7 @@ ExaModifyPixmapHeader(PixmapPtr pPixmap, int width, int height,
template.target = PIPE_TEXTURE_2D;
exa_get_pipe_format(depth, &template.format, &bitsPerPixel, &priv->picture_format);
pf_get_block(template.format, &template.block);
-#if ROUND_UP_TEXTURES
+#if 1
template.width[0] = util_next_power_of_two(width);
template.height[0] = util_next_power_of_two(height);
#else