exa->solid_color[3] = 1.f;
+#if 0
debug_printf("Color Pixel=(%d, %d, %d, %d), RGBA=(%f, %f, %f, %f)\n",
(fg >> 24) & 0xff, (fg >> 16) & 0xff,
(fg >> 8) & 0xff, (fg >> 0) & 0xff,
exa->solid_color[0], exa->solid_color[1],
exa->solid_color[2], exa->solid_color[3]);
-
-#if 0
- exa->solid_color[0] = 1.f;
- exa->solid_color[1] = 0.f;
- exa->solid_color[2] = 0.f;
- exa->solid_color[3] = 1.f;
#endif
vs_traits = VS_SOLID_FILL;
struct pipe_buffer *buf = 0;
float vertices[4][2][4];
- x0 = 10; y0 = 10;
- x1 = 300; y1 = 300;
-
/* 1st vertex */
setup_vertex0(vertices[0], x0, y0,
exa->solid_color);
t1 = 1;
#endif
- assert(screen->is_format_supported(screen, dst_surf->format, PIPE_TEXTURE_2D,
- PIPE_TEXTURE_USAGE_RENDER_TARGET, 0));
+ assert(screen->is_format_supported(screen, dst_surf->format,
+ PIPE_TEXTURE_2D,
+ PIPE_TEXTURE_USAGE_RENDER_TARGET,
+ 0));
/* save state (restored below) */
cso_save_blend(exa->cso);
struct pipe_texture *dst = dst_priv->tex;
struct pipe_texture *src = src_priv->tex;
+ xorg_exa_finish(ctx);
+
dst_loc[0] = dx;
dst_loc[1] = dy;
dst_loc[2] = width;
#include "util/u_rect.h"
+#define DEBUG_SOLID 0
+
/*
* Helper functions
*/
#if 1
xorg_exa_flush(exa, PIPE_FLUSH_RENDER_CACHE, NULL);
#else
- xorg_finish(exa);
+ xorg_exa_finish(exa);
#endif
xorg_exa_common_done(exa);
}
struct exa_pixmap_priv *priv = exaGetPixmapDriverPrivate(pPixmap);
struct exa_context *exa = ms->exa;
+#if 0
debug_printf("ExaPrepareSolid - test\n");
+#endif
if (pPixmap->drawable.depth < 15)
return FALSE;
if (!exa->pipe)
return FALSE;
+
+#if DEBUG_SOLID
+ fg = 0xffff0000;
+#endif
+
+#if 1
debug_printf(" ExaPrepareSolid(0x%x)\n", fg);
+#endif
return xorg_solid_bind_state(exa, priv, fg);
}
if (x0 == 0 && y0 == 0 &&
x1 == priv->tex->width[0] &&
y1 == priv->tex->height[0]) {
- exa->ctx->clear(exa->ctx, PIPE_CLEAR_COLOR | PIPE_CLEAR_DEPTHSTENCIL,
+ exa->ctx->clear(exa->pipe, PIPE_CLEAR_COLOR,
exa->solid_color, 1., 0);
} else
#endif
- xorg_solid(exa, priv, x0, y0, x1, y1) ;
+
+#if DEBUG_SOLID
+ xorg_solid(exa, priv, 0, 0, 300, 300);
+ xorg_solid(exa, priv, 300, 300, 350, 350);
+ xorg_solid(exa, priv, 350, 350, 500, 500);
+ xorg_solid(exa, priv,
+ priv->tex->width[0] - 10,
+ priv->tex->height[0] - 10,
+ priv->tex->width[0],
+ priv->tex->height[0]);
+#else
+ xorg_solid(exa, priv, x0, y0, x1, y1) ;
+#endif
}
static Bool