GLint x, GLint y, GLuint zzzz[QUAD_SIZE])
{
const GLushort *src
- = (GLushort *) sps->surface.region->map + y * sps->surface.region->pitch + x;
+ = ((const GLushort *) (sps->surface.region->map + sps->surface.offset))
+ + y * sps->surface.region->pitch + x;
assert(sps->surface.format == PIPE_FORMAT_U_Z16);
z16_write_quad_z(struct softpipe_surface *sps,
GLint x, GLint y, const GLuint zzzz[QUAD_SIZE])
{
- GLushort *dst = (GLushort *) sps->surface.region->map + y * sps->surface.region->pitch + x;
+ GLushort *dst
+ = ((GLushort *) (sps->surface.region->map + sps->surface.offset))
+ + y * sps->surface.region->pitch + x;
assert(sps->surface.format == PIPE_FORMAT_U_Z16);
GLint x, GLint y, GLuint zzzz[QUAD_SIZE])
{
const GLuint *src
- = (GLuint *) sps->surface.region->map + y * sps->surface.region->pitch + x;
+ = ((GLuint *) (sps->surface.region->map + sps->surface.offset))
+ + y * sps->surface.region->pitch + x;
assert(sps->surface.format == PIPE_FORMAT_U_Z32);
z32_write_quad_z(struct softpipe_surface *sps,
GLint x, GLint y, const GLuint zzzz[QUAD_SIZE])
{
- GLuint *dst = (GLuint *) sps->surface.region->map + y * sps->surface.region->pitch + x;
+ GLuint *dst
+ = ((GLuint *) (sps->surface.region->map + sps->surface.offset))
+ + y * sps->surface.region->pitch + x;
assert(sps->surface.format == PIPE_FORMAT_U_Z32);
{
static const GLuint mask = 0x00ffffff;
const GLuint *src
- = (GLuint *) sps->surface.region->map + y * sps->surface.region->pitch + x;
+ = ((GLuint *) (sps->surface.region->map + sps->surface.offset))
+ + y * sps->surface.region->pitch + x;
assert(sps->surface.format == PIPE_FORMAT_S8_Z24);
GLint x, GLint y, const GLuint zzzz[QUAD_SIZE])
{
static const GLuint mask = 0xff000000;
- GLuint *dst = (GLuint *) sps->surface.region->map + y * sps->surface.region->pitch + x;
+ GLuint *dst
+ = ((GLuint *) (sps->surface.region->map + sps->surface.offset))
+ + y * sps->surface.region->pitch + x;
assert(sps->surface.format == PIPE_FORMAT_S8_Z24);
assert(zzzz[0] <= 0xffffff);
GLint x, GLint y, GLubyte ssss[QUAD_SIZE])
{
const GLuint *src
- = (GLuint *) sps->surface.region->map + y * sps->surface.region->pitch + x;
+ = ((GLuint *) (sps->surface.region->map + sps->surface.offset))
+ + y * sps->surface.region->pitch + x;
assert(sps->surface.format == PIPE_FORMAT_S8_Z24);
GLint x, GLint y, const GLubyte ssss[QUAD_SIZE])
{
static const GLuint mask = 0x00ffffff;
- GLuint *dst = (GLuint *) sps->surface.region->map + y * sps->surface.region->pitch + x;
+ GLuint *dst
+ = ((GLuint *) (sps->surface.region->map + sps->surface.offset))
+ + y * sps->surface.region->pitch + x;
assert(sps->surface.format == PIPE_FORMAT_S8_Z24);
GLint x, GLint y, GLubyte ssss[QUAD_SIZE])
{
const GLubyte *src
- = sps->surface.region->map + y * sps->surface.region->pitch + x;
+ = sps->surface.region->map + sps->surface.offset
+ + y * sps->surface.region->pitch + x;
assert(sps->surface.format == PIPE_FORMAT_U_S8);
GLint x, GLint y, const GLubyte ssss[QUAD_SIZE])
{
GLubyte *dst
- = sps->surface.region->map + y * sps->surface.region->pitch + x;
+ = sps->surface.region->map + sps->surface.offset
+ + y * sps->surface.region->pitch + x;
assert(sps->surface.format == PIPE_FORMAT_U_S8);