va_list ap;
va_start(ap, name);
- util_vsnprintf(buf, sizeof(buf), name, ap);
+ vsnprintf(buf, sizeof(buf), name, ap);
va_end(ap);
printf("Test(%s) = %s\n", buf,
assert(num_samples >= 1 && num_samples <= 8);
- util_snprintf(name, sizeof(name), "%s: %s, %u samples", __func__,
- use_fbfetch ? "FBFETCH" : "sampler", MAX2(num_samples, 1));
+ snprintf(name, sizeof(name), "%s: %s, %u samples", __func__,
+ use_fbfetch ? "FBFETCH" : "sampler", MAX2(num_samples, 1));
if (!ctx->screen->get_param(ctx->screen, PIPE_CAP_TEXTURE_BARRIER)) {
util_report_result_helper(SKIP, name);
return;
}
if (use_fbfetch &&
- !ctx->screen->get_param(ctx->screen, PIPE_CAP_TGSI_FS_FBFETCH)) {
+ !ctx->screen->get_param(ctx->screen, PIPE_CAP_FBFETCH)) {
util_report_result_helper(SKIP, name);
return;
}
static void
test_compute_clear_image(struct pipe_context *ctx)
{
- struct cso_context *cso;
struct pipe_resource *cb;
const char *text;
- cso = cso_create_context(ctx, 0);
cb = util_create_texture2d(ctx->screen, 256, 256,
PIPE_FORMAT_R8G8B8A8_UNORM, 1);
state.prog = tokens;
void *compute_shader = ctx->create_compute_state(ctx, &state);
- cso_set_compute_shader_handle(cso, compute_shader);
+ ctx->bind_compute_state(ctx, compute_shader);
/* Bind the image. */
struct pipe_image_view image = {0};
cb->width0, cb->height0, expected);
/* Cleanup. */
- cso_destroy_context(cso);
ctx->delete_compute_state(ctx, compute_shader);
pipe_resource_reference(&cb, NULL);
test_texture_barrier(ctx, false, i);
for (int i = 1; i <= 8; i = i * 2)
test_texture_barrier(ctx, true, i);
+ ctx->destroy(ctx);
+ ctx = screen->context_create(screen, NULL, PIPE_CONTEXT_COMPUTE_ONLY);
test_compute_clear_image(ctx);
-
ctx->destroy(ctx);
puts("Done. Exiting..");