#include "util/u_format_s3tc.h"
#include "util/u_math.h"
#include "util/u_memory.h"
-#include "util/u_mm.h"
#include "pipe/p_screen.h"
/* S3TC formats. */
if (desc->layout == UTIL_FORMAT_LAYOUT_S3TC) {
- if (!util_format_s3tc_enabled) {
- return ~0; /* Unsupported. */
- }
-
switch (format) {
case PIPE_FORMAT_DXT1_RGB:
case PIPE_FORMAT_DXT1_RGBA:
/* Create the backing buffer if needed. */
if (!tex->buf) {
tex->buf = rws->buffer_create(rws, tex->tex.size_in_bytes, 2048,
- tex->domain, RADEON_FLAG_HANDLE);
+ tex->domain, RADEON_FLAG_NO_SUBALLOC);
if (!tex->buf) {
goto fail;
util_format_is_depth_or_stencil(base->format) ? "depth" : "color");
}
- tiling.microtile = tex->tex.microtile;
- tiling.macrotile = tex->tex.macrotile[0];
- tiling.stride = tex->tex.stride_in_bytes[0];
+ tiling.u.legacy.microtile = tex->tex.microtile;
+ tiling.u.legacy.macrotile = tex->tex.macrotile[0];
+ tiling.u.legacy.stride = tex->tex.stride_in_bytes[0];
rws->buffer_set_metadata(tex->buf, &tiling);
return tex;
/* Enforce a microtiled zbuffer. */
if (util_format_is_depth_or_stencil(base->format) &&
- tiling.microtile == RADEON_LAYOUT_LINEAR) {
+ tiling.u.legacy.microtile == RADEON_LAYOUT_LINEAR) {
switch (util_format_get_blocksize(base->format)) {
case 4:
- tiling.microtile = RADEON_LAYOUT_TILED;
+ tiling.u.legacy.microtile = RADEON_LAYOUT_TILED;
break;
case 2:
- tiling.microtile = RADEON_LAYOUT_SQUARETILED;
+ tiling.u.legacy.microtile = RADEON_LAYOUT_SQUARETILED;
break;
}
}
return (struct pipe_resource*)
- r300_texture_create_object(rscreen, base, tiling.microtile, tiling.macrotile,
+ r300_texture_create_object(rscreen, base, tiling.u.legacy.microtile, tiling.u.legacy.macrotile,
stride, buffer);
}