/* Fallback to clearing it in SW if the HW paths failed. */
if (!cleared)
- util_clear_texture(pipe, tex, level, box, data);
+ util_clear_texture_sw(pipe, tex, level, box, data);
}
void
-util_clear_texture(struct pipe_context *pipe,
- struct pipe_resource *tex,
- unsigned level,
- const struct pipe_box *box,
- const void *data)
+util_clear_texture_sw(struct pipe_context *pipe,
+ struct pipe_resource *tex,
+ unsigned level,
+ const struct pipe_box *box,
+ const void *data)
{
const struct util_format_description *desc =
util_format_description(tex->format);
+ assert(data != NULL);
if (level > tex->last_level)
return;
const void *data);
extern void
-util_clear_texture(struct pipe_context *pipe,
- struct pipe_resource *tex,
- unsigned level,
- const struct pipe_box *box,
- const void *data);
+util_clear_texture_sw(struct pipe_context *pipe,
+ struct pipe_resource *tex,
+ unsigned level,
+ const struct pipe_box *box,
+ const void *data);
extern void
util_clear_render_target(struct pipe_context *pipe,
const struct util_format_description *desc =
util_format_description(tex->format);
if (tex->nr_samples <= 1) {
- util_clear_texture(pipe, tex, level, box, data);
+ util_clear_texture_sw(pipe, tex, level, box, data);
return;
}
union pipe_color_union color;
pipe->create_surface = softpipe_create_surface;
pipe->surface_destroy = softpipe_surface_destroy;
- pipe->clear_texture = util_clear_texture;
+ pipe->clear_texture = util_clear_texture_sw;
}