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 <airlied@redhat.com>
if (!ppq->depth)
goto error;
- tmp_res.format = p->surf.format = PIPE_FORMAT_S8_USCALED_Z24_UNORM;
+ tmp_res.format = p->surf.format = PIPE_FORMAT_S8_UINT_Z24_UNORM;
if (!p->screen->is_format_supported(p->screen, tmp_res.format,
tmp_res.target, 1, tmp_res.bind)) {
- tmp_res.format = p->surf.format = PIPE_FORMAT_Z24_UNORM_S8_USCALED;
+ tmp_res.format = p->surf.format = PIPE_FORMAT_Z24_UNORM_S8_UINT;
if (!p->screen->is_format_supported(p->screen, tmp_res.format,
tmp_res.target, 1, tmp_res.bind))
tmp_z = MALLOC(width * sizeof *tmp_z);
}
- if (src_format_desc->unpack_s_8uscaled &&
- dst_format_desc->pack_s_8uscaled) {
+ if (src_format_desc->unpack_s_8uint &&
+ dst_format_desc->pack_s_8uint) {
tmp_s = MALLOC(width * sizeof *tmp_s);
}
}
if (tmp_s) {
- src_format_desc->unpack_s_8uscaled(tmp_s, 0, src_row, src_stride, width, 1);
- dst_format_desc->pack_s_8uscaled(dst_row, dst_stride, tmp_s, 0, width, 1);
+ src_format_desc->unpack_s_8uint(tmp_s, 0, src_row, src_stride, width, 1);
+ dst_format_desc->pack_s_8uint(dst_row, dst_stride, tmp_s, 0, width, 1);
}
dst_row += dst_step;
PIPE_FORMAT_R5SG5SB6U_NORM , plain, 1, 1, sn5 , sn5 , un6 , , xyz1, rgb
# Depth-stencil formats
-PIPE_FORMAT_S8_USCALED , plain, 1, 1, u8 , , , , _x__, zs
+PIPE_FORMAT_S8_UINT , plain, 1, 1, up8 , , , , _x__, zs
PIPE_FORMAT_Z16_UNORM , plain, 1, 1, un16, , , , x___, zs
PIPE_FORMAT_Z32_UNORM , plain, 1, 1, un32, , , , x___, zs
PIPE_FORMAT_Z32_FLOAT , plain, 1, 1, f32 , , , , x___, zs
-PIPE_FORMAT_Z24_UNORM_S8_USCALED , plain, 1, 1, un24, u8 , , , xy__, zs
-PIPE_FORMAT_S8_USCALED_Z24_UNORM , plain, 1, 1, u8 , un24, , , yx__, zs
-PIPE_FORMAT_X24S8_USCALED , plain, 1, 1, x24, u8 , , , _y__, zs
-PIPE_FORMAT_S8X24_USCALED , plain, 1, 1, u8 , x24 , , , _x__, zs
+PIPE_FORMAT_Z24_UNORM_S8_UINT , plain, 1, 1, un24, up8 , , , xy__, zs
+PIPE_FORMAT_S8_UINT_Z24_UNORM , plain, 1, 1, up8 , un24, , , yx__, zs
+PIPE_FORMAT_X24S8_UINT , plain, 1, 1, x24 , up8 , , , _y__, zs
+PIPE_FORMAT_S8X24_UINT , plain, 1, 1, up8 , x24 , , , _x__, zs
PIPE_FORMAT_Z24X8_UNORM , plain, 1, 1, un24, x8 , , , x___, zs
PIPE_FORMAT_X8Z24_UNORM , plain, 1, 1, x8 , un24, , , y___, zs
-PIPE_FORMAT_Z32_FLOAT_S8X24_USCALED , plain, 1, 1, f32, u8 , x24 , , xy__, zs
-PIPE_FORMAT_X32_S8X24_USCALED , plain, 1, 1, x32, u8 , x24 , , _y__, zs
+PIPE_FORMAT_Z32_FLOAT_S8X24_UINT , plain, 1, 1, f32 , up8 , x24, , xy__, zs
+PIPE_FORMAT_X32_S8X24_UINT , plain, 1, 1, x32 , up8 , x24, , _y__, zs
# YUV formats
# http://www.fourcc.org/yuv.php#UYVY
PIPE_FORMAT_A32_SINT , plain, 1, 1, sp32, , , , 000x, rgb
PIPE_FORMAT_I32_SINT , plain, 1, 1, sp32, , , , xxxx, rgb
PIPE_FORMAT_L32_SINT , plain, 1, 1, sp32, , , , xxx1, rgb
-PIPE_FORMAT_L32A32_SINT , plain, 1, 1, sp32, sp32, , , xxxy, rgb
\ No newline at end of file
+PIPE_FORMAT_L32A32_SINT , plain, 1, 1, sp32, sp32, , , xxxy, rgb
+
unsigned width, unsigned height);
/**
- * Unpack pixels to S8_USCALED.
+ * Unpack pixels to S8_UINT.
* Note: strides are in bytes.
*
* Only defined for stencil formats.
*/
void
- (*unpack_s_8uscaled)(uint8_t *dst, unsigned dst_stride,
- const uint8_t *src, unsigned src_stride,
- unsigned width, unsigned height);
+ (*unpack_s_8uint)(uint8_t *dst, unsigned dst_stride,
+ const uint8_t *src, unsigned src_stride,
+ unsigned width, unsigned height);
/**
- * Pack pixels from S8_USCALED.
+ * Pack pixels from S8_UINT.
* Note: strides are in bytes.
*
* Only defined for stencil formats.
*/
void
- (*pack_s_8uscaled)(uint8_t *dst, unsigned dst_stride,
- const uint8_t *src, unsigned src_stride,
- unsigned width, unsigned height);
+ (*pack_s_8uint)(uint8_t *dst, unsigned dst_stride,
+ const uint8_t *src, unsigned src_stride,
+ unsigned width, unsigned height);
/**
* Unpack pixel blocks to R32G32B32A32_UINT.
print " NULL, /* unpack_z_float */"
print " NULL, /* pack_z_float */"
if format.colorspace == ZS and format.swizzles[1] != SWIZZLE_NONE:
- print " &util_format_%s_unpack_s_8uscaled," % format.short_name()
- print " &util_format_%s_pack_s_8uscaled," % format.short_name()
+ print " &util_format_%s_unpack_s_8uint," % format.short_name()
+ print " &util_format_%s_pack_s_8uint," % format.short_name()
else:
- print " NULL, /* unpack_s_8uscaled */"
- print " NULL, /* pack_s_8uscaled */"
- if format.channels[0].pure == True and format.channels[0].type == UNSIGNED:
+ print " NULL, /* unpack_s_8uint */"
+ print " NULL, /* pack_s_8uint */"
+ if format.colorspace != ZS and format.channels[0].pure == True and format.channels[0].type == UNSIGNED:
print " &util_format_%s_unpack_unsigned, /* unpack_rgba_uint */" % format.short_name()
print " &util_format_%s_pack_unsigned, /* pack_rgba_uint */" % format.short_name()
print " &util_format_%s_unpack_signed, /* unpack_rgba_sint */" % format.short_name()
print " &util_format_%s_pack_signed /* pack_rgba_sint */" % format.short_name()
- elif format.channels[0].pure == True and format.channels[0].type == SIGNED:
+ elif format.colorspace != ZS and format.channels[0].pure == True and format.channels[0].type == SIGNED:
print " &util_format_%s_unpack_unsigned, /* unpack_rgba_uint */" % format.short_name()
print " &util_format_%s_pack_unsigned, /* pack_rgba_uint */" % format.short_name()
print " &util_format_%s_unpack_signed, /* unpack_rgba_sint */" % format.short_name()
* Depth-stencil formats
*/
- {PIPE_FORMAT_S8_USCALED, PACKED_1x8(0xff), PACKED_1x8(0x00), UNPACKED_1x1(0.0, 0.0, 0.0, 0.0)},
- {PIPE_FORMAT_S8_USCALED, PACKED_1x8(0xff), PACKED_1x8(0xff), UNPACKED_1x1(0.0, 255.0, 0.0, 0.0)},
+ {PIPE_FORMAT_S8_UINT, PACKED_1x8(0xff), PACKED_1x8(0x00), UNPACKED_1x1(0.0, 0.0, 0.0, 0.0)},
+ {PIPE_FORMAT_S8_UINT, PACKED_1x8(0xff), PACKED_1x8(0xff), UNPACKED_1x1(0.0, 255.0, 0.0, 0.0)},
{PIPE_FORMAT_Z16_UNORM, PACKED_1x16(0xffff), PACKED_1x16(0x0000), UNPACKED_1x1(0.0, 0.0, 0.0, 0.0)},
{PIPE_FORMAT_Z16_UNORM, PACKED_1x16(0xffff), PACKED_1x16(0xffff), UNPACKED_1x1(1.0, 0.0, 0.0, 0.0)},
{PIPE_FORMAT_Z32_FLOAT, PACKED_1x32(0xffffffff), PACKED_1x32(0x00000000), UNPACKED_1x1(0.0, 0.0, 0.0, 0.0)},
{PIPE_FORMAT_Z32_FLOAT, PACKED_1x32(0xffffffff), PACKED_1x32(0x3f800000), UNPACKED_1x1(1.0, 0.0, 0.0, 0.0)},
- {PIPE_FORMAT_Z24_UNORM_S8_USCALED, PACKED_1x32(0xffffffff), PACKED_1x32(0x00000000), UNPACKED_1x1(0.0, 0.0, 0.0, 0.0)},
- {PIPE_FORMAT_Z24_UNORM_S8_USCALED, PACKED_1x32(0xffffffff), PACKED_1x32(0x00ffffff), UNPACKED_1x1(1.0, 0.0, 0.0, 0.0)},
- {PIPE_FORMAT_Z24_UNORM_S8_USCALED, PACKED_1x32(0xffffffff), PACKED_1x32(0xff000000), UNPACKED_1x1(0.0, 255.0, 0.0, 0.0)},
- {PIPE_FORMAT_Z24_UNORM_S8_USCALED, PACKED_1x32(0xffffffff), PACKED_1x32(0xffffffff), UNPACKED_1x1(1.0, 255.0, 0.0, 0.0)},
+ {PIPE_FORMAT_Z24_UNORM_S8_UINT, PACKED_1x32(0xffffffff), PACKED_1x32(0x00000000), UNPACKED_1x1(0.0, 0.0, 0.0, 0.0)},
+ {PIPE_FORMAT_Z24_UNORM_S8_UINT, PACKED_1x32(0xffffffff), PACKED_1x32(0x00ffffff), UNPACKED_1x1(1.0, 0.0, 0.0, 0.0)},
+ {PIPE_FORMAT_Z24_UNORM_S8_UINT, PACKED_1x32(0xffffffff), PACKED_1x32(0xff000000), UNPACKED_1x1(0.0, 255.0, 0.0, 0.0)},
+ {PIPE_FORMAT_Z24_UNORM_S8_UINT, PACKED_1x32(0xffffffff), PACKED_1x32(0xffffffff), UNPACKED_1x1(1.0, 255.0, 0.0, 0.0)},
- {PIPE_FORMAT_S8_USCALED_Z24_UNORM, PACKED_1x32(0xffffffff), PACKED_1x32(0x00000000), UNPACKED_1x1(0.0, 0.0, 0.0, 0.0)},
- {PIPE_FORMAT_S8_USCALED_Z24_UNORM, PACKED_1x32(0xffffffff), PACKED_1x32(0xffffff00), UNPACKED_1x1(1.0, 0.0, 0.0, 0.0)},
- {PIPE_FORMAT_S8_USCALED_Z24_UNORM, PACKED_1x32(0xffffffff), PACKED_1x32(0x000000ff), UNPACKED_1x1(0.0, 255.0, 0.0, 0.0)},
- {PIPE_FORMAT_S8_USCALED_Z24_UNORM, PACKED_1x32(0xffffffff), PACKED_1x32(0xffffffff), UNPACKED_1x1(1.0, 255.0, 0.0, 0.0)},
+ {PIPE_FORMAT_S8_UINT_Z24_UNORM, PACKED_1x32(0xffffffff), PACKED_1x32(0x00000000), UNPACKED_1x1(0.0, 0.0, 0.0, 0.0)},
+ {PIPE_FORMAT_S8_UINT_Z24_UNORM, PACKED_1x32(0xffffffff), PACKED_1x32(0xffffff00), UNPACKED_1x1(1.0, 0.0, 0.0, 0.0)},
+ {PIPE_FORMAT_S8_UINT_Z24_UNORM, PACKED_1x32(0xffffffff), PACKED_1x32(0x000000ff), UNPACKED_1x1(0.0, 255.0, 0.0, 0.0)},
+ {PIPE_FORMAT_S8_UINT_Z24_UNORM, PACKED_1x32(0xffffffff), PACKED_1x32(0xffffffff), UNPACKED_1x1(1.0, 255.0, 0.0, 0.0)},
{PIPE_FORMAT_Z24X8_UNORM, PACKED_1x32(0x00ffffff), PACKED_1x32(0x00000000), UNPACKED_1x1(0.0, 0.0, 0.0, 0.0)},
{PIPE_FORMAT_Z24X8_UNORM, PACKED_1x32(0x00ffffff), PACKED_1x32(0x00ffffff), UNPACKED_1x1(1.0, 0.0, 0.0, 0.0)},
{PIPE_FORMAT_X8Z24_UNORM, PACKED_1x32(0xffffff00), PACKED_1x32(0x00000000), UNPACKED_1x1(0.0, 0.0, 0.0, 0.0)},
{PIPE_FORMAT_X8Z24_UNORM, PACKED_1x32(0xffffff00), PACKED_1x32(0xffffff00), UNPACKED_1x1(1.0, 0.0, 0.0, 0.0)},
- {PIPE_FORMAT_Z32_FLOAT_S8X24_USCALED, PACKED_2x32(0xffffffff, 0x000000ff), PACKED_2x32(0x00000000, 0x00000000), UNPACKED_1x1( 0.0, 0.0, 0.0, 0.0)},
- {PIPE_FORMAT_Z32_FLOAT_S8X24_USCALED, PACKED_2x32(0xffffffff, 0x000000ff), PACKED_2x32(0x3f800000, 0x00000000), UNPACKED_1x1( 1.0, 0.0, 0.0, 0.0)},
- {PIPE_FORMAT_Z32_FLOAT_S8X24_USCALED, PACKED_2x32(0xffffffff, 0x000000ff), PACKED_2x32(0x00000000, 0x000000ff), UNPACKED_1x1( 0.0, 255.0, 0.0, 0.0)},
+ {PIPE_FORMAT_Z32_FLOAT_S8X24_UINT, PACKED_2x32(0xffffffff, 0x000000ff), PACKED_2x32(0x00000000, 0x00000000), UNPACKED_1x1( 0.0, 0.0, 0.0, 0.0)},
+ {PIPE_FORMAT_Z32_FLOAT_S8X24_UINT, PACKED_2x32(0xffffffff, 0x000000ff), PACKED_2x32(0x3f800000, 0x00000000), UNPACKED_1x1( 1.0, 0.0, 0.0, 0.0)},
+ {PIPE_FORMAT_Z32_FLOAT_S8X24_UINT, PACKED_2x32(0xffffffff, 0x000000ff), PACKED_2x32(0x00000000, 0x000000ff), UNPACKED_1x1( 0.0, 255.0, 0.0, 0.0)},
/*
* YUV formats
void
-util_format_s8_uscaled_unpack_s_8uscaled(uint8_t *dst_row, unsigned dst_stride,
+util_format_s8_uint_unpack_s_8uint(uint8_t *dst_row, unsigned dst_stride,
const uint8_t *src_row, unsigned src_stride,
unsigned width, unsigned height)
{
}
void
-util_format_s8_uscaled_pack_s_8uscaled(uint8_t *dst_row, unsigned dst_stride,
+util_format_s8_uint_pack_s_8uint(uint8_t *dst_row, unsigned dst_stride,
const uint8_t *src_row, unsigned src_stride,
unsigned width, unsigned height)
{
}
void
-util_format_z24_unorm_s8_uscaled_unpack_z_float(float *dst_row, unsigned dst_stride,
+util_format_z24_unorm_s8_uint_unpack_z_float(float *dst_row, unsigned dst_stride,
const uint8_t *src_row, unsigned src_stride,
unsigned width, unsigned height)
{
}
void
-util_format_z24_unorm_s8_uscaled_pack_z_float(uint8_t *dst_row, unsigned dst_stride,
+util_format_z24_unorm_s8_uint_pack_z_float(uint8_t *dst_row, unsigned dst_stride,
const float *src_row, unsigned src_stride,
unsigned width, unsigned height)
{
}
void
-util_format_z24_unorm_s8_uscaled_unpack_z_32unorm(uint32_t *dst_row, unsigned dst_stride,
+util_format_z24_unorm_s8_uint_unpack_z_32unorm(uint32_t *dst_row, unsigned dst_stride,
const uint8_t *src_row, unsigned src_stride,
unsigned width, unsigned height)
{
}
void
-util_format_z24_unorm_s8_uscaled_pack_z_32unorm(uint8_t *dst_row, unsigned dst_stride,
+util_format_z24_unorm_s8_uint_pack_z_32unorm(uint8_t *dst_row, unsigned dst_stride,
const uint32_t *src_row, unsigned src_stride,
unsigned width, unsigned height)
{
}
void
-util_format_z24_unorm_s8_uscaled_unpack_s_8uscaled(uint8_t *dst_row, unsigned dst_stride,
+util_format_z24_unorm_s8_uint_unpack_s_8uint(uint8_t *dst_row, unsigned dst_stride,
const uint8_t *src_row, unsigned src_stride,
unsigned width, unsigned height)
{
}
void
-util_format_z24_unorm_s8_uscaled_pack_s_8uscaled(uint8_t *dst_row, unsigned dst_stride,
+util_format_z24_unorm_s8_uint_pack_s_8uint(uint8_t *dst_row, unsigned dst_stride,
const uint8_t *src_row, unsigned src_stride,
unsigned width, unsigned height)
{
}
void
-util_format_s8_uscaled_z24_unorm_unpack_z_float(float *dst_row, unsigned dst_stride,
+util_format_s8_uint_z24_unorm_unpack_z_float(float *dst_row, unsigned dst_stride,
const uint8_t *src_row, unsigned src_stride,
unsigned width, unsigned height)
{
}
void
-util_format_s8_uscaled_z24_unorm_pack_z_float(uint8_t *dst_row, unsigned dst_stride,
+util_format_s8_uint_z24_unorm_pack_z_float(uint8_t *dst_row, unsigned dst_stride,
const float *src_row, unsigned src_stride,
unsigned width, unsigned height)
{
}
void
-util_format_s8_uscaled_z24_unorm_unpack_z_32unorm(uint32_t *dst_row, unsigned dst_stride,
+util_format_s8_uint_z24_unorm_unpack_z_32unorm(uint32_t *dst_row, unsigned dst_stride,
const uint8_t *src_row, unsigned src_stride,
unsigned width, unsigned height)
{
}
void
-util_format_s8_uscaled_z24_unorm_pack_z_32unorm(uint8_t *dst_row, unsigned dst_stride,
+util_format_s8_uint_z24_unorm_pack_z_32unorm(uint8_t *dst_row, unsigned dst_stride,
const uint32_t *src_row, unsigned src_stride,
unsigned width, unsigned height)
{
}
void
-util_format_s8_uscaled_z24_unorm_unpack_s_8uscaled(uint8_t *dst_row, unsigned dst_stride,
+util_format_s8_uint_z24_unorm_unpack_s_8uint(uint8_t *dst_row, unsigned dst_stride,
const uint8_t *src_row, unsigned src_stride,
unsigned width, unsigned height)
{
}
void
-util_format_s8_uscaled_z24_unorm_pack_s_8uscaled(uint8_t *dst_row, unsigned dst_stride,
+util_format_s8_uint_z24_unorm_pack_s_8uint(uint8_t *dst_row, unsigned dst_stride,
const uint8_t *src_row, unsigned src_stride,
unsigned width, unsigned height)
{
}
void
-util_format_z32_float_s8x24_uscaled_unpack_z_float(float *dst_row, unsigned dst_stride,
+util_format_z32_float_s8x24_uint_unpack_z_float(float *dst_row, unsigned dst_stride,
const uint8_t *src_row, unsigned src_stride,
unsigned width, unsigned height)
{
}
void
-util_format_z32_float_s8x24_uscaled_pack_z_float(uint8_t *dst_row, unsigned dst_stride,
+util_format_z32_float_s8x24_uint_pack_z_float(uint8_t *dst_row, unsigned dst_stride,
const float *src_row, unsigned src_stride,
unsigned width, unsigned height)
{
}
void
-util_format_z32_float_s8x24_uscaled_unpack_z_32unorm(uint32_t *dst_row, unsigned dst_stride,
+util_format_z32_float_s8x24_uint_unpack_z_32unorm(uint32_t *dst_row, unsigned dst_stride,
const uint8_t *src_row, unsigned src_stride,
unsigned width, unsigned height)
{
}
void
-util_format_z32_float_s8x24_uscaled_pack_z_32unorm(uint8_t *dst_row, unsigned dst_stride,
+util_format_z32_float_s8x24_uint_pack_z_32unorm(uint8_t *dst_row, unsigned dst_stride,
const uint32_t *src_row, unsigned src_stride,
unsigned width, unsigned height)
{
}
void
-util_format_z32_float_s8x24_uscaled_unpack_s_8uscaled(uint8_t *dst_row, unsigned dst_stride,
+util_format_z32_float_s8x24_uint_unpack_s_8uint(uint8_t *dst_row, unsigned dst_stride,
const uint8_t *src_row, unsigned src_stride,
unsigned width, unsigned height)
{
}
void
-util_format_z32_float_s8x24_uscaled_pack_s_8uscaled(uint8_t *dst_row, unsigned dst_stride,
+util_format_z32_float_s8x24_uint_pack_s_8uint(uint8_t *dst_row, unsigned dst_stride,
const uint8_t *src_row, unsigned src_stride,
unsigned width, unsigned height)
{
void
-util_format_x24s8_uscaled_unpack_s_8uscaled(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+util_format_x24s8_uint_unpack_s_8uint(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
{
- util_format_z24_unorm_s8_uscaled_unpack_s_8uscaled(dst_row, dst_stride,
+ util_format_z24_unorm_s8_uint_unpack_s_8uint(dst_row, dst_stride,
src_row, src_stride,
width, height);
}
void
-util_format_x24s8_uscaled_pack_s_8uscaled(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+util_format_x24s8_uint_pack_s_8uint(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
{
- util_format_z24_unorm_s8_uscaled_pack_s_8uscaled(dst_row, dst_stride,
+ util_format_z24_unorm_s8_uint_pack_s_8uint(dst_row, dst_stride,
src_row, src_stride,
width, height);
}
void
-util_format_s8x24_uscaled_unpack_s_8uscaled(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+util_format_s8x24_uint_unpack_s_8uint(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
{
- util_format_s8_uscaled_z24_unorm_unpack_s_8uscaled(dst_row, dst_stride,
+ util_format_s8_uint_z24_unorm_unpack_s_8uint(dst_row, dst_stride,
src_row, src_stride,
width, height);
}
void
-util_format_s8x24_uscaled_pack_s_8uscaled(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
+util_format_s8x24_uint_pack_s_8uint(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
{
- util_format_s8_uscaled_z24_unorm_pack_s_8uscaled(dst_row, dst_stride,
+ util_format_s8_uint_z24_unorm_pack_s_8uint(dst_row, dst_stride,
src_row, src_stride,
width, height);
}
void
-util_format_x32_s8x24_uscaled_unpack_s_8uscaled(uint8_t *dst_row, unsigned dst_stride,
+util_format_x32_s8x24_uint_unpack_s_8uint(uint8_t *dst_row, unsigned dst_stride,
const uint8_t *src_row, unsigned src_stride,
unsigned width, unsigned height)
{
- util_format_z32_float_s8x24_uscaled_unpack_s_8uscaled(dst_row, dst_stride,
+ util_format_z32_float_s8x24_uint_unpack_s_8uint(dst_row, dst_stride,
src_row, src_stride,
width, height);
}
void
-util_format_x32_s8x24_uscaled_pack_s_8uscaled(uint8_t *dst_row, unsigned dst_stride,
+util_format_x32_s8x24_uint_pack_s_8uint(uint8_t *dst_row, unsigned dst_stride,
const uint8_t *src_row, unsigned src_stride,
unsigned width, unsigned height)
{
- util_format_z32_float_s8x24_uscaled_pack_s_8uscaled(dst_row, dst_stride,
+ util_format_z32_float_s8x24_uint_pack_s_8uint(dst_row, dst_stride,
src_row, src_stride,
width, height);
}
void
-util_format_s8_uscaled_unpack_s_8uscaled(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height);
+util_format_s8_uint_unpack_s_8uint(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height);
void
-util_format_s8_uscaled_pack_s_8uscaled(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height);
+util_format_s8_uint_pack_s_8uint(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height);
void
void
-util_format_z24_unorm_s8_uscaled_unpack_z_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height);
+util_format_z24_unorm_s8_uint_unpack_z_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height);
void
-util_format_z24_unorm_s8_uscaled_pack_z_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height);
+util_format_z24_unorm_s8_uint_pack_z_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height);
void
-util_format_z24_unorm_s8_uscaled_unpack_z_32unorm(uint32_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height);
+util_format_z24_unorm_s8_uint_unpack_z_32unorm(uint32_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height);
void
-util_format_z24_unorm_s8_uscaled_pack_z_32unorm(uint8_t *dst_row, unsigned dst_stride, const uint32_t *src_row, unsigned src_stride, unsigned width, unsigned height);
+util_format_z24_unorm_s8_uint_pack_z_32unorm(uint8_t *dst_row, unsigned dst_stride, const uint32_t *src_row, unsigned src_stride, unsigned width, unsigned height);
void
-util_format_z24_unorm_s8_uscaled_unpack_s_8uscaled(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height);
+util_format_z24_unorm_s8_uint_unpack_s_8uint(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height);
void
-util_format_z24_unorm_s8_uscaled_pack_s_8uscaled(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height);
+util_format_z24_unorm_s8_uint_pack_s_8uint(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height);
void
-util_format_s8_uscaled_z24_unorm_unpack_z_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height);
+util_format_s8_uint_z24_unorm_unpack_z_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height);
void
-util_format_s8_uscaled_z24_unorm_pack_z_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height);
+util_format_s8_uint_z24_unorm_pack_z_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height);
void
-util_format_s8_uscaled_z24_unorm_unpack_z_32unorm(uint32_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height);
+util_format_s8_uint_z24_unorm_unpack_z_32unorm(uint32_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height);
void
-util_format_s8_uscaled_z24_unorm_pack_z_32unorm(uint8_t *dst_row, unsigned dst_stride, const uint32_t *src_row, unsigned src_stride, unsigned width, unsigned height);
+util_format_s8_uint_z24_unorm_pack_z_32unorm(uint8_t *dst_row, unsigned dst_stride, const uint32_t *src_row, unsigned src_stride, unsigned width, unsigned height);
void
-util_format_s8_uscaled_z24_unorm_unpack_s_8uscaled(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height);
+util_format_s8_uint_z24_unorm_unpack_s_8uint(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height);
void
-util_format_s8_uscaled_z24_unorm_pack_s_8uscaled(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height);
+util_format_s8_uint_z24_unorm_pack_s_8uint(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height);
void
void
-util_format_z32_float_s8x24_uscaled_unpack_z_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height);
+util_format_z32_float_s8x24_uint_unpack_z_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height);
void
-util_format_z32_float_s8x24_uscaled_pack_z_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height);
+util_format_z32_float_s8x24_uint_pack_z_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height);
void
-util_format_z32_float_s8x24_uscaled_unpack_z_32unorm(uint32_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height);
+util_format_z32_float_s8x24_uint_unpack_z_32unorm(uint32_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height);
void
-util_format_z32_float_s8x24_uscaled_pack_z_32unorm(uint8_t *dst_row, unsigned dst_stride, const uint32_t *src_row, unsigned src_stride, unsigned width, unsigned height);
+util_format_z32_float_s8x24_uint_pack_z_32unorm(uint8_t *dst_row, unsigned dst_stride, const uint32_t *src_row, unsigned src_stride, unsigned width, unsigned height);
void
-util_format_z32_float_s8x24_uscaled_unpack_s_8uscaled(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height);
+util_format_z32_float_s8x24_uint_unpack_s_8uint(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height);
void
-util_format_z32_float_s8x24_uscaled_pack_s_8uscaled(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height);
+util_format_z32_float_s8x24_uint_pack_s_8uint(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height);
void
-util_format_x24s8_uscaled_unpack_s_8uscaled(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height);
+util_format_x24s8_uint_unpack_s_8uint(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height);
void
-util_format_x24s8_uscaled_pack_s_8uscaled(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height);
+util_format_x24s8_uint_pack_s_8uint(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height);
void
-util_format_s8x24_uscaled_unpack_s_8uscaled(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height);
+util_format_s8x24_uint_unpack_s_8uint(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height);
void
-util_format_s8x24_uscaled_pack_s_8uscaled(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height);
+util_format_s8x24_uint_pack_s_8uint(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height);
void
-util_format_x32_s8x24_uscaled_unpack_s_8uscaled(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height);
+util_format_x32_s8x24_uint_unpack_s_8uint(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height);
void
-util_format_x32_s8x24_uscaled_pack_s_8uscaled(uint8_t *dst_row, unsigned dst_sride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height);
+util_format_x32_s8x24_uint_pack_s_8uint(uint8_t *dst_row, unsigned dst_sride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height);
#endif /* U_FORMAT_ZS_H_ */
case PIPE_FORMAT_Z32_UNORM:
case PIPE_FORMAT_Z32_FLOAT:
return z;
- case PIPE_FORMAT_Z24_UNORM_S8_USCALED:
+ case PIPE_FORMAT_Z24_UNORM_S8_UINT:
case PIPE_FORMAT_Z24X8_UNORM:
return z & 0xffffff;
- case PIPE_FORMAT_S8_USCALED_Z24_UNORM:
+ case PIPE_FORMAT_S8_UINT_Z24_UNORM:
case PIPE_FORMAT_X8Z24_UNORM:
return (z & 0xffffff) << 8;
- case PIPE_FORMAT_S8_USCALED:
+ case PIPE_FORMAT_S8_UINT:
return 0;
default:
debug_print_format("gallium: unhandled format in util_pack_mask_z()", format);
util_pack64_mask_z(enum pipe_format format, uint32_t z)
{
switch (format) {
- case PIPE_FORMAT_Z32_FLOAT_S8X24_USCALED:
+ case PIPE_FORMAT_Z32_FLOAT_S8X24_UINT:
return z;
default:
return util_pack_mask_z(format, z);
uint32_t packed = util_pack_mask_z(format, z);
switch (format) {
- case PIPE_FORMAT_Z24_UNORM_S8_USCALED:
+ case PIPE_FORMAT_Z24_UNORM_S8_UINT:
packed |= (uint32_t)s << 24;
break;
- case PIPE_FORMAT_S8_USCALED_Z24_UNORM:
+ case PIPE_FORMAT_S8_UINT_Z24_UNORM:
packed |= s;
break;
- case PIPE_FORMAT_S8_USCALED:
+ case PIPE_FORMAT_S8_UINT:
packed |= s;
break;
default:
uint64_t packed;
switch (format) {
- case PIPE_FORMAT_Z32_FLOAT_S8X24_USCALED:
+ case PIPE_FORMAT_Z32_FLOAT_S8X24_UINT:
packed = util_pack64_mask_z(format, z);
packed |= (uint64_t)s << 32ull;
return packed;
case PIPE_FORMAT_Z32_FLOAT:
fui.f = (float)z;
return fui.ui;
- case PIPE_FORMAT_Z24_UNORM_S8_USCALED:
+ case PIPE_FORMAT_Z24_UNORM_S8_UINT:
case PIPE_FORMAT_Z24X8_UNORM:
if (z == 1.0)
return 0xffffff;
return (uint32_t) (z * 0xffffff);
- case PIPE_FORMAT_S8_USCALED_Z24_UNORM:
+ case PIPE_FORMAT_S8_UINT_Z24_UNORM:
case PIPE_FORMAT_X8Z24_UNORM:
if (z == 1.0)
return 0xffffff00;
return ((uint32_t) (z * 0xffffff)) << 8;
- case PIPE_FORMAT_S8_USCALED:
+ case PIPE_FORMAT_S8_UINT:
/* this case can get it via util_pack_z_stencil() */
return 0;
default:
return 0;
switch (format) {
- case PIPE_FORMAT_Z32_FLOAT_S8X24_USCALED:
+ case PIPE_FORMAT_Z32_FLOAT_S8X24_UINT:
fui.f = (float)z;
return fui.ui;
default:
uint32_t packed = util_pack_z(format, z);
switch (format) {
- case PIPE_FORMAT_Z24_UNORM_S8_USCALED:
+ case PIPE_FORMAT_Z24_UNORM_S8_UINT:
packed |= (uint32_t)s << 24;
break;
- case PIPE_FORMAT_S8_USCALED_Z24_UNORM:
+ case PIPE_FORMAT_S8_UINT_Z24_UNORM:
packed |= s;
break;
- case PIPE_FORMAT_S8_USCALED:
+ case PIPE_FORMAT_S8_UINT:
packed |= s;
break;
default:
uint64_t packed;
switch (format) {
- case PIPE_FORMAT_Z32_FLOAT_S8X24_USCALED:
+ case PIPE_FORMAT_Z32_FLOAT_S8X24_UINT:
packed = util_pack64_z(format, z);
packed |= (uint64_t)s << 32ull;
break;
switch (util_format_get_blocksize(dst->format)) {
case 1:
- assert(dst->format == PIPE_FORMAT_S8_USCALED);
+ assert(dst->format == PIPE_FORMAT_S8_UINT);
if(dst_stride == width)
memset(dst_map, (ubyte) zstencil, height * width);
else {
}
else {
uint32_t dst_mask;
- if (dst->format == PIPE_FORMAT_Z24_UNORM_S8_USCALED)
+ if (dst->format == PIPE_FORMAT_Z24_UNORM_S8_UINT)
dst_mask = 0xffffff00;
else {
- assert(dst->format == PIPE_FORMAT_S8_USCALED_Z24_UNORM);
+ assert(dst->format == PIPE_FORMAT_S8_UINT_Z24_UNORM);
dst_mask = 0xffffff;
}
if (clear_flags & PIPE_CLEAR_DEPTH)
uint64_t zstencil = util_pack64_z_stencil(dst->texture->format,
depth, stencil);
- assert(dst->format == PIPE_FORMAT_Z32_FLOAT_S8X24_USCALED);
+ assert(dst->format == PIPE_FORMAT_Z32_FLOAT_S8X24_UINT);
if (!need_rmw) {
for (i = 0; i < height; i++) {
}
-/*** PIPE_FORMAT_Z24_UNORM_S8_USCALED ***/
+/*** PIPE_FORMAT_Z24_UNORM_S8_UINT ***/
/**
* Return Z component as four float in [0,1]. Stencil part ignored.
}
-/*** PIPE_FORMAT_S8_USCALED_Z24_UNORM ***/
+/*** PIPE_FORMAT_S8_UINT_Z24_UNORM ***/
/**
* Return Z component as four float in [0,1]. Stencil part ignored.
}
}
-/*** PIPE_FORMAT_S8X24_USCALED ***/
+/*** PIPE_FORMAT_S8X24_UINT ***/
/**
* Return S component as four uint32_t in [0..255]. Z part ignored.
}
}
-/*** PIPE_FORMAT_X24S8_USCALED ***/
+/*** PIPE_FORMAT_X24S8_UINT ***/
/**
* Return S component as four uint32_t in [0..255]. Z part ignored.
}
}
-/*** PIPE_FORMAT_Z32_FLOAT_S8X24_USCALED ***/
+/*** PIPE_FORMAT_Z32_FLOAT_S8X24_UINT ***/
/**
* Return each Z value as four floats in [0,1].
case PIPE_FORMAT_Z32_UNORM:
z32_get_tile_rgba((unsigned *) src, w, h, dst, dst_stride);
break;
- case PIPE_FORMAT_Z24_UNORM_S8_USCALED:
+ case PIPE_FORMAT_Z24_UNORM_S8_UINT:
case PIPE_FORMAT_Z24X8_UNORM:
s8z24_get_tile_rgba((unsigned *) src, w, h, dst, dst_stride);
break;
- case PIPE_FORMAT_S8_USCALED:
+ case PIPE_FORMAT_S8_UINT:
s8_get_tile_rgba((unsigned char *) src, w, h, dst, dst_stride);
break;
- case PIPE_FORMAT_X24S8_USCALED:
+ case PIPE_FORMAT_X24S8_UINT:
s8x24_get_tile_rgba((unsigned *) src, w, h, dst, dst_stride);
break;
- case PIPE_FORMAT_S8_USCALED_Z24_UNORM:
+ case PIPE_FORMAT_S8_UINT_Z24_UNORM:
case PIPE_FORMAT_X8Z24_UNORM:
z24s8_get_tile_rgba((unsigned *) src, w, h, dst, dst_stride);
break;
- case PIPE_FORMAT_S8X24_USCALED:
+ case PIPE_FORMAT_S8X24_UINT:
x24s8_get_tile_rgba((unsigned *) src, w, h, dst, dst_stride);
break;
case PIPE_FORMAT_Z32_FLOAT:
z32f_get_tile_rgba((float *) src, w, h, dst, dst_stride);
break;
- case PIPE_FORMAT_Z32_FLOAT_S8X24_USCALED:
+ case PIPE_FORMAT_Z32_FLOAT_S8X24_UINT:
z32f_x24s8_get_tile_rgba((float *) src, w, h, dst, dst_stride);
break;
default:
case PIPE_FORMAT_Z32_UNORM:
/*z32_put_tile_rgba((unsigned *) packed, w, h, p, src_stride);*/
break;
- case PIPE_FORMAT_Z24_UNORM_S8_USCALED:
+ case PIPE_FORMAT_Z24_UNORM_S8_UINT:
case PIPE_FORMAT_Z24X8_UNORM:
/*s8z24_put_tile_rgba((unsigned *) packed, w, h, p, src_stride);*/
break;
- case PIPE_FORMAT_S8_USCALED_Z24_UNORM:
+ case PIPE_FORMAT_S8_UINT_Z24_UNORM:
case PIPE_FORMAT_X8Z24_UNORM:
/*z24s8_put_tile_rgba((unsigned *) packed, w, h, p, src_stride);*/
break;
case PIPE_FORMAT_Z32_FLOAT:
/*z32f_put_tile_rgba((unsigned *) packed, w, h, p, src_stride);*/
break;
- case PIPE_FORMAT_Z32_FLOAT_S8X24_USCALED:
+ case PIPE_FORMAT_Z32_FLOAT_S8X24_UINT:
/*z32f_s8x24_put_tile_rgba((unsigned *) packed, w, h, p, src_stride);*/
break;
default:
}
}
break;
- case PIPE_FORMAT_Z24_UNORM_S8_USCALED:
+ case PIPE_FORMAT_Z24_UNORM_S8_UINT:
case PIPE_FORMAT_Z24X8_UNORM:
{
const uint *ptrc
}
}
break;
- case PIPE_FORMAT_S8_USCALED_Z24_UNORM:
+ case PIPE_FORMAT_S8_UINT_Z24_UNORM:
case PIPE_FORMAT_X8Z24_UNORM:
{
const uint *ptrc
}
}
break;
- case PIPE_FORMAT_Z24_UNORM_S8_USCALED:
+ case PIPE_FORMAT_Z24_UNORM_S8_UINT:
{
uint *pDest = (uint *) (map + y * pt->stride + x*4);
/*assert((pt->usage & PIPE_TRANSFER_READ_WRITE) == PIPE_TRANSFER_READ_WRITE);*/
}
}
break;
- case PIPE_FORMAT_S8_USCALED_Z24_UNORM:
+ case PIPE_FORMAT_S8_UINT_Z24_UNORM:
{
uint *pDest = (uint *) (map + y * pt->stride + x*4);
/*assert((pt->usage & PIPE_TRANSFER_READ_WRITE) == PIPE_TRANSFER_READ_WRITE);*/
spe_comment(f, 0, "Fetch Z/stencil quad from tile");
switch(zs_format) {
- case PIPE_FORMAT_Z24_UNORM_S8_USCALED: /* fall through */
+ case PIPE_FORMAT_Z24_UNORM_S8_UINT: /* fall through */
case PIPE_FORMAT_Z24X8_UNORM:
/* prepare mask to extract Z vals from ZS vals */
spe_load_uint(f, zmask_reg, 0x00ffffff);
spe_rotmi(f, fbS_reg, fbZS_reg, -24);
break;
- case PIPE_FORMAT_S8_USCALED_Z24_UNORM: /* fall through */
+ case PIPE_FORMAT_S8_UINT_Z24_UNORM: /* fall through */
case PIPE_FORMAT_X8Z24_UNORM:
/* convert fragment Z from [0,1] to 32-bit ints */
spe_cfltu(f, fragZ_reg, fragZ_reg, 32);
* fbS_reg has four 8-bit Z values in bits [7..0].
*/
spe_comment(f, 0, "Store quad's depth/stencil values in tile");
- if (zs_format == PIPE_FORMAT_Z24_UNORM_S8_USCALED ||
+ if (zs_format == PIPE_FORMAT_Z24_UNORM_S8_UINT ||
zs_format == PIPE_FORMAT_Z24X8_UNORM) {
spe_shli(f, fbS_reg, fbS_reg, 24); /* fbS = fbS << 24 */
spe_or(f, fbZS_reg, fbS_reg, fbZ_reg); /* fbZS = fbS | fbZ */
}
- else if (zs_format == PIPE_FORMAT_S8_USCALED_Z24_UNORM ||
+ else if (zs_format == PIPE_FORMAT_S8_UINT_Z24_UNORM ||
zs_format == PIPE_FORMAT_X8Z24_UNORM) {
spe_shli(f, fbZ_reg, fbZ_reg, 8); /* fbZ = fbZ << 8 */
spe_or(f, fbZS_reg, fbS_reg, fbZ_reg); /* fbZS = fbS | fbZ */
else if (zs_format == PIPE_FORMAT_Z16_UNORM) {
spe_move(f, fbZS_reg, fbZ_reg); /* fbZS = fbZ */
}
- else if (zs_format == PIPE_FORMAT_S8_USCALED) {
+ else if (zs_format == PIPE_FORMAT_S8_UINT) {
ASSERT(0); /* XXX to do */
}
else {
* code before the fragment shader to cull fragments/quads that are
* totally occluded/discarded.
*
- * XXX we only support PIPE_FORMAT_S8_USCALED_Z24_UNORM z/stencil buffer right now.
+ * XXX we only support PIPE_FORMAT_S8_UINT_Z24_UNORM z/stencil buffer right now.
*
* See the spu_default_fragment_ops() function to see how the per-fragment
* operations would be done with ordinary C code.
/* only a few formats are known to work at this time */
switch (format) {
- case PIPE_FORMAT_Z24_UNORM_S8_USCALED:
+ case PIPE_FORMAT_Z24_UNORM_S8_UINT:
case PIPE_FORMAT_Z24X8_UNORM:
case PIPE_FORMAT_B8G8R8A8_UNORM:
case PIPE_FORMAT_I8_UNORM:
spu.fb.zsize = 4;
spu.fb.zscale = (float) 0xffffffffu;
break;
- case PIPE_FORMAT_S8_USCALED_Z24_UNORM:
- case PIPE_FORMAT_Z24_UNORM_S8_USCALED:
+ case PIPE_FORMAT_S8_UINT_Z24_UNORM:
+ case PIPE_FORMAT_Z24_UNORM_S8_UINT:
case PIPE_FORMAT_X8Z24_UNORM:
case PIPE_FORMAT_Z24X8_UNORM:
spu.fb.zsize = 4;
if (spu.depth_stencil_alpha.stencil[0].enabled) {
/* do stencil test */
- ASSERT(spu.fb.depth_format == PIPE_FORMAT_Z24_UNORM_S8_USCALED);
+ ASSERT(spu.fb.depth_format == PIPE_FORMAT_Z24_UNORM_S8_UINT);
}
else if (spu.depth_stencil_alpha.depth.enabled) {
/* do depth test */
- ASSERT(spu.fb.depth_format == PIPE_FORMAT_Z24_UNORM_S8_USCALED ||
+ ASSERT(spu.fb.depth_format == PIPE_FORMAT_Z24_UNORM_S8_UINT ||
spu.fb.depth_format == PIPE_FORMAT_Z24X8_UNORM);
vector unsigned int ifragZ;
if (util_format_get_blocksize(depth_tex->b.b.format) == 4) {
/* Avoid read-modify-write if there's no stencil. */
if (buffers & PIPE_CLEAR_STENCIL
- || depth_tex->b.b.format != PIPE_FORMAT_Z24_UNORM_S8_USCALED) {
+ || depth_tex->b.b.format != PIPE_FORMAT_Z24_UNORM_S8_UINT) {
clear_params |= CLEARPARAM_WRITE_STENCIL;
clear_stencil = packed_z_stencil & 0xff;
clear_depth = packed_z_stencil;
clear_params |= CLEARPARAM_WRITE_STENCIL;
depth_tex = i915_texture(zbuf->texture);
- assert(depth_tex->b.b.format == PIPE_FORMAT_Z24_UNORM_S8_USCALED);
+ assert(depth_tex->b.b.format == PIPE_FORMAT_Z24_UNORM_S8_UINT);
packed_z_stencil = util_pack_z_stencil(depth_tex->b.b.format, depth, stencil);
depth_clear_bbp = 32;
PIPE_FORMAT_DXT3_RGBA,
PIPE_FORMAT_DXT5_RGBA,
PIPE_FORMAT_Z24X8_UNORM,
- PIPE_FORMAT_Z24_UNORM_S8_USCALED,
+ PIPE_FORMAT_Z24_UNORM_S8_UINT,
PIPE_FORMAT_NONE /* list terminator */
};
static const enum pipe_format render_supported[] = {
/* XXX why not?
PIPE_FORMAT_Z16_UNORM, */
PIPE_FORMAT_Z24X8_UNORM,
- PIPE_FORMAT_Z24_UNORM_S8_USCALED,
+ PIPE_FORMAT_Z24_UNORM_S8_UINT,
PIPE_FORMAT_NONE /* list terminator */
};
const enum pipe_format *list;
view->swizzle_g != PIPE_SWIZZLE_GREEN ||
view->swizzle_b != PIPE_SWIZZLE_BLUE ||
view->swizzle_a != PIPE_SWIZZLE_ALPHA ) &&
- pipeFormat != PIPE_FORMAT_Z24_UNORM_S8_USCALED &&
+ pipeFormat != PIPE_FORMAT_Z24_UNORM_S8_UINT &&
pipeFormat != PIPE_FORMAT_Z24X8_UNORM )
debug_printf("i915: unsupported texture swizzle for format %d\n", pipeFormat);
return (MAPSURF_COMPRESSED | MT_COMPRESS_DXT2_3);
case PIPE_FORMAT_DXT5_RGBA:
return (MAPSURF_COMPRESSED | MT_COMPRESS_DXT4_5);
- case PIPE_FORMAT_Z24_UNORM_S8_USCALED:
+ case PIPE_FORMAT_Z24_UNORM_S8_UINT:
case PIPE_FORMAT_Z24X8_UNORM:
{
if ( view->swizzle_r == PIPE_SWIZZLE_RED &&
{
switch (zformat) {
case PIPE_FORMAT_Z24X8_UNORM:
- case PIPE_FORMAT_Z24_UNORM_S8_USCALED:
+ case PIPE_FORMAT_Z24_UNORM_S8_UINT:
return DEPTH_FRMT_24_FIXED_8_OTHER;
case PIPE_FORMAT_Z16_UNORM:
return DEPTH_FRMT_16_FIXED;
(otherwise this won't work anyway). Hence will only want to
do it if really have stencil and it isn't cleared */
if ((clear_flags & PIPE_CLEAR_STENCIL) ||
- (dst->format != PIPE_FORMAT_Z24_UNORM_S8_USCALED))
+ (dst->format != PIPE_FORMAT_Z24_UNORM_S8_UINT))
mask |= XY_COLOR_BLT_WRITE_ALPHA;
i915_fill_blit( i915_context(pipe),
cpp = 2;
break;
case PIPE_FORMAT_Z24X8_UNORM:
- case PIPE_FORMAT_Z24_UNORM_S8_USCALED:
+ case PIPE_FORMAT_Z24_UNORM_S8_UINT:
format = BRW_DEPTHFORMAT_D24_UNORM_S8_UINT;
cpp = 4;
break;
value = tmp.ui;
break;
case PIPE_FORMAT_Z24X8_UNORM:
- case PIPE_FORMAT_Z24_UNORM_S8_USCALED:
+ case PIPE_FORMAT_Z24_UNORM_S8_UINT:
value = ((unsigned)(depth * MASK24) & MASK24);
break;
case PIPE_FORMAT_Z16_UNORM:
value = value | (stencil << 24);
mask |= XY_BLT_WRITE_ALPHA;
break;
- case PIPE_FORMAT_Z24_UNORM_S8_USCALED:
+ case PIPE_FORMAT_Z24_UNORM_S8_UINT:
value = value | (stencil << 24);
if (clear_flags & PIPE_CLEAR_STENCIL)
mask |= XY_BLT_WRITE_ALPHA;
case PIPE_FORMAT_Z16_UNORM:
return BRW_SURFACEFORMAT_I16_UNORM;
- case PIPE_FORMAT_Z24_UNORM_S8_USCALED:
+ case PIPE_FORMAT_Z24_UNORM_S8_UINT:
case PIPE_FORMAT_Z24X8_UNORM:
return BRW_SURFACEFORMAT_I24X8_UNORM;
/* depth */
PIPE_FORMAT_Z32_FLOAT,
PIPE_FORMAT_Z24X8_UNORM,
- PIPE_FORMAT_Z24_UNORM_S8_USCALED,
+ PIPE_FORMAT_Z24_UNORM_S8_UINT,
PIPE_FORMAT_Z16_UNORM,
/* signed */
PIPE_FORMAT_R8G8_SNORM,
static const enum pipe_format depth_supported[] = {
PIPE_FORMAT_Z32_FLOAT,
PIPE_FORMAT_Z24X8_UNORM,
- PIPE_FORMAT_Z24_UNORM_S8_USCALED,
+ PIPE_FORMAT_Z24_UNORM_S8_UINT,
PIPE_FORMAT_Z16_UNORM,
PIPE_FORMAT_NONE /* list terminator */
};
assert(format_desc->block.height == 1);
if (stencil[0].enabled) {
- assert(format_desc->format == PIPE_FORMAT_Z24_UNORM_S8_USCALED ||
- format_desc->format == PIPE_FORMAT_S8_USCALED_Z24_UNORM);
+ assert(format_desc->format == PIPE_FORMAT_Z24_UNORM_S8_UINT ||
+ format_desc->format == PIPE_FORMAT_S8_UINT_Z24_UNORM);
}
assert(z_swizzle < 4);
B_(C0, C0, C0, ONE_FLOAT, UNORM, UINT, UINT, UINT, Z16, 0),
SAMPLER_VIEW | DEPTH_STENCIL },
- [PIPE_FORMAT_Z24_UNORM_S8_USCALED] = { NV50_ZETA_FORMAT_Z24_S8_UNORM,
+ [PIPE_FORMAT_Z24_UNORM_S8_UINT] = { NV50_ZETA_FORMAT_Z24_S8_UNORM,
B_(C0, C1, C0, ONE_FLOAT, UNORM, UINT, UINT, UINT, Z24_S8, 0),
SAMPLER_VIEW | DEPTH_STENCIL },
B_(C0, C0, C0, ONE_FLOAT, UNORM, UINT, UINT, UINT, Z24_X8, 0),
SAMPLER_VIEW | DEPTH_STENCIL },
- [PIPE_FORMAT_S8_USCALED_Z24_UNORM] = { NV50_ZETA_FORMAT_S8_Z24_UNORM,
+ [PIPE_FORMAT_S8_UINT_Z24_UNORM] = { NV50_ZETA_FORMAT_S8_Z24_UNORM,
B_(C1, C0, C1, ONE_FLOAT, UINT, UNORM, UINT, UINT, S8_Z24, 0),
SAMPLER_VIEW | DEPTH_STENCIL },
B_(C0, C0, C0, ONE_FLOAT, FLOAT, UINT, UINT, UINT, Z32, 0),
SAMPLER_VIEW | DEPTH_STENCIL },
- [PIPE_FORMAT_Z32_FLOAT_S8X24_USCALED] = { NV50_ZETA_FORMAT_Z32_S8_X24_FLOAT,
+ [PIPE_FORMAT_Z32_FLOAT_S8X24_UINT] = { NV50_ZETA_FORMAT_Z32_S8_X24_FLOAT,
B_(C0, C0, C0, ONE_FLOAT, FLOAT, UINT, UINT, UINT, Z32_S8_X24, 0),
SAMPLER_VIEW | DEPTH_STENCIL },
case PIPE_FORMAT_Z16_UNORM:
tile_flags = 0x6c00 + (ms << 8);
break;
- case PIPE_FORMAT_S8_USCALED_Z24_UNORM:
+ case PIPE_FORMAT_S8_UINT_Z24_UNORM:
tile_flags = 0x1800 + (ms << 8);
break;
case PIPE_FORMAT_Z24X8_UNORM:
- case PIPE_FORMAT_Z24_UNORM_S8_USCALED:
+ case PIPE_FORMAT_Z24_UNORM_S8_UINT:
tile_flags = 0x22800 + (ms << 8);
break;
case PIPE_FORMAT_Z32_FLOAT:
tile_flags = 0x4000 + (ms << 8);
break;
- case PIPE_FORMAT_Z32_FLOAT_S8X24_USCALED:
+ case PIPE_FORMAT_Z32_FLOAT_S8X24_UINT:
tile_flags = 0x6000 + (ms << 8);
break;
default:
{
static const uint32_t code[] =
{
- /* 3 coords RGBA in, RGBA out, also for Z32_FLOAT(_S8X24_USCALED) */
+ /* 3 coords RGBA in, RGBA out, also for Z32_FLOAT(_S8X24_UINT) */
0x80000000, /* interp $r0 v[0x0] */
0x80010004, /* interp $r1 v[0x4] */
0x80020009, /* interp $r2 flat v[0x8] */
{
switch (format) {
case PIPE_FORMAT_Z16_UNORM: return PIPE_FORMAT_R16_UNORM;
- case PIPE_FORMAT_Z24_UNORM_S8_USCALED:
- case PIPE_FORMAT_S8_USCALED_Z24_UNORM:
+ case PIPE_FORMAT_Z24_UNORM_S8_UINT:
+ case PIPE_FORMAT_S8_UINT_Z24_UNORM:
case PIPE_FORMAT_Z24X8_UNORM: return PIPE_FORMAT_R8G8B8A8_UNORM;
case PIPE_FORMAT_Z32_FLOAT: return PIPE_FORMAT_R32_FLOAT;
- case PIPE_FORMAT_Z32_FLOAT_S8X24_USCALED: return PIPE_FORMAT_R32G32_FLOAT;
+ case PIPE_FORMAT_Z32_FLOAT_S8X24_UINT: return PIPE_FORMAT_R32G32_FLOAT;
default:
assert(0);
return PIPE_FORMAT_NONE;
switch (format) {
case PIPE_FORMAT_Z24X8_UNORM:
- case PIPE_FORMAT_Z24_UNORM_S8_USCALED:
+ case PIPE_FORMAT_Z24_UNORM_S8_UINT:
blit->fp_offset = 160;
if (mask & PIPE_MASK_Z)
blit->color_mask |= 0x0111;
if (mask & PIPE_MASK_S)
blit->color_mask |= 0x1000;
break;
- case PIPE_FORMAT_S8_USCALED_Z24_UNORM:
+ case PIPE_FORMAT_S8_UINT_Z24_UNORM:
blit->fp_offset = 24;
if (mask & PIPE_MASK_Z)
blit->color_mask |= 0x1110;
B_(C0, C0, C0, ONE_FLOAT, UNORM, UINT, UINT, UINT, Z16, 0),
SAMPLER_VIEW | DEPTH_STENCIL },
- [PIPE_FORMAT_Z24_UNORM_S8_USCALED] = { NV50_ZETA_FORMAT_Z24_S8_UNORM,
+ [PIPE_FORMAT_Z24_UNORM_S8_UINT] = { NV50_ZETA_FORMAT_Z24_S8_UNORM,
B_(C0, C0, C0, ONE_FLOAT, UNORM, UINT, UINT, UINT, Z24_S8, 0),
SAMPLER_VIEW | DEPTH_STENCIL },
B_(C0, C0, C0, ONE_FLOAT, UNORM, UINT, UINT, UINT, Z24_X8, 0),
SAMPLER_VIEW | DEPTH_STENCIL },
- [PIPE_FORMAT_S8_USCALED_Z24_UNORM] = { NV50_ZETA_FORMAT_S8_Z24_UNORM,
+ [PIPE_FORMAT_S8_UINT_Z24_UNORM] = { NV50_ZETA_FORMAT_S8_Z24_UNORM,
B_(C1, C1, C1, ONE_FLOAT, UINT, UNORM, UINT, UINT, S8_Z24, 0),
SAMPLER_VIEW | DEPTH_STENCIL },
B_(C0, C0, C0, ONE_FLOAT, FLOAT, UINT, UINT, UINT, Z32, 0),
SAMPLER_VIEW | DEPTH_STENCIL },
- [PIPE_FORMAT_Z32_FLOAT_S8X24_USCALED] = { NV50_ZETA_FORMAT_Z32_S8_X24_FLOAT,
+ [PIPE_FORMAT_Z32_FLOAT_S8X24_UINT] = { NV50_ZETA_FORMAT_Z32_S8_X24_FLOAT,
B_(C0, C0, C0, ONE_FLOAT, FLOAT, UINT, UINT, UINT, Z32_S8_X24, 0),
SAMPLER_VIEW | DEPTH_STENCIL },
else
tile_flags = 0x0100;
break;
- case PIPE_FORMAT_S8_USCALED_Z24_UNORM:
+ case PIPE_FORMAT_S8_UINT_Z24_UNORM:
if (compressed)
tile_flags = 0x5100 + (ms << 8);
else
tile_flags = 0x4600;
break;
case PIPE_FORMAT_Z24X8_UNORM:
- case PIPE_FORMAT_Z24_UNORM_S8_USCALED:
+ case PIPE_FORMAT_Z24_UNORM_S8_UINT:
if (compressed)
tile_flags = 0x1700 + (ms << 8);
else
else
tile_flags = 0x7b00;
break;
- case PIPE_FORMAT_Z32_FLOAT_S8X24_USCALED:
+ case PIPE_FORMAT_Z32_FLOAT_S8X24_UINT:
if (compressed)
tile_flags = 0xce00 + (ms << 8);
else
{
static const uint32_t code[] = /* use nvc0dis */
{
- /* 2 coords RGBA in, RGBA out, also for Z32_FLOAT(_S8X24_USCALED)
+ /* 2 coords RGBA in, RGBA out, also for Z32_FLOAT(_S8X24_UINT)
* NOTE:
* NVC0 doesn't like tex 3d on non-3d textures, but there should
* only be 2d and 2d-array MS resources anyway.
{
switch (format) {
case PIPE_FORMAT_Z16_UNORM: return PIPE_FORMAT_R16_UNORM;
- case PIPE_FORMAT_Z24_UNORM_S8_USCALED:
- case PIPE_FORMAT_S8_USCALED_Z24_UNORM:
+ case PIPE_FORMAT_Z24_UNORM_S8_UINT:
+ case PIPE_FORMAT_S8_UINT_Z24_UNORM:
case PIPE_FORMAT_Z24X8_UNORM: return PIPE_FORMAT_R8G8B8A8_UNORM;
case PIPE_FORMAT_Z32_FLOAT: return PIPE_FORMAT_R32_FLOAT;
- case PIPE_FORMAT_Z32_FLOAT_S8X24_USCALED: return PIPE_FORMAT_R32G32_FLOAT;
+ case PIPE_FORMAT_Z32_FLOAT_S8X24_UINT: return PIPE_FORMAT_R32G32_FLOAT;
default:
assert(0);
return PIPE_FORMAT_NONE;
switch (format) {
case PIPE_FORMAT_Z24X8_UNORM:
- case PIPE_FORMAT_Z24_UNORM_S8_USCALED:
+ case PIPE_FORMAT_Z24_UNORM_S8_UINT:
blit->fp_offset = 0x180;
if (mask & PIPE_MASK_Z)
blit->color_mask |= 0x0111;
if (mask & PIPE_MASK_S)
blit->color_mask |= 0x1000;
break;
- case PIPE_FORMAT_S8_USCALED_Z24_UNORM:
+ case PIPE_FORMAT_S8_UINT_Z24_UNORM:
blit->fp_offset = 0x80;
if (mask & PIPE_MASK_Z)
blit->color_mask |= 0x1110;
_(DXT5_SRGBA, DXT5, T, T, T, T, X, Y, Z, W, UNORM, SRGB),
__(Z16_UNORM, A8L8, Z16, T, T, T, 1, W, W, W, W, UNORM, 0),
- __(S8_USCALED_Z24_UNORM,HILO16,Z24, T, T, T, 1, W, W, W, W, UNORM, 0),
+ __(S8_UINT_Z24_UNORM,HILO16,Z24, T, T, T, 1, W, W, W, W, UNORM, 0),
__(X8Z24_UNORM, HILO16,Z24, T, T, T, 1, W, W, W, W, UNORM, 0),
_(R16_UNORM, A16, T, 0, 0, 1, X, X, X, X, UNORM, 0),
if (bind & PIPE_BIND_DEPTH_STENCIL) {
switch (format) {
- case PIPE_FORMAT_S8_USCALED_Z24_UNORM:
+ case PIPE_FORMAT_S8_UINT_Z24_UNORM:
case PIPE_FORMAT_X8Z24_UNORM:
case PIPE_FORMAT_Z16_UNORM:
break;
case PIPE_FORMAT_Z16_UNORM:
rt_format |= NV30_3D_RT_FORMAT_ZETA_Z16;
break;
- case PIPE_FORMAT_S8_USCALED_Z24_UNORM:
+ case PIPE_FORMAT_S8_UINT_Z24_UNORM:
case PIPE_FORMAT_X8Z24_UNORM:
case 0:
rt_format |= NV30_3D_RT_FORMAT_ZETA_Z24S8;
case PIPE_FORMAT_X8Z24_UNORM:
return util_pack_z(format, depth);
- case PIPE_FORMAT_S8_USCALED_Z24_UNORM:
+ case PIPE_FORMAT_S8_UINT_Z24_UNORM:
return util_pack_z_stencil(format, depth, stencil);
default:
case PIPE_FORMAT_Z16_UNORM:
return util_pack_z(PIPE_FORMAT_Z16_UNORM, border[0]);
case PIPE_FORMAT_X8Z24_UNORM:
- case PIPE_FORMAT_S8_USCALED_Z24_UNORM:
+ case PIPE_FORMAT_S8_UINT_Z24_UNORM:
if (is_r500) {
return util_pack_z(PIPE_FORMAT_X8Z24_UNORM, border[0]);
} else {
case PIPE_FORMAT_Z16_UNORM:
return R300_TX_FORMAT_X16;
case PIPE_FORMAT_X8Z24_UNORM:
- case PIPE_FORMAT_S8_USCALED_Z24_UNORM:
+ case PIPE_FORMAT_S8_UINT_Z24_UNORM:
if (is_r500)
return R500_TX_FORMAT_Y8X24;
else
case PIPE_FORMAT_LATC1_UNORM:
case PIPE_FORMAT_LATC1_SNORM:
case PIPE_FORMAT_X8Z24_UNORM:
- case PIPE_FORMAT_S8_USCALED_Z24_UNORM:
+ case PIPE_FORMAT_S8_UINT_Z24_UNORM:
return R500_TXFORMAT_MSB;
default:
return 0;
/* 24-bit depth, ignored stencil */
case PIPE_FORMAT_X8Z24_UNORM:
/* 24-bit depth, 8-bit stencil */
- case PIPE_FORMAT_S8_USCALED_Z24_UNORM:
+ case PIPE_FORMAT_S8_UINT_Z24_UNORM:
return R300_DEPTHFORMAT_24BIT_INT_Z_8BIT_STENCIL;
default:
return ~0; /* Unsupported. */
case PIPE_FORMAT_Z16_UNORM:
return V_028040_Z_16;
case PIPE_FORMAT_Z24X8_UNORM:
- case PIPE_FORMAT_Z24_UNORM_S8_USCALED:
+ case PIPE_FORMAT_Z24_UNORM_S8_UINT:
return V_028040_Z_24;
case PIPE_FORMAT_Z32_FLOAT:
- case PIPE_FORMAT_Z32_FLOAT_S8X24_USCALED:
+ case PIPE_FORMAT_Z32_FLOAT_S8X24_UINT:
return V_028040_Z_32_FLOAT;
default:
return ~0U;
return V_028C70_SWAP_STD_REV;
case PIPE_FORMAT_Z24X8_UNORM:
- case PIPE_FORMAT_Z24_UNORM_S8_USCALED:
+ case PIPE_FORMAT_Z24_UNORM_S8_UINT:
return V_028C70_SWAP_STD;
case PIPE_FORMAT_X8Z24_UNORM:
- case PIPE_FORMAT_S8_USCALED_Z24_UNORM:
+ case PIPE_FORMAT_S8_UINT_Z24_UNORM:
return V_028C70_SWAP_STD;
case PIPE_FORMAT_R10G10B10A2_UNORM:
case PIPE_FORMAT_R16G16B16A16_UINT:
case PIPE_FORMAT_R16G16B16A16_SINT:
case PIPE_FORMAT_R16G16B16A16_FLOAT:
- case PIPE_FORMAT_Z32_FLOAT_S8X24_USCALED:
+ case PIPE_FORMAT_Z32_FLOAT_S8X24_UINT:
/* 128-bit buffers. */
case PIPE_FORMAT_R32G32B32A32_FLOAT:
return V_028C70_COLOR_2_10_10_10;
case PIPE_FORMAT_Z24X8_UNORM:
- case PIPE_FORMAT_Z24_UNORM_S8_USCALED:
+ case PIPE_FORMAT_Z24_UNORM_S8_UINT:
return V_028C70_COLOR_8_24;
case PIPE_FORMAT_X8Z24_UNORM:
- case PIPE_FORMAT_S8_USCALED_Z24_UNORM:
+ case PIPE_FORMAT_S8_UINT_Z24_UNORM:
return V_028C70_COLOR_24_8;
- case PIPE_FORMAT_Z32_FLOAT_S8X24_USCALED:
+ case PIPE_FORMAT_Z32_FLOAT_S8X24_UINT:
return V_028C70_COLOR_X24_8_32_FLOAT;
case PIPE_FORMAT_R32_FLOAT:
switch (rctx->framebuffer.zsbuf->texture->format) {
case PIPE_FORMAT_Z24X8_UNORM:
- case PIPE_FORMAT_Z24_UNORM_S8_USCALED:
+ case PIPE_FORMAT_Z24_UNORM_S8_UINT:
depth = -24;
offset_units *= 2.0f;
break;
case PIPE_FORMAT_Z32_FLOAT:
- case PIPE_FORMAT_Z32_FLOAT_S8X24_USCALED:
+ case PIPE_FORMAT_Z32_FLOAT_S8X24_UINT:
depth = -23;
offset_units *= 1.0f;
offset_db_fmt_cntl |= S_028B78_POLY_OFFSET_DB_IS_FLOAT_FMT(1);
return V_028010_DEPTH_16;
case PIPE_FORMAT_Z24X8_UNORM:
return V_028010_DEPTH_X8_24;
- case PIPE_FORMAT_Z24_UNORM_S8_USCALED:
+ case PIPE_FORMAT_Z24_UNORM_S8_UINT:
return V_028010_DEPTH_8_24;
case PIPE_FORMAT_Z32_FLOAT:
return V_028010_DEPTH_32_FLOAT;
- case PIPE_FORMAT_Z32_FLOAT_S8X24_USCALED:
+ case PIPE_FORMAT_Z32_FLOAT_S8X24_UINT:
return V_028010_DEPTH_X24_8_32_FLOAT;
default:
return ~0U;
return V_0280A0_SWAP_STD_REV;
case PIPE_FORMAT_Z24X8_UNORM:
- case PIPE_FORMAT_Z24_UNORM_S8_USCALED:
+ case PIPE_FORMAT_Z24_UNORM_S8_UINT:
return V_0280A0_SWAP_STD;
case PIPE_FORMAT_X8Z24_UNORM:
- case PIPE_FORMAT_S8_USCALED_Z24_UNORM:
+ case PIPE_FORMAT_S8_UINT_Z24_UNORM:
return V_0280A0_SWAP_STD;
case PIPE_FORMAT_R10G10B10A2_UNORM:
case PIPE_FORMAT_R16G16B16A16_UINT:
case PIPE_FORMAT_R16G16B16A16_SINT:
case PIPE_FORMAT_R16G16B16A16_FLOAT:
- case PIPE_FORMAT_Z32_FLOAT_S8X24_USCALED:
+ case PIPE_FORMAT_Z32_FLOAT_S8X24_UINT:
/* 128-bit buffers. */
case PIPE_FORMAT_R32G32B32A32_FLOAT:
return V_0280A0_COLOR_2_10_10_10;
case PIPE_FORMAT_Z24X8_UNORM:
- case PIPE_FORMAT_Z24_UNORM_S8_USCALED:
+ case PIPE_FORMAT_Z24_UNORM_S8_UINT:
return V_0280A0_COLOR_8_24;
case PIPE_FORMAT_X8Z24_UNORM:
- case PIPE_FORMAT_S8_USCALED_Z24_UNORM:
+ case PIPE_FORMAT_S8_UINT_Z24_UNORM:
return V_0280A0_COLOR_24_8;
- case PIPE_FORMAT_Z32_FLOAT_S8X24_USCALED:
+ case PIPE_FORMAT_Z32_FLOAT_S8X24_UINT:
return V_0280A0_COLOR_X24_8_32_FLOAT;
case PIPE_FORMAT_R32_FLOAT:
switch (rctx->framebuffer.zsbuf->texture->format) {
case PIPE_FORMAT_Z24X8_UNORM:
- case PIPE_FORMAT_Z24_UNORM_S8_USCALED:
+ case PIPE_FORMAT_Z24_UNORM_S8_UINT:
depth = -24;
offset_units *= 2.0f;
break;
case PIPE_FORMAT_Z32_FLOAT:
- case PIPE_FORMAT_Z32_FLOAT_S8X24_USCALED:
+ case PIPE_FORMAT_Z32_FLOAT_S8X24_UINT:
depth = -23;
offset_units *= 1.0f;
offset_db_fmt_cntl |= S_028DF8_POLY_OFFSET_DB_IS_FLOAT_FMT(1);
unsigned stencil_pitch_override = 0;
switch (base->format) {
- case PIPE_FORMAT_Z24_UNORM_S8_USCALED:
+ case PIPE_FORMAT_Z24_UNORM_S8_UINT:
rtex->real_format = PIPE_FORMAT_Z24X8_UNORM;
break;
- case PIPE_FORMAT_S8_USCALED_Z24_UNORM:
+ case PIPE_FORMAT_S8_UINT_Z24_UNORM:
rtex->real_format = PIPE_FORMAT_X8Z24_UNORM;
break;
- case PIPE_FORMAT_Z32_FLOAT_S8X24_USCALED:
+ case PIPE_FORMAT_Z32_FLOAT_S8X24_UINT:
rtex->real_format = PIPE_FORMAT_Z32_FLOAT;
break;
default:
/* Divide the pitch in bytes by 4 for stencil, because it has a smaller pixel size. */
if (pitch_in_bytes_override) {
- assert(base->format == PIPE_FORMAT_Z24_UNORM_S8_USCALED ||
- base->format == PIPE_FORMAT_S8_USCALED_Z24_UNORM);
+ assert(base->format == PIPE_FORMAT_Z24_UNORM_S8_UINT ||
+ base->format == PIPE_FORMAT_S8_UINT_Z24_UNORM);
stencil_pitch_override = pitch_in_bytes_override / 4;
}
/* Allocate the stencil buffer. */
stencil = *base;
- stencil.format = PIPE_FORMAT_S8_USCALED;
+ stencil.format = PIPE_FORMAT_S8_UINT;
rtex->stencil = r600_texture_create_object(screen, &stencil, array_mode,
stencil_pitch_override,
max_buffer_size, NULL, FALSE);
case PIPE_FORMAT_Z16_UNORM:
result = FMT_16;
goto out_word4;
- case PIPE_FORMAT_X24S8_USCALED:
+ case PIPE_FORMAT_X24S8_UINT:
word4 |= S_038010_NUM_FORMAT_ALL(V_038010_SQ_NUM_FORMAT_INT);
case PIPE_FORMAT_Z24X8_UNORM:
- case PIPE_FORMAT_Z24_UNORM_S8_USCALED:
+ case PIPE_FORMAT_Z24_UNORM_S8_UINT:
result = FMT_8_24;
goto out_word4;
- case PIPE_FORMAT_S8X24_USCALED:
+ case PIPE_FORMAT_S8X24_UINT:
word4 |= S_038010_NUM_FORMAT_ALL(V_038010_SQ_NUM_FORMAT_INT);
case PIPE_FORMAT_X8Z24_UNORM:
- case PIPE_FORMAT_S8_USCALED_Z24_UNORM:
+ case PIPE_FORMAT_S8_UINT_Z24_UNORM:
result = FMT_24_8;
goto out_word4;
- case PIPE_FORMAT_S8_USCALED:
+ case PIPE_FORMAT_S8_UINT:
result = FMT_8;
word4 |= S_038010_NUM_FORMAT_ALL(V_038010_SQ_NUM_FORMAT_INT);
goto out_word4;
case PIPE_FORMAT_Z32_FLOAT:
result = FMT_32_FLOAT;
goto out_word4;
- case PIPE_FORMAT_Z32_FLOAT_S8X24_USCALED:
+ case PIPE_FORMAT_Z32_FLOAT_S8X24_UINT:
result = FMT_X24_8_32_FLOAT;
goto out_word4;
default:
}
break;
case PIPE_FORMAT_Z24X8_UNORM:
- case PIPE_FORMAT_Z24_UNORM_S8_USCALED:
+ case PIPE_FORMAT_Z24_UNORM_S8_UINT:
for (j = 0; j < QUAD_SIZE; j++) {
int x = quad->input.x0 % TILE_SIZE + (j & 1);
int y = quad->input.y0 % TILE_SIZE + (j >> 1);
}
break;
case PIPE_FORMAT_X8Z24_UNORM:
- case PIPE_FORMAT_S8_USCALED_Z24_UNORM:
+ case PIPE_FORMAT_S8_UINT_Z24_UNORM:
for (j = 0; j < QUAD_SIZE; j++) {
int x = quad->input.x0 % TILE_SIZE + (j & 1);
int y = quad->input.y0 % TILE_SIZE + (j >> 1);
data->stencilVals[j] = tile->data.depth32[y][x] & 0xff;
}
break;
- case PIPE_FORMAT_S8_USCALED:
+ case PIPE_FORMAT_S8_UINT:
for (j = 0; j < QUAD_SIZE; j++) {
int x = quad->input.x0 % TILE_SIZE + (j & 1);
int y = quad->input.y0 % TILE_SIZE + (j >> 1);
}
break;
case PIPE_FORMAT_Z24X8_UNORM:
- case PIPE_FORMAT_Z24_UNORM_S8_USCALED:
+ case PIPE_FORMAT_Z24_UNORM_S8_UINT:
{
float scale = (float) ((1 << 24) - 1);
}
break;
case PIPE_FORMAT_X8Z24_UNORM:
- case PIPE_FORMAT_S8_USCALED_Z24_UNORM:
+ case PIPE_FORMAT_S8_UINT_Z24_UNORM:
{
float scale = (float) ((1 << 24) - 1);
*/
switch (data->format) {
case PIPE_FORMAT_Z24X8_UNORM:
- case PIPE_FORMAT_Z24_UNORM_S8_USCALED:
+ case PIPE_FORMAT_Z24_UNORM_S8_UINT:
case PIPE_FORMAT_X8Z24_UNORM:
- case PIPE_FORMAT_S8_USCALED_Z24_UNORM:
- case PIPE_FORMAT_S8_USCALED:
+ case PIPE_FORMAT_S8_UINT_Z24_UNORM:
+ case PIPE_FORMAT_S8_UINT:
for (j = 0; j < QUAD_SIZE; j++) {
data->shader_stencil_refs[j] = ((unsigned)(quad->output.stencil[j]));
}
tile->data.depth32[y][x] = data->bzzzz[j];
}
break;
- case PIPE_FORMAT_Z24_UNORM_S8_USCALED:
+ case PIPE_FORMAT_Z24_UNORM_S8_UINT:
for (j = 0; j < QUAD_SIZE; j++) {
int x = quad->input.x0 % TILE_SIZE + (j & 1);
int y = quad->input.y0 % TILE_SIZE + (j >> 1);
tile->data.depth32[y][x] = (data->stencilVals[j] << 24) | data->bzzzz[j];
}
break;
- case PIPE_FORMAT_S8_USCALED_Z24_UNORM:
+ case PIPE_FORMAT_S8_UINT_Z24_UNORM:
for (j = 0; j < QUAD_SIZE; j++) {
int x = quad->input.x0 % TILE_SIZE + (j & 1);
int y = quad->input.y0 % TILE_SIZE + (j >> 1);
tile->data.depth32[y][x] = data->bzzzz[j] << 8;
}
break;
- case PIPE_FORMAT_S8_USCALED:
+ case PIPE_FORMAT_S8_UINT:
for (j = 0; j < QUAD_SIZE; j++) {
int x = quad->input.x0 % TILE_SIZE + (j & 1);
int y = quad->input.y0 % TILE_SIZE + (j >> 1);
case PIPE_FORMAT_Z16_UNORM:
return bind & PIPE_BIND_SAMPLER_VIEW ? ss->depth.z16 : SVGA3D_Z_D16;
- case PIPE_FORMAT_S8_USCALED_Z24_UNORM:
+ case PIPE_FORMAT_S8_UINT_Z24_UNORM:
return bind & PIPE_BIND_SAMPLER_VIEW ? ss->depth.s8z24 : SVGA3D_Z_D24S8;
case PIPE_FORMAT_X8Z24_UNORM:
return bind & PIPE_BIND_SAMPLER_VIEW ? ss->depth.x8z24 : SVGA3D_Z_D24X8;
if (buffers & PIPE_CLEAR_DEPTH)
flags |= SVGA3D_CLEAR_DEPTH;
- if ((svga->curr.framebuffer.zsbuf->format == PIPE_FORMAT_S8_USCALED_Z24_UNORM) &&
+ if ((svga->curr.framebuffer.zsbuf->format == PIPE_FORMAT_S8_UINT_Z24_UNORM) &&
(buffers & PIPE_CLEAR_STENCIL))
flags |= SVGA3D_CLEAR_STENCIL;
case PIPE_FORMAT_Z16_UNORM:
svga->curr.depthscale = 1.0f / DEPTH_BIAS_SCALE_FACTOR_D16;
break;
- case PIPE_FORMAT_Z24_UNORM_S8_USCALED:
+ case PIPE_FORMAT_Z24_UNORM_S8_UINT:
case PIPE_FORMAT_Z24X8_UNORM:
- case PIPE_FORMAT_S8_USCALED_Z24_UNORM:
+ case PIPE_FORMAT_S8_UINT_Z24_UNORM:
case PIPE_FORMAT_X8Z24_UNORM:
svga->curr.depthscale = 1.0f / DEPTH_BIAS_SCALE_FACTOR_D24S8;
break;
return ret;
if (curr->zsbuf &&
- curr->zsbuf->format == PIPE_FORMAT_S8_USCALED_Z24_UNORM) {
+ curr->zsbuf->format == PIPE_FORMAT_S8_UINT_Z24_UNORM) {
ret = SVGA3D_SetRenderTarget(svga->swc, SVGA3D_RT_STENCIL, curr->zsbuf);
if (ret != PIPE_OK)
return ret;
}
if (hw->zsbuf &&
- hw->zsbuf->format == PIPE_FORMAT_S8_USCALED_Z24_UNORM) {
+ hw->zsbuf->format == PIPE_FORMAT_S8_UINT_Z24_UNORM) {
ret = SVGA3D_SetRenderTarget(svga->swc, SVGA3D_RT_STENCIL, hw->zsbuf);
if (ret != PIPE_OK) {
return ret;
PIPE_FORMAT_Z16_UNORM = 16,
PIPE_FORMAT_Z32_UNORM = 17,
PIPE_FORMAT_Z32_FLOAT = 18,
- PIPE_FORMAT_Z24_UNORM_S8_USCALED = 19,
- PIPE_FORMAT_S8_USCALED_Z24_UNORM = 20,
+ PIPE_FORMAT_Z24_UNORM_S8_UINT = 19,
+ PIPE_FORMAT_S8_UINT_Z24_UNORM = 20,
PIPE_FORMAT_Z24X8_UNORM = 21,
PIPE_FORMAT_X8Z24_UNORM = 22,
- PIPE_FORMAT_S8_USCALED = 23, /**< ubyte stencil */
+ PIPE_FORMAT_S8_UINT = 23, /**< ubyte stencil */
PIPE_FORMAT_R64_FLOAT = 24,
PIPE_FORMAT_R64G64_FLOAT = 25,
PIPE_FORMAT_R64G64B64_FLOAT = 26,
PIPE_FORMAT_R10G10B10A2_USCALED = 123,
PIPE_FORMAT_R11G11B10_FLOAT = 124,
PIPE_FORMAT_R9G9B9E5_FLOAT = 125,
- PIPE_FORMAT_Z32_FLOAT_S8X24_USCALED = 126,
+ PIPE_FORMAT_Z32_FLOAT_S8X24_UINT = 126,
PIPE_FORMAT_R1_UNORM = 127,
PIPE_FORMAT_R10G10B10X2_USCALED = 128,
PIPE_FORMAT_R10G10B10X2_SNORM = 129,
PIPE_FORMAT_B4G4R4X4_UNORM = 135,
/* some stencil samplers formats */
- PIPE_FORMAT_X24S8_USCALED = 136,
- PIPE_FORMAT_S8X24_USCALED = 137,
- PIPE_FORMAT_X32_S8X24_USCALED = 138,
+ PIPE_FORMAT_X24S8_UINT = 136,
+ PIPE_FORMAT_S8X24_UINT = 137,
+ PIPE_FORMAT_X32_S8X24_UINT = 138,
PIPE_FORMAT_B2G3R3_UNORM = 139,
PIPE_FORMAT_L16A16_UNORM = 140,
PIPE_FORMAT_R32G32_FLOAT,
PIPE_FORMAT_R32G32_USCALED,
PIPE_FORMAT_R32G32_SSCALED,
- PIPE_FORMAT_Z32_FLOAT_S8X24_USCALED, /* PIPE_FORMAT_R32G8X24_FLOAT_TYPELESS */
- PIPE_FORMAT_Z32_FLOAT_S8X24_USCALED,
- PIPE_FORMAT_Z32_FLOAT_S8X24_USCALED, /* PIPE_FORMAT_R32_FLOAT_X8X24_TYPELESS */
- PIPE_FORMAT_Z32_FLOAT_S8X24_USCALED, /* PIPE_FORMAT_X32_TYPELESS_G8X24_USCALED */
+ PIPE_FORMAT_Z32_FLOAT_S8X24_UINT, /* PIPE_FORMAT_R32G8X24_FLOAT_TYPELESS */
+ PIPE_FORMAT_Z32_FLOAT_S8X24_UINT,
+ PIPE_FORMAT_Z32_FLOAT_S8X24_UINT, /* PIPE_FORMAT_R32_FLOAT_X8X24_TYPELESS */
+ PIPE_FORMAT_Z32_FLOAT_S8X24_UINT, /* PIPE_FORMAT_X32_TYPELESS_G8X24_UINT */
PIPE_FORMAT_R10G10B10A2_UNORM, /* TYPELESS */
PIPE_FORMAT_R10G10B10A2_UNORM,
PIPE_FORMAT_R10G10B10A2_USCALED,
PIPE_FORMAT_R32_FLOAT,
PIPE_FORMAT_R32_USCALED,
PIPE_FORMAT_R32_SSCALED,
- PIPE_FORMAT_Z24_UNORM_S8_USCALED, /* PIPE_FORMAT_R24G8_TYPELESS */
- PIPE_FORMAT_Z24_UNORM_S8_USCALED,
+ PIPE_FORMAT_Z24_UNORM_S8_UINT, /* PIPE_FORMAT_R24G8_TYPELESS */
+ PIPE_FORMAT_Z24_UNORM_S8_UINT,
PIPE_FORMAT_Z24X8_UNORM, /* PIPE_FORMAT_R24_UNORM_X8_TYPELESS */
- PIPE_FORMAT_Z24_UNORM_S8_USCALED, /* PIPE_FORMAT_X24_TYPELESS_G8_USCALED */
+ PIPE_FORMAT_Z24_UNORM_S8_UINT, /* PIPE_FORMAT_X24_TYPELESS_G8_UINT */
PIPE_FORMAT_R8G8_UNORM, /* TYPELESS */
PIPE_FORMAT_R8G8_UNORM,
PIPE_FORMAT_R8G8_USCALED,
pf_z24x8 = p_screen->is_format_supported(p_screen, PIPE_FORMAT_X8Z24_UNORM,
PIPE_TEXTURE_2D, 0,
PIPE_BIND_DEPTH_STENCIL);
- pf_s8z24 = p_screen->is_format_supported(p_screen, PIPE_FORMAT_Z24_UNORM_S8_USCALED,
+ pf_s8z24 = p_screen->is_format_supported(p_screen, PIPE_FORMAT_Z24_UNORM_S8_UINT,
PIPE_TEXTURE_2D, 0,
PIPE_BIND_DEPTH_STENCIL);
- pf_z24s8 = p_screen->is_format_supported(p_screen, PIPE_FORMAT_S8_USCALED_Z24_UNORM,
+ pf_z24s8 = p_screen->is_format_supported(p_screen, PIPE_FORMAT_S8_UINT_Z24_UNORM,
PIPE_TEXTURE_2D, 0,
PIPE_BIND_DEPTH_STENCIL);
pf_a8r8g8b8 = p_screen->is_format_supported(p_screen, PIPE_FORMAT_B8G8R8A8_UNORM,
PIPE_FORMAT_X8Z24_UNORM;
} else {
stvis->depth_stencil_format = (screen->sd_depth_bits_last) ?
- PIPE_FORMAT_Z24_UNORM_S8_USCALED:
- PIPE_FORMAT_S8_USCALED_Z24_UNORM;
+ PIPE_FORMAT_Z24_UNORM_S8_UINT:
+ PIPE_FORMAT_S8_UINT_Z24_UNORM;
}
break;
case 32:
const EGLint candidates[] = {
1, PIPE_FORMAT_Z16_UNORM,
1, PIPE_FORMAT_Z32_UNORM,
- 2, PIPE_FORMAT_Z24_UNORM_S8_USCALED, PIPE_FORMAT_S8_USCALED_Z24_UNORM,
+ 2, PIPE_FORMAT_Z24_UNORM_S8_UINT, PIPE_FORMAT_S8_UINT_Z24_UNORM,
2, PIPE_FORMAT_Z24X8_UNORM, PIPE_FORMAT_X8Z24_UNORM,
0
};
formats[count++] = PIPE_FORMAT_Z24X8_UNORM;
}
if (depth <= 24 && stencil <= 8) {
- formats[count++] = PIPE_FORMAT_S8_USCALED_Z24_UNORM;
- formats[count++] = PIPE_FORMAT_Z24_UNORM_S8_USCALED;
+ formats[count++] = PIPE_FORMAT_S8_UINT_Z24_UNORM;
+ formats[count++] = PIPE_FORMAT_Z24_UNORM_S8_UINT;
}
if (depth <= 32 && stencil == 0) {
formats[count++] = PIPE_FORMAT_Z32_UNORM;
{
struct pipe_screen *screen = ctx->pipe->screen;
enum pipe_format formats[] = {
- PIPE_FORMAT_Z24_UNORM_S8_USCALED,
- PIPE_FORMAT_S8_USCALED_Z24_UNORM,
+ PIPE_FORMAT_Z24_UNORM_S8_UINT,
+ PIPE_FORMAT_S8_UINT_Z24_UNORM,
PIPE_FORMAT_NONE
};
enum pipe_format *fmt;
{ PIPE_FORMAT_Z24X8_UNORM, {24, 0} },
{ PIPE_FORMAT_Z16_UNORM, {16, 0} },
/* combined depth-stencil */
- { PIPE_FORMAT_Z24_UNORM_S8_USCALED, {24, 8} },
- { PIPE_FORMAT_S8_USCALED_Z24_UNORM, {24, 8} }
+ { PIPE_FORMAT_Z24_UNORM_S8_UINT, {24, 8} },
+ { PIPE_FORMAT_S8_UINT_Z24_UNORM, {24, 8} }
};
fdesc.format = PIPE_FORMAT_X8Z24_UNORM;
break;
case xa_format_s8z24:
- fdesc.format = PIPE_FORMAT_Z24_UNORM_S8_USCALED;
+ fdesc.format = PIPE_FORMAT_Z24_UNORM_S8_UINT;
break;
case xa_format_z24s8:
- fdesc.format = PIPE_FORMAT_S8_USCALED_Z24_UNORM;
+ fdesc.format = PIPE_FORMAT_S8_UINT_Z24_UNORM;
break;
case xa_format_yuv8:
fdesc.format = PIPE_FORMAT_L8_UNORM;
}
} else {
template.format = ms->ds_depth_bits_last ?
- PIPE_FORMAT_Z24_UNORM_S8_USCALED : PIPE_FORMAT_S8_USCALED_Z24_UNORM;
+ PIPE_FORMAT_Z24_UNORM_S8_UINT : PIPE_FORMAT_S8_UINT_Z24_UNORM;
}
template.width0 = pDraw->width;
template.height0 = pDraw->height;
0,
PIPE_BIND_DEPTH_STENCIL);
ms->ds_depth_bits_last =
- ms->screen->is_format_supported(ms->screen, PIPE_FORMAT_Z24_UNORM_S8_USCALED,
+ ms->screen->is_format_supported(ms->screen, PIPE_FORMAT_Z24_UNORM_S8_UINT,
PIPE_TEXTURE_2D,
0,
PIPE_BIND_DEPTH_STENCIL);
static void
-print_unpacked_s_8uscaled(const struct util_format_description *format_desc,
- const char *prefix,
- uint8_t unpacked[UTIL_FORMAT_MAX_UNPACKED_HEIGHT][UTIL_FORMAT_MAX_UNPACKED_WIDTH],
- const char *suffix)
+print_unpacked_s_8uint(const struct util_format_description *format_desc,
+ const char *prefix,
+ uint8_t unpacked[UTIL_FORMAT_MAX_UNPACKED_HEIGHT][UTIL_FORMAT_MAX_UNPACKED_WIDTH],
+ const char *suffix)
{
unsigned i, j;
const char *sep = "";
static boolean
-test_format_unpack_s_8uscaled(const struct util_format_description *format_desc,
+test_format_unpack_s_8uint(const struct util_format_description *format_desc,
const struct util_format_test_case *test)
{
uint8_t unpacked[UTIL_FORMAT_MAX_UNPACKED_HEIGHT][UTIL_FORMAT_MAX_UNPACKED_WIDTH] = { { 0 } };
unsigned i, j;
boolean success;
- format_desc->unpack_s_8uscaled(&unpacked[0][0], sizeof unpacked[0],
+ format_desc->unpack_s_8uint(&unpacked[0][0], sizeof unpacked[0],
test->packed, 0,
format_desc->block.width, format_desc->block.height);
}
if (!success) {
- print_unpacked_s_8uscaled(format_desc, "FAILED: ", unpacked, " obtained\n");
- print_unpacked_s_8uscaled(format_desc, " ", expected, " expected\n");
+ print_unpacked_s_8uint(format_desc, "FAILED: ", unpacked, " obtained\n");
+ print_unpacked_s_8uint(format_desc, " ", expected, " expected\n");
}
return success;
static boolean
-test_format_pack_s_8uscaled(const struct util_format_description *format_desc,
+test_format_pack_s_8uint(const struct util_format_description *format_desc,
const struct util_format_test_case *test)
{
uint8_t unpacked[UTIL_FORMAT_MAX_UNPACKED_HEIGHT][UTIL_FORMAT_MAX_UNPACKED_WIDTH];
memset(packed, 0, sizeof packed);
- format_desc->pack_s_8uscaled(packed, 0,
+ format_desc->pack_s_8uint(packed, 0,
&unpacked[0][0], sizeof unpacked[0],
format_desc->block.width, format_desc->block.height);
TEST_ONE_FUNC(pack_z_32unorm);
TEST_ONE_FUNC(unpack_z_float);
TEST_ONE_FUNC(pack_z_float);
- TEST_ONE_FUNC(unpack_s_8uscaled);
- TEST_ONE_FUNC(pack_s_8uscaled);
+ TEST_ONE_FUNC(unpack_s_8uint);
+ TEST_ONE_FUNC(pack_s_8uint);
# undef TEST_ONE_FUNC
}
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,
/* 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;
}
}
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;
}
}
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;
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);
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;
}
}
break;
- case PIPE_FORMAT_S8_USCALED_Z24_UNORM:
+ case PIPE_FORMAT_S8_UINT_Z24_UNORM:
{
uint *dst4 = (uint *) dst;
int j;
}
}
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;
base_format = GL_DEPTH_STENCIL;
}
else {
- if (format == PIPE_FORMAT_S8_USCALED)
+ if (format == PIPE_FORMAT_S8_UINT)
base_format = GL_STENCIL_INDEX;
else
base_format = GL_DEPTH_COMPONENT;
case PIPE_FORMAT_Z32_UNORM:
strb->Base.InternalFormat = GL_DEPTH_COMPONENT32;
break;
- case PIPE_FORMAT_Z24_UNORM_S8_USCALED:
- case PIPE_FORMAT_S8_USCALED_Z24_UNORM:
+ case PIPE_FORMAT_Z24_UNORM_S8_UINT:
+ case PIPE_FORMAT_S8_UINT_Z24_UNORM:
case PIPE_FORMAT_Z24X8_UNORM:
case PIPE_FORMAT_X8Z24_UNORM:
strb->Base.InternalFormat = GL_DEPTH24_STENCIL8_EXT;
break;
- case PIPE_FORMAT_S8_USCALED:
+ case PIPE_FORMAT_S8_UINT:
strb->Base.InternalFormat = GL_STENCIL_INDEX8_EXT;
break;
case PIPE_FORMAT_R16G16B16A16_SNORM:
/* get stencil (and Z) values */
switch (pt->resource->format) {
- case PIPE_FORMAT_S8_USCALED:
+ case PIPE_FORMAT_S8_UINT:
{
const ubyte *src = stmap + srcY * pt->stride;
memcpy(sValues, src, width);
}
break;
- case PIPE_FORMAT_Z24_UNORM_S8_USCALED:
+ case PIPE_FORMAT_Z24_UNORM_S8_UINT:
if (format == GL_DEPTH_STENCIL) {
const uint *src = (uint *) (stmap + srcY * pt->stride);
const GLfloat scale = 1.0f / (0xffffff);
}
}
break;
- case PIPE_FORMAT_S8_USCALED_Z24_UNORM:
+ case PIPE_FORMAT_S8_UINT_Z24_UNORM:
if (format == GL_DEPTH_STENCIL) {
const uint *src = (uint *) (stmap + srcY * pt->stride);
const GLfloat scale = 1.0f / (0xffffff);
}
}
break;
- case PIPE_FORMAT_Z32_FLOAT_S8X24_USCALED:
+ case PIPE_FORMAT_Z32_FLOAT_S8X24_UINT:
if (format == GL_DEPTH_STENCIL) {
const uint *src = (uint *) (stmap + srcY * pt->stride);
const GLfloat *srcf = (const GLfloat*)src;
const GLint dstStride = _mesa_image_row_stride(&clippedPacking, width,
format, type);
- if (pformat == PIPE_FORMAT_Z24_UNORM_S8_USCALED ||
+ if (pformat == PIPE_FORMAT_Z24_UNORM_S8_UINT ||
pformat == PIPE_FORMAT_Z24X8_UNORM) {
if (format == GL_DEPTH_COMPONENT) {
for (i = 0; i < height; i++) {
}
}
}
- else if (pformat == PIPE_FORMAT_S8_USCALED_Z24_UNORM ||
+ else if (pformat == PIPE_FORMAT_S8_UINT_Z24_UNORM ||
pformat == PIPE_FORMAT_X8Z24_UNORM) {
if (format == GL_DEPTH_COMPONENT) {
for (i = 0; i < height; i++) {
dst += dstStride;
}
}
- else if (pformat == PIPE_FORMAT_Z32_FLOAT_S8X24_USCALED) {
+ else if (pformat == PIPE_FORMAT_Z32_FLOAT_S8X24_UINT) {
assert(format == GL_DEPTH_COMPONENT);
for (i = 0; i < height; i++) {
GLfloat zfloat[MAX_WIDTH]; /* Z32 */
/* GL_EXT_packed_depth_stencil requires both the ability to render to
* a depth/stencil buffer and texture from depth/stencil source.
*/
- if (screen->is_format_supported(screen, PIPE_FORMAT_S8_USCALED_Z24_UNORM,
+ if (screen->is_format_supported(screen, PIPE_FORMAT_S8_UINT_Z24_UNORM,
PIPE_TEXTURE_2D, 0,
PIPE_BIND_DEPTH_STENCIL) &&
- screen->is_format_supported(screen, PIPE_FORMAT_S8_USCALED_Z24_UNORM,
+ screen->is_format_supported(screen, PIPE_FORMAT_S8_UINT_Z24_UNORM,
PIPE_TEXTURE_2D, 0,
PIPE_BIND_SAMPLER_VIEW)) {
ctx->Extensions.EXT_packed_depth_stencil = GL_TRUE;
}
- else if (screen->is_format_supported(screen, PIPE_FORMAT_Z24_UNORM_S8_USCALED,
+ else if (screen->is_format_supported(screen, PIPE_FORMAT_Z24_UNORM_S8_UINT,
PIPE_TEXTURE_2D, 0,
PIPE_BIND_DEPTH_STENCIL) &&
- screen->is_format_supported(screen, PIPE_FORMAT_Z24_UNORM_S8_USCALED,
+ screen->is_format_supported(screen, PIPE_FORMAT_Z24_UNORM_S8_UINT,
PIPE_TEXTURE_2D, 0,
PIPE_BIND_SAMPLER_VIEW)) {
ctx->Extensions.EXT_packed_depth_stencil = GL_TRUE;
PIPE_TEXTURE_2D, 0,
PIPE_BIND_DEPTH_STENCIL |
PIPE_BIND_SAMPLER_VIEW) &&
- screen->is_format_supported(screen, PIPE_FORMAT_Z32_FLOAT_S8X24_USCALED,
+ screen->is_format_supported(screen, PIPE_FORMAT_Z32_FLOAT_S8X24_UINT,
PIPE_TEXTURE_2D, 0,
PIPE_BIND_DEPTH_STENCIL |
PIPE_BIND_SAMPLER_VIEW)) {
format == PIPE_FORMAT_R9G9B9E5_FLOAT) {
return GL_FLOAT;
}
- else if (format == PIPE_FORMAT_Z24_UNORM_S8_USCALED ||
- format == PIPE_FORMAT_S8_USCALED_Z24_UNORM ||
+ else if (format == PIPE_FORMAT_Z24_UNORM_S8_UINT ||
+ format == PIPE_FORMAT_S8_UINT_Z24_UNORM ||
format == PIPE_FORMAT_Z24X8_UNORM ||
format == PIPE_FORMAT_X8Z24_UNORM) {
return GL_UNSIGNED_INT_24_8;
}
- else if (format == PIPE_FORMAT_Z32_FLOAT_S8X24_USCALED) {
+ else if (format == PIPE_FORMAT_Z32_FLOAT_S8X24_UINT) {
return GL_FLOAT_32_UNSIGNED_INT_24_8_REV;
}
else {
case MESA_FORMAT_Z32:
return PIPE_FORMAT_Z32_UNORM;
case MESA_FORMAT_Z24_S8:
- return PIPE_FORMAT_S8_USCALED_Z24_UNORM;
+ return PIPE_FORMAT_S8_UINT_Z24_UNORM;
case MESA_FORMAT_S8_Z24:
- return PIPE_FORMAT_Z24_UNORM_S8_USCALED;
+ return PIPE_FORMAT_Z24_UNORM_S8_UINT;
case MESA_FORMAT_Z24_X8:
return PIPE_FORMAT_X8Z24_UNORM;
case MESA_FORMAT_X8_Z24:
return PIPE_FORMAT_Z24X8_UNORM;
case MESA_FORMAT_S8:
- return PIPE_FORMAT_S8_USCALED;
+ return PIPE_FORMAT_S8_UINT;
case MESA_FORMAT_Z32_FLOAT:
return PIPE_FORMAT_Z32_FLOAT;
case MESA_FORMAT_Z32_FLOAT_X24S8:
- return PIPE_FORMAT_Z32_FLOAT_S8X24_USCALED;
+ return PIPE_FORMAT_Z32_FLOAT_S8X24_UINT;
case MESA_FORMAT_YCBCR:
return PIPE_FORMAT_UYVY;
#if FEATURE_texture_s3tc
return MESA_FORMAT_I8;
case PIPE_FORMAT_I16_UNORM:
return MESA_FORMAT_I16;
- case PIPE_FORMAT_S8_USCALED:
+ case PIPE_FORMAT_S8_UINT:
return MESA_FORMAT_S8;
case PIPE_FORMAT_R16G16B16A16_UNORM:
return MESA_FORMAT_Z16;
case PIPE_FORMAT_Z32_UNORM:
return MESA_FORMAT_Z32;
- case PIPE_FORMAT_S8_USCALED_Z24_UNORM:
+ case PIPE_FORMAT_S8_UINT_Z24_UNORM:
return MESA_FORMAT_Z24_S8;
case PIPE_FORMAT_X8Z24_UNORM:
return MESA_FORMAT_Z24_X8;
case PIPE_FORMAT_Z24X8_UNORM:
return MESA_FORMAT_X8_Z24;
- case PIPE_FORMAT_Z24_UNORM_S8_USCALED:
+ case PIPE_FORMAT_Z24_UNORM_S8_UINT:
return MESA_FORMAT_S8_Z24;
case PIPE_FORMAT_Z32_FLOAT:
return MESA_FORMAT_Z32_FLOAT;
- case PIPE_FORMAT_Z32_FLOAT_S8X24_USCALED:
+ case PIPE_FORMAT_Z32_FLOAT_S8X24_UINT:
return MESA_FORMAT_Z32_FLOAT_X24S8;
case PIPE_FORMAT_UYVY:
PIPE_FORMAT_Z24X8_UNORM, \
PIPE_FORMAT_X8Z24_UNORM, \
PIPE_FORMAT_Z16_UNORM, \
- PIPE_FORMAT_Z24_UNORM_S8_USCALED, \
- PIPE_FORMAT_S8_USCALED_Z24_UNORM, \
+ PIPE_FORMAT_Z24_UNORM_S8_UINT, \
+ PIPE_FORMAT_S8_UINT_Z24_UNORM, \
0
/**
{ GL_STENCIL_INDEX, GL_STENCIL_INDEX1_EXT, GL_STENCIL_INDEX4_EXT,
GL_STENCIL_INDEX8_EXT, GL_STENCIL_INDEX16_EXT, 0 },
{
- PIPE_FORMAT_S8_USCALED, PIPE_FORMAT_Z24_UNORM_S8_USCALED,
- PIPE_FORMAT_S8_USCALED_Z24_UNORM, 0
+ PIPE_FORMAT_S8_UINT, PIPE_FORMAT_Z24_UNORM_S8_UINT,
+ PIPE_FORMAT_S8_UINT_Z24_UNORM, 0
}
},
/* Depth / Stencil formats */
{
{ GL_DEPTH_STENCIL_EXT, GL_DEPTH24_STENCIL8_EXT, 0 },
- { PIPE_FORMAT_Z24_UNORM_S8_USCALED, PIPE_FORMAT_S8_USCALED_Z24_UNORM, 0 }
+ { PIPE_FORMAT_Z24_UNORM_S8_UINT, PIPE_FORMAT_S8_UINT_Z24_UNORM, 0 }
},
{
{ GL_DEPTH32F_STENCIL8, 0 },
- { PIPE_FORMAT_Z32_FLOAT_S8X24_USCALED, 0 }
+ { PIPE_FORMAT_Z32_FLOAT_S8X24_UINT, 0 }
},
/* sRGB formats */