diff options
author | Dave Airlie <[email protected]> | 2011-09-11 09:45:10 +0100 |
---|---|---|
committer | Dave Airlie <[email protected]> | 2011-10-11 16:13:29 +0100 |
commit | 866f9b18c68ede63c00917ec9c3dae3524ca8826 (patch) | |
tree | b07a53b71fe3aeac8deddbabb00ced29bb33e3c9 /src/mesa/state_tracker/st_cb_drawpixels.c | |
parent | 6b3e75de7c2dd6be6bf1acd0e996bdb1def702a1 (diff) |
gallium: rename ZS stencil type to UINT (v2)
these are never USCALED, always UINT in reality.
taken from some work by Christoph Bumiller
v2: fixup formatting of table + tabs
Signed-off-by: Dave Airlie <[email protected]>
Diffstat (limited to 'src/mesa/state_tracker/st_cb_drawpixels.c')
-rw-r--r-- | src/mesa/state_tracker/st_cb_drawpixels.c | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/src/mesa/state_tracker/st_cb_drawpixels.c b/src/mesa/state_tracker/st_cb_drawpixels.c index 74e87f0e446..89e0a73f1c9 100644 --- a/src/mesa/state_tracker/st_cb_drawpixels.c +++ b/src/mesa/state_tracker/st_cb_drawpixels.c @@ -871,7 +871,7 @@ draw_stencil_pixels(struct gl_context *ctx, GLint x, GLint y, if (format == GL_DEPTH_STENCIL) { GLenum ztype = - pt->resource->format == PIPE_FORMAT_Z32_FLOAT_S8X24_USCALED ? + pt->resource->format == PIPE_FORMAT_Z32_FLOAT_S8X24_UINT ? GL_FLOAT : GL_UNSIGNED_INT; _mesa_unpack_depth_span(ctx, spanWidth, ztype, zValues, @@ -896,14 +896,14 @@ draw_stencil_pixels(struct gl_context *ctx, GLint x, GLint y, /* now pack the stencil (and Z) values in the dest format */ switch (pt->resource->format) { - case PIPE_FORMAT_S8_USCALED: + case PIPE_FORMAT_S8_UINT: { ubyte *dest = stmap + spanY * pt->stride + spanX; assert(usage == PIPE_TRANSFER_WRITE); memcpy(dest, sValues, spanWidth); } break; - case PIPE_FORMAT_Z24_UNORM_S8_USCALED: + case PIPE_FORMAT_Z24_UNORM_S8_UINT: if (format == GL_DEPTH_STENCIL) { uint *dest = (uint *) (stmap + spanY * pt->stride + spanX*4); GLint k; @@ -921,7 +921,7 @@ draw_stencil_pixels(struct gl_context *ctx, GLint x, GLint y, } } break; - case PIPE_FORMAT_S8_USCALED_Z24_UNORM: + case PIPE_FORMAT_S8_UINT_Z24_UNORM: if (format == GL_DEPTH_STENCIL) { uint *dest = (uint *) (stmap + spanY * pt->stride + spanX*4); GLint k; @@ -939,7 +939,7 @@ draw_stencil_pixels(struct gl_context *ctx, GLint x, GLint y, } } break; - case PIPE_FORMAT_Z32_FLOAT_S8X24_USCALED: + case PIPE_FORMAT_Z32_FLOAT_S8X24_UINT: if (format == GL_DEPTH_STENCIL) { uint *dest = (uint *) (stmap + spanY * pt->stride + spanX*4); GLfloat *destf = (GLfloat*)dest; @@ -1112,20 +1112,20 @@ st_DrawPixels(struct gl_context *ctx, GLint x, GLint y, enum pipe_format stencil_format = PIPE_FORMAT_NONE; switch (pt->format) { - case PIPE_FORMAT_Z24_UNORM_S8_USCALED: - case PIPE_FORMAT_X24S8_USCALED: - stencil_format = PIPE_FORMAT_X24S8_USCALED; + case PIPE_FORMAT_Z24_UNORM_S8_UINT: + case PIPE_FORMAT_X24S8_UINT: + stencil_format = PIPE_FORMAT_X24S8_UINT; break; - case PIPE_FORMAT_S8_USCALED_Z24_UNORM: - case PIPE_FORMAT_S8X24_USCALED: - stencil_format = PIPE_FORMAT_S8X24_USCALED; + case PIPE_FORMAT_S8_UINT_Z24_UNORM: + case PIPE_FORMAT_S8X24_UINT: + stencil_format = PIPE_FORMAT_S8X24_UINT; break; - case PIPE_FORMAT_Z32_FLOAT_S8X24_USCALED: - case PIPE_FORMAT_X32_S8X24_USCALED: - stencil_format = PIPE_FORMAT_X32_S8X24_USCALED; + case PIPE_FORMAT_Z32_FLOAT_S8X24_UINT: + case PIPE_FORMAT_X32_S8X24_UINT: + stencil_format = PIPE_FORMAT_X32_S8X24_UINT; break; - case PIPE_FORMAT_S8_USCALED: - stencil_format = PIPE_FORMAT_S8_USCALED; + case PIPE_FORMAT_S8_UINT: + stencil_format = PIPE_FORMAT_S8_UINT; break; default: assert(0); @@ -1241,7 +1241,7 @@ copy_stencil_pixels(struct gl_context *ctx, GLint srcx, GLint srcy, src = buffer + i * width; switch (ptDraw->resource->format) { - case PIPE_FORMAT_Z24_UNORM_S8_USCALED: + case PIPE_FORMAT_Z24_UNORM_S8_UINT: { uint *dst4 = (uint *) dst; int j; @@ -1252,7 +1252,7 @@ copy_stencil_pixels(struct gl_context *ctx, GLint srcx, GLint srcy, } } break; - case PIPE_FORMAT_S8_USCALED_Z24_UNORM: + case PIPE_FORMAT_S8_UINT_Z24_UNORM: { uint *dst4 = (uint *) dst; int j; @@ -1263,11 +1263,11 @@ copy_stencil_pixels(struct gl_context *ctx, GLint srcx, GLint srcy, } } break; - case PIPE_FORMAT_S8_USCALED: + case PIPE_FORMAT_S8_UINT: assert(usage == PIPE_TRANSFER_WRITE); memcpy(dst, src, width); break; - case PIPE_FORMAT_Z32_FLOAT_S8X24_USCALED: + case PIPE_FORMAT_Z32_FLOAT_S8X24_UINT: { uint *dst4 = (uint *) dst; int j; |