return tex->dcc_offset && level < tex->surface.num_dcc_levels;
}
-#define R600_ERR(fmt, args...) \
- fprintf(stderr, "EE %s:%d %s - " fmt, __FILE__, __LINE__, __func__, ##args)
-
#endif
bpe = 4;
break;
default:
- R600_ERR("Invalid sample count for FMASK allocation.\n");
+ PRINT_ERR("Invalid sample count for FMASK allocation.\n");
return;
}
if (sscreen->ws->surface_init(sscreen->ws, &templ, flags, bpe,
RADEON_SURF_MODE_2D, &fmask)) {
- R600_ERR("Got error in surface_init while allocating FMASK.\n");
+ PRINT_ERR("Got error in surface_init while allocating FMASK.\n");
return;
}
*flushed_depth_texture = (struct r600_texture *)ctx->screen->resource_create(ctx->screen, &resource);
if (*flushed_depth_texture == NULL) {
- R600_ERR("failed to create temporary texture to hold flushed depth\n");
+ PRINT_ERR("failed to create temporary texture to hold flushed depth\n");
return false;
}
return true;
si_init_temp_resource_from_box(&resource, texture, box, level, 0);
if (!si_init_flushed_depth_texture(ctx, &resource, &staging_depth)) {
- R600_ERR("failed to create temporary texture to hold untiled copy\n");
+ PRINT_ERR("failed to create temporary texture to hold untiled copy\n");
FREE(trans);
return NULL;
}
if (usage & PIPE_TRANSFER_READ) {
struct pipe_resource *temp = ctx->screen->resource_create(ctx->screen, &resource);
if (!temp) {
- R600_ERR("failed to create a temporary depth texture\n");
+ PRINT_ERR("failed to create a temporary depth texture\n");
FREE(trans);
return NULL;
}
/* XXX: only readback the rectangle which is being mapped? */
/* XXX: when discard is true, no need to read back from depth texture */
if (!si_init_flushed_depth_texture(ctx, texture, &staging_depth)) {
- R600_ERR("failed to create temporary texture to hold untiled copy\n");
+ PRINT_ERR("failed to create temporary texture to hold untiled copy\n");
FREE(trans);
return NULL;
}
/* Create the temporary texture. */
staging = (struct r600_texture*)ctx->screen->resource_create(ctx->screen, &resource);
if (!staging) {
- R600_ERR("failed to create temporary texture to hold untiled copy\n");
+ PRINT_ERR("failed to create temporary texture to hold untiled copy\n");
FREE(trans);
return NULL;
}
return colormask;
}
+#define PRINT_ERR(fmt, args...) \
+ fprintf(stderr, "EE %s:%d %s - " fmt, __FILE__, __LINE__, __func__, ##args)
+
#endif
reg -= CIK_UCONFIG_REG_OFFSET;
} else {
- R600_ERR("Invalid register offset %08x!\n", reg);
+ PRINT_ERR("Invalid register offset %08x!\n", reg);
return;
}
case PIPE_BLEND_MAX:
return V_028780_COMB_MAX_DST_SRC;
default:
- R600_ERR("Unknown blend function %d\n", blend_func);
+ PRINT_ERR("Unknown blend function %d\n", blend_func);
assert(0);
break;
}
case PIPE_BLENDFACTOR_INV_SRC1_ALPHA:
return V_028780_BLEND_INV_SRC1_ALPHA;
default:
- R600_ERR("Bad blend factor %d not supported!\n", blend_fact);
+ PRINT_ERR("Bad blend factor %d not supported!\n", blend_fact);
assert(0);
break;
}
case PIPE_STENCIL_OP_INVERT:
return V_02842C_STENCIL_INVERT;
default:
- R600_ERR("Unknown stencil op %d", s_op);
+ PRINT_ERR("Unknown stencil op %d", s_op);
assert(0);
break;
}
unsigned retval = 0;
if (target >= PIPE_MAX_TEXTURE_TYPES) {
- R600_ERR("r600: unsupported texture type %d\n", target);
+ PRINT_ERR("r600: unsupported texture type %d\n", target);
return false;
}
format = si_translate_colorformat(surf->base.format);
if (format == V_028C70_COLOR_INVALID) {
- R600_ERR("Invalid CB format: %d, disabling CB.\n", surf->base.format);
+ PRINT_ERR("Invalid CB format: %d, disabling CB.\n", surf->base.format);
}
assert(format != V_028C70_COLOR_INVALID);
swap = si_translate_colorswap(surf->base.format, false);
assert(format != V_028040_Z_INVALID);
if (format == V_028040_Z_INVALID)
- R600_ERR("Invalid DB format: %d, disabling DB.\n", rtex->resource.b.b.format);
+ PRINT_ERR("Invalid DB format: %d, disabling DB.\n", rtex->resource.b.b.format);
surf->db_depth_view = S_028008_SLICE_START(surf->base.u.tex.first_layer) |
S_028008_SLICE_MAX(surf->base.u.tex.last_layer);
constbuf.user_buffer = sctx->sample_locations_16x;
break;
default:
- R600_ERR("Requested an invalid number of samples %i.\n",
+ PRINT_ERR("Requested an invalid number of samples %i.\n",
sctx->framebuffer.nr_samples);
assert(0);
}
r = si_shader_create(sscreen, tm, shader, debug);
if (unlikely(r)) {
- R600_ERR("Failed to build shader variant (type=%u) %d\n",
+ PRINT_ERR("Failed to build shader variant (type=%u) %d\n",
sel->type, r);
shader->compilation_failed = true;
return;