_T(BPTC_RGB_FLOAT, BPTC_FLOAT, NONE, WZYX),
_T(BPTC_RGB_UFLOAT, BPTC_UFLOAT, NONE, WZYX),
- /* faked */
- _T(RGTC1_UNORM, 8_8_8_8_UNORM, NONE, WZYX),
- _T(RGTC1_SNORM, 8_8_8_8_SNORM, NONE, WZYX),
- _T(RGTC2_UNORM, 8_8_8_8_UNORM, NONE, WZYX),
- _T(RGTC2_SNORM, 8_8_8_8_SNORM, NONE, WZYX),
- _T(LATC1_UNORM, 8_8_8_8_UNORM, NONE, WZYX),
- _T(LATC1_SNORM, 8_8_8_8_SNORM, NONE, WZYX),
- _T(LATC2_UNORM, 8_8_8_8_UNORM, NONE, WZYX),
- _T(LATC2_SNORM, 8_8_8_8_SNORM, NONE, WZYX),
+ _T(RGTC1_UNORM, RGTC1_UNORM, NONE, WZYX),
+ _T(RGTC1_SNORM, RGTC1_SNORM, NONE, WZYX),
+ _T(RGTC2_UNORM, RGTC2_UNORM, NONE, WZYX),
+ _T(RGTC2_SNORM, RGTC2_SNORM, NONE, WZYX),
+ _T(LATC1_UNORM, RGTC1_UNORM, NONE, WZYX),
+ _T(LATC1_SNORM, RGTC1_SNORM, NONE, WZYX),
+ _T(LATC2_UNORM, RGTC2_UNORM, NONE, WZYX),
+ _T(LATC2_SNORM, RGTC2_SNORM, NONE, WZYX),
};
/* convert pipe format to vertex buffer format: */
{
if (format == PIPE_FORMAT_Z32_FLOAT_S8X24_UINT)
format = PIPE_FORMAT_Z32_FLOAT;
- else if (util_format_description(format)->layout == UTIL_FORMAT_LAYOUT_RGTC)
- format = PIPE_FORMAT_R8G8B8A8_UNORM;
switch (util_format_get_blocksizebits(format) / util_format_get_blockwidth(format)) {
case 8: return TFETCH4_1_BYTE;
}
}
-unsigned
-fd4_pipe2nblocksx(enum pipe_format format, unsigned width)
-{
- if (util_format_description(format)->layout == UTIL_FORMAT_LAYOUT_RGTC)
- format = PIPE_FORMAT_R8G8B8A8_UNORM;
- return util_format_get_nblocksx(format, width);
-}
-
/* we need to special case a bit the depth/stencil restore, because we are
* using the texture sampler to blit into the depth/stencil buffer, *not*
* into a color buffer. Otherwise fd4_tex_swiz() will do the wrong thing,
buf = trans->staging;
offset = 0;
- } else if (util_format_description(format)->layout == UTIL_FORMAT_LAYOUT_RGTC) {
+ } else if (rsc->internal_format != format &&
+ util_format_description(format)->layout == UTIL_FORMAT_LAYOUT_RGTC) {
assert(trans->base.box.depth == 1);
trans->base.stride = util_format_get_stride(
if (format == PIPE_FORMAT_Z32_FLOAT_S8X24_UINT)
format = PIPE_FORMAT_Z32_FLOAT;
- else if (util_format_description(format)->layout ==
- UTIL_FORMAT_LAYOUT_RGTC)
+ else if (fd_screen(pscreen)->gpu_id < 400 &&
+ util_format_description(format)->layout == UTIL_FORMAT_LAYOUT_RGTC)
format = PIPE_FORMAT_R8G8B8A8_UNORM;
+ rsc->internal_format = format;
rsc->cpp = util_format_get_blocksize(format);
assert(rsc->cpp);