Checkpoint: glClear changes - working, bug very rough.
This commit is contained in:
@@ -11,6 +11,8 @@ GL_MINOR = 5
|
|||||||
GL_TINY = 0$(MESA_MAJOR)0$(MESA_MINOR)0$(MESA_TINY)
|
GL_TINY = 0$(MESA_MAJOR)0$(MESA_MINOR)0$(MESA_TINY)
|
||||||
|
|
||||||
|
|
||||||
|
SOFTPIPE_LIB = $(TOP)/src/mesa/pipe/softpipe/libsoftpipe.a
|
||||||
|
|
||||||
.SUFFIXES : .cpp
|
.SUFFIXES : .cpp
|
||||||
|
|
||||||
.c.o:
|
.c.o:
|
||||||
@@ -110,11 +112,12 @@ stand-alone: depend subdirs $(TOP)/$(LIB_DIR)/$(GL_LIB_NAME) $(TOP)/$(LIB_DIR)/$
|
|||||||
osmesa-only: depend subdirs $(TOP)/$(LIB_DIR)/$(OSMESA_LIB_NAME)
|
osmesa-only: depend subdirs $(TOP)/$(LIB_DIR)/$(OSMESA_LIB_NAME)
|
||||||
|
|
||||||
# Make the GL library
|
# Make the GL library
|
||||||
$(TOP)/$(LIB_DIR)/$(GL_LIB_NAME): $(STAND_ALONE_OBJECTS)
|
$(TOP)/$(LIB_DIR)/$(GL_LIB_NAME): $(STAND_ALONE_OBJECTS) $(SOFTPIPE_LIB)
|
||||||
@ $(TOP)/bin/mklib -o $(GL_LIB) -linker '$(CC)' \
|
@ $(TOP)/bin/mklib -o $(GL_LIB) -linker '$(CC)' \
|
||||||
-major $(GL_MAJOR) -minor $(GL_MINOR) -patch $(GL_TINY) \
|
-major $(GL_MAJOR) -minor $(GL_MINOR) -patch $(GL_TINY) \
|
||||||
-install $(TOP)/$(LIB_DIR) \
|
-install $(TOP)/$(LIB_DIR) \
|
||||||
$(MKLIB_OPTIONS) $(GL_LIB_DEPS) $(STAND_ALONE_OBJECTS)
|
$(MKLIB_OPTIONS) $(GL_LIB_DEPS) $(STAND_ALONE_OBJECTS) \
|
||||||
|
$(SOFTPIPE_LIB)
|
||||||
|
|
||||||
# Make the OSMesa library
|
# Make the OSMesa library
|
||||||
$(TOP)/$(LIB_DIR)/$(OSMESA_LIB_NAME): $(OSMESA_DRIVER_OBJECTS) $(OSMESA16_OBJECTS)
|
$(TOP)/$(LIB_DIR)/$(OSMESA_LIB_NAME): $(OSMESA_DRIVER_OBJECTS) $(OSMESA16_OBJECTS)
|
||||||
@@ -146,7 +149,7 @@ depend: $(ALL_SOURCES)
|
|||||||
subdirs:
|
subdirs:
|
||||||
@ (cd x86 ; $(MAKE))
|
@ (cd x86 ; $(MAKE))
|
||||||
@ (cd x86-64 ; $(MAKE))
|
@ (cd x86-64 ; $(MAKE))
|
||||||
|
#(cd pipe/softpipe ; $(MAKE))
|
||||||
|
|
||||||
install: default
|
install: default
|
||||||
$(INSTALL) -d $(INSTALL_DIR)/include/GL
|
$(INSTALL) -d $(INSTALL_DIR)/include/GL
|
||||||
|
@@ -40,6 +40,7 @@
|
|||||||
#include "swrast/swrast.h"
|
#include "swrast/swrast.h"
|
||||||
#include "vblank.h"
|
#include "vblank.h"
|
||||||
|
|
||||||
|
#include "pipe/p_context.h"
|
||||||
|
|
||||||
/* This block can be removed when libdrm >= 2.3.1 is required */
|
/* This block can be removed when libdrm >= 2.3.1 is required */
|
||||||
|
|
||||||
@@ -298,9 +299,17 @@ intelWindowMoved(struct intel_context *intel)
|
|||||||
/**
|
/**
|
||||||
* Called by ctx->Driver.Clear.
|
* Called by ctx->Driver.Clear.
|
||||||
*/
|
*/
|
||||||
|
#if 0
|
||||||
static void
|
static void
|
||||||
intelClear(GLcontext *ctx, GLbitfield mask)
|
intelClear(GLcontext *ctx, GLbitfield mask)
|
||||||
|
#else
|
||||||
|
void
|
||||||
|
intelClear(struct pipe_context *pipe,
|
||||||
|
GLboolean color, GLboolean depth,
|
||||||
|
GLboolean stencil, GLboolean accum)
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
|
GLcontext *ctx = (GLcontext *) pipe->glctx;
|
||||||
const GLuint colorMask = *((GLuint *) & ctx->Color.ColorMask);
|
const GLuint colorMask = *((GLuint *) & ctx->Color.ColorMask);
|
||||||
GLbitfield tri_mask = 0;
|
GLbitfield tri_mask = 0;
|
||||||
GLbitfield blit_mask = 0;
|
GLbitfield blit_mask = 0;
|
||||||
@@ -308,6 +317,13 @@ intelClear(GLcontext *ctx, GLbitfield mask)
|
|||||||
struct gl_framebuffer *fb = ctx->DrawBuffer;
|
struct gl_framebuffer *fb = ctx->DrawBuffer;
|
||||||
GLuint i;
|
GLuint i;
|
||||||
|
|
||||||
|
GLbitfield mask;
|
||||||
|
|
||||||
|
if (color)
|
||||||
|
mask = ctx->DrawBuffer->_ColorDrawBufferMask[0]; /*XXX temporary*/
|
||||||
|
else
|
||||||
|
mask = 0x0;
|
||||||
|
|
||||||
if (0)
|
if (0)
|
||||||
fprintf(stderr, "%s\n", __FUNCTION__);
|
fprintf(stderr, "%s\n", __FUNCTION__);
|
||||||
|
|
||||||
@@ -323,7 +339,7 @@ intelClear(GLcontext *ctx, GLbitfield mask)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* HW stencil */
|
/* HW stencil */
|
||||||
if (mask & BUFFER_BIT_STENCIL) {
|
if (stencil) {
|
||||||
const struct pipe_region *stencilRegion
|
const struct pipe_region *stencilRegion
|
||||||
= intel_get_rb_region(fb, BUFFER_STENCIL);
|
= intel_get_rb_region(fb, BUFFER_STENCIL);
|
||||||
if (stencilRegion) {
|
if (stencilRegion) {
|
||||||
@@ -340,7 +356,7 @@ intelClear(GLcontext *ctx, GLbitfield mask)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* HW depth */
|
/* HW depth */
|
||||||
if (mask & BUFFER_BIT_DEPTH) {
|
if (depth) {
|
||||||
/* clear depth with whatever method is used for stencil (see above) */
|
/* clear depth with whatever method is used for stencil (see above) */
|
||||||
if (tri_mask & BUFFER_BIT_STENCIL)
|
if (tri_mask & BUFFER_BIT_STENCIL)
|
||||||
tri_mask |= BUFFER_BIT_DEPTH;
|
tri_mask |= BUFFER_BIT_DEPTH;
|
||||||
@@ -368,9 +384,14 @@ intelClear(GLcontext *ctx, GLbitfield mask)
|
|||||||
if (blit_mask)
|
if (blit_mask)
|
||||||
intelClearWithBlit(ctx, blit_mask);
|
intelClearWithBlit(ctx, blit_mask);
|
||||||
|
|
||||||
#if 1
|
#if 0
|
||||||
if (swrast_mask | tri_mask)
|
if (swrast_mask | tri_mask)
|
||||||
_swrast_Clear(ctx, swrast_mask | tri_mask);
|
_swrast_Clear(ctx, swrast_mask | tri_mask);
|
||||||
|
#else
|
||||||
|
softpipe_clear(pipe, GL_FALSE,
|
||||||
|
(swrast_mask | tri_mask) & BUFFER_BIT_DEPTH,
|
||||||
|
(swrast_mask | tri_mask) & BUFFER_BIT_STENCIL,
|
||||||
|
(swrast_mask | tri_mask) & BUFFER_BIT_ACCUM);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -786,7 +807,9 @@ intelReadBuffer(GLcontext * ctx, GLenum mode)
|
|||||||
void
|
void
|
||||||
intelInitBufferFuncs(struct dd_function_table *functions)
|
intelInitBufferFuncs(struct dd_function_table *functions)
|
||||||
{
|
{
|
||||||
|
#if 0
|
||||||
functions->Clear = intelClear;
|
functions->Clear = intelClear;
|
||||||
|
#endif
|
||||||
functions->DrawBuffer = intelDrawBuffer;
|
functions->DrawBuffer = intelDrawBuffer;
|
||||||
functions->ReadBuffer = intelReadBuffer;
|
functions->ReadBuffer = intelReadBuffer;
|
||||||
}
|
}
|
||||||
|
@@ -52,4 +52,9 @@ extern void intel_draw_buffer(GLcontext * ctx, struct gl_framebuffer *fb);
|
|||||||
|
|
||||||
extern void intelInitBufferFuncs(struct dd_function_table *functions);
|
extern void intelInitBufferFuncs(struct dd_function_table *functions);
|
||||||
|
|
||||||
|
extern void
|
||||||
|
intelClear(struct pipe_context *pipe,
|
||||||
|
GLboolean color, GLboolean depth,
|
||||||
|
GLboolean stencil, GLboolean accum);
|
||||||
|
|
||||||
#endif /* INTEL_BUFFERS_H */
|
#endif /* INTEL_BUFFERS_H */
|
||||||
|
@@ -420,6 +420,8 @@ intelCreateContext(const __GLcontextModes * mesaVis,
|
|||||||
|
|
||||||
intel->pipe = intel->ctx.st->pipe;
|
intel->pipe = intel->ctx.st->pipe;
|
||||||
intel->pipe->screen = intelScreen;
|
intel->pipe->screen = intelScreen;
|
||||||
|
intel->pipe->glctx = ctx;
|
||||||
|
intel->pipe->clear = intelClear;
|
||||||
intelScreen->pipe = intel->pipe;
|
intelScreen->pipe = intel->pipe;
|
||||||
intel_init_region_functions(intel->pipe);
|
intel_init_region_functions(intel->pipe);
|
||||||
|
|
||||||
|
@@ -82,6 +82,7 @@
|
|||||||
#include "drivers/common/driverfuncs.h"
|
#include "drivers/common/driverfuncs.h"
|
||||||
|
|
||||||
#include "state_tracker/st_public.h"
|
#include "state_tracker/st_public.h"
|
||||||
|
#include "state_tracker/st_context.h"
|
||||||
#include "pipe/softpipe/sp_context.h"
|
#include "pipe/softpipe/sp_context.h"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -1572,6 +1573,7 @@ XMesaContext XMesaCreateContext( XMesaVisual v, XMesaContext share_list )
|
|||||||
|
|
||||||
st_create_context( mesaCtx,
|
st_create_context( mesaCtx,
|
||||||
softpipe_create() );
|
softpipe_create() );
|
||||||
|
mesaCtx->st->pipe->clear = xmesa_clear;
|
||||||
|
|
||||||
return c;
|
return c;
|
||||||
}
|
}
|
||||||
|
@@ -435,6 +435,32 @@ clear_buffers(GLcontext *ctx, GLbitfield buffers)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
xmesa_clear(struct pipe_context *pipe, GLboolean color, GLboolean depth,
|
||||||
|
GLboolean stencil, GLboolean accum)
|
||||||
|
{
|
||||||
|
struct softpipe_context *sp = (struct softpipe_context *) pipe;
|
||||||
|
if (color) {
|
||||||
|
GET_CURRENT_CONTEXT(ctx);
|
||||||
|
GLuint i;
|
||||||
|
softpipe_update_derived(sp);
|
||||||
|
for (i = 0; i < sp->framebuffer.num_cbufs; i++) {
|
||||||
|
struct pipe_surface *ps = sp->framebuffer.cbufs[i];
|
||||||
|
struct xmesa_renderbuffer *xrb = (struct xmesa_renderbuffer *) ps->rb;
|
||||||
|
const GLint x = sp->cliprect.minx;
|
||||||
|
const GLint y = sp->cliprect.miny;
|
||||||
|
const GLint w = sp->cliprect.maxx - x;
|
||||||
|
const GLint h = sp->cliprect.maxy - y;
|
||||||
|
xrb->clearFunc(ctx, xrb, x, y, w, h);
|
||||||
|
}
|
||||||
|
color = GL_FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
softpipe_clear(pipe, color, depth, stencil, accum);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#ifndef XFree86Server
|
#ifndef XFree86Server
|
||||||
/* XXX this was never tested in the Xserver environment */
|
/* XXX this was never tested in the Xserver environment */
|
||||||
|
|
||||||
|
@@ -587,9 +587,13 @@ extern void xmesa_register_swrast_functions( GLcontext *ctx );
|
|||||||
|
|
||||||
|
|
||||||
struct pipe_surface;
|
struct pipe_surface;
|
||||||
|
struct pipe_context;
|
||||||
|
|
||||||
struct pipe_surface *
|
extern struct pipe_surface *
|
||||||
xmesa_new_surface(GLcontext *ctx, struct xmesa_renderbuffer *xrb);
|
xmesa_new_surface(GLcontext *ctx, struct xmesa_renderbuffer *xrb);
|
||||||
|
|
||||||
|
extern void
|
||||||
|
xmesa_clear(struct pipe_context *pipe, GLboolean color, GLboolean depth,
|
||||||
|
GLboolean stencil, GLboolean accum);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@@ -38,6 +38,8 @@
|
|||||||
#include "fbobject.h"
|
#include "fbobject.h"
|
||||||
#include "state.h"
|
#include "state.h"
|
||||||
|
|
||||||
|
#include "state_tracker/st_draw.h"
|
||||||
|
|
||||||
|
|
||||||
#define BAD_MASK ~0u
|
#define BAD_MASK ~0u
|
||||||
|
|
||||||
@@ -176,7 +178,15 @@ _mesa_Clear( GLbitfield mask )
|
|||||||
}
|
}
|
||||||
|
|
||||||
ASSERT(ctx->Driver.Clear);
|
ASSERT(ctx->Driver.Clear);
|
||||||
|
#if 0
|
||||||
ctx->Driver.Clear(ctx, bufferMask);
|
ctx->Driver.Clear(ctx, bufferMask);
|
||||||
|
#else
|
||||||
|
st_clear(ctx->st,
|
||||||
|
(mask & GL_COLOR_BUFFER_BIT) ? GL_TRUE : GL_FALSE,
|
||||||
|
(bufferMask & BUFFER_BIT_DEPTH) ? GL_TRUE : GL_FALSE,
|
||||||
|
(bufferMask & BUFFER_BIT_STENCIL) ? GL_TRUE : GL_FALSE,
|
||||||
|
(bufferMask & BUFFER_BIT_ACCUM) ? GL_TRUE : GL_FALSE);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -188,6 +188,7 @@ struct pipe_context {
|
|||||||
GLuint flag);
|
GLuint flag);
|
||||||
|
|
||||||
void *screen; /**< temporary */
|
void *screen; /**< temporary */
|
||||||
|
void *glctx; /**< temporary */
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@@ -30,42 +30,102 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
#include "pipe/p_defines.h"
|
||||||
#include "sp_clear.h"
|
#include "sp_clear.h"
|
||||||
#include "sp_context.h"
|
#include "sp_context.h"
|
||||||
#include "sp_surface.h"
|
#include "sp_surface.h"
|
||||||
#include "colormac.h"
|
#include "colormac.h"
|
||||||
|
|
||||||
|
|
||||||
|
static GLuint
|
||||||
|
color_value(GLuint format, const GLfloat color[4])
|
||||||
|
{
|
||||||
|
GLubyte r, g, b, a;
|
||||||
|
|
||||||
|
UNCLAMPED_FLOAT_TO_UBYTE(r, color[0]);
|
||||||
|
UNCLAMPED_FLOAT_TO_UBYTE(g, color[1]);
|
||||||
|
UNCLAMPED_FLOAT_TO_UBYTE(b, color[2]);
|
||||||
|
UNCLAMPED_FLOAT_TO_UBYTE(a, color[3]);
|
||||||
|
|
||||||
|
switch (format) {
|
||||||
|
case PIPE_FORMAT_U_R8_G8_B8_A8:
|
||||||
|
return (r << 24) | (g << 16) | (b << 8) | a;
|
||||||
|
case PIPE_FORMAT_U_A8_R8_G8_B8:
|
||||||
|
return (a << 24) | (r << 16) | (g << 8) | b;
|
||||||
|
case PIPE_FORMAT_U_R5_G6_B5:
|
||||||
|
return ((r & 0xf8) << 8) | ((g & 0xfc) << 3) | (b >> 3);
|
||||||
|
default:
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
softpipe_clear(struct pipe_context *pipe, GLboolean color, GLboolean depth,
|
softpipe_clear(struct pipe_context *pipe, GLboolean color, GLboolean depth,
|
||||||
GLboolean stencil, GLboolean accum)
|
GLboolean stencil, GLboolean accum)
|
||||||
{
|
{
|
||||||
const struct softpipe_context *softpipe = softpipe_context(pipe);
|
const struct softpipe_context *softpipe = softpipe_context(pipe);
|
||||||
const GLint x = softpipe->scissor.minx;
|
const GLint x = softpipe->cliprect.minx;
|
||||||
const GLint y = softpipe->scissor.miny;
|
const GLint y = softpipe->cliprect.miny;
|
||||||
const GLint w = softpipe->scissor.maxx - x;
|
const GLint w = softpipe->cliprect.maxx - x;
|
||||||
const GLint h = softpipe->scissor.maxy - y;
|
const GLint h = softpipe->cliprect.maxy - y;
|
||||||
|
|
||||||
if (color) {
|
if (color) {
|
||||||
GLuint i;
|
GLuint i;
|
||||||
GLubyte clr[4];
|
|
||||||
|
|
||||||
UNCLAMPED_FLOAT_TO_UBYTE(clr[0], softpipe->clear_color.color[0]);
|
|
||||||
UNCLAMPED_FLOAT_TO_UBYTE(clr[1], softpipe->clear_color.color[1]);
|
|
||||||
UNCLAMPED_FLOAT_TO_UBYTE(clr[2], softpipe->clear_color.color[2]);
|
|
||||||
UNCLAMPED_FLOAT_TO_UBYTE(clr[3], softpipe->clear_color.color[3]);
|
|
||||||
|
|
||||||
for (i = 0; i < softpipe->framebuffer.num_cbufs; i++) {
|
for (i = 0; i < softpipe->framebuffer.num_cbufs; i++) {
|
||||||
struct pipe_surface *ps = softpipe->framebuffer.cbufs[i];
|
struct pipe_surface *ps = softpipe->framebuffer.cbufs[i];
|
||||||
struct softpipe_surface *sps = softpipe_surface(ps);
|
|
||||||
GLint j;
|
if (softpipe->blend.colormask == (PIPE_MASK_R | PIPE_MASK_G |
|
||||||
|
PIPE_MASK_B | PIPE_MASK_A)) {
|
||||||
|
/* no masking */
|
||||||
|
GLuint clearVal = color_value(ps->format,
|
||||||
|
softpipe->clear_color.color);
|
||||||
|
pipe->region_fill(pipe, ps->region, 0, x, y, w, h, clearVal);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
/* masking */
|
||||||
|
|
||||||
|
/*
|
||||||
for (j = 0; j < h; j++) {
|
for (j = 0; j < h; j++) {
|
||||||
sps->write_mono_row_ub(sps, w, x, y + j, clr);
|
sps->write_mono_row_ub(sps, w, x, y + j, clr);
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (depth) {
|
if (depth) {
|
||||||
|
struct pipe_surface *ps = softpipe->framebuffer.zbuf;
|
||||||
|
GLuint clearVal;
|
||||||
|
|
||||||
|
switch (ps->format) {
|
||||||
|
case PIPE_FORMAT_U_Z16:
|
||||||
|
clearVal = (GLuint) (softpipe->depth_test.clear * 65535.0);
|
||||||
|
break;
|
||||||
|
case PIPE_FORMAT_U_Z32:
|
||||||
|
clearVal = (GLuint) (softpipe->depth_test.clear * 0xffffffff);
|
||||||
|
break;
|
||||||
|
case PIPE_FORMAT_Z24_S8:
|
||||||
|
clearVal = (GLuint) (softpipe->depth_test.clear * 0xffffff);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
assert(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pipe->region_fill(pipe, ps->region, 0, x, y, w, h, clearVal);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (stencil) {
|
||||||
|
struct pipe_surface *ps = softpipe->framebuffer.sbuf;
|
||||||
|
GLuint clearVal = softpipe->stencil.clear_value;
|
||||||
|
if (softpipe->stencil.write_mask[0] /*== 0xff*/) {
|
||||||
|
/* no masking */
|
||||||
|
pipe->region_fill(pipe, ps->region, 0, x, y, w, h, clearVal);
|
||||||
|
}
|
||||||
|
else if (softpipe->stencil.write_mask[0] != 0x0) {
|
||||||
|
/* masking */
|
||||||
|
/* fill with quad funcs */
|
||||||
|
assert(0);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@@ -92,6 +92,59 @@ sp_region_unmap(struct pipe_context *pipe, struct pipe_region *region)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
static GLubyte *
|
||||||
|
get_pointer(struct pipe_region *dst, GLuint x, GLuint y)
|
||||||
|
{
|
||||||
|
return dst->map + (y * dst->pitch + x) * dst->cpp;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static void
|
||||||
|
sp_region_fill(struct pipe_context *pipe,
|
||||||
|
struct pipe_region *dst,
|
||||||
|
GLuint dst_offset,
|
||||||
|
GLuint dstx, GLuint dsty,
|
||||||
|
GLuint width, GLuint height, GLuint value)
|
||||||
|
{
|
||||||
|
GLuint i, j;
|
||||||
|
switch (dst->cpp) {
|
||||||
|
case 1:
|
||||||
|
{
|
||||||
|
GLubyte *row = get_pointer(dst, dstx, dsty);
|
||||||
|
for (i = 0; i < height; i++) {
|
||||||
|
memset(row, value, width);
|
||||||
|
row += dst->pitch;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
{
|
||||||
|
GLushort *row = (GLushort *) get_pointer(dst, dstx, dsty);
|
||||||
|
for (i = 0; i < height; i++) {
|
||||||
|
for (j = 0; j < width; j++)
|
||||||
|
row[j] = value;
|
||||||
|
row += dst->pitch;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 4:
|
||||||
|
{
|
||||||
|
GLuint *row = (GLuint *) get_pointer(dst, dstx, dsty);
|
||||||
|
for (i = 0; i < height; i++) {
|
||||||
|
for (j = 0; j < width; j++)
|
||||||
|
row[j] = value;
|
||||||
|
row += dst->pitch;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
assert(0);
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
sp_init_region_functions(struct softpipe_context *sp)
|
sp_init_region_functions(struct softpipe_context *sp)
|
||||||
{
|
{
|
||||||
@@ -101,5 +154,7 @@ sp_init_region_functions(struct softpipe_context *sp)
|
|||||||
sp->pipe.region_map = sp_region_map;
|
sp->pipe.region_map = sp_region_map;
|
||||||
sp->pipe.region_unmap = sp_region_unmap;
|
sp->pipe.region_unmap = sp_region_unmap;
|
||||||
|
|
||||||
|
sp->pipe.region_fill = sp_region_fill;
|
||||||
|
|
||||||
/* XXX lots of other region functions needed... */
|
/* XXX lots of other region functions needed... */
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user