mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-03 11:30:21 +01:00
lavapipe: Implement 64-bit image clears
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33628>
This commit is contained in:
parent
3ecb89c35b
commit
2be75cfe63
1 changed files with 7 additions and 1 deletions
|
|
@ -3034,9 +3034,15 @@ static void handle_clear_color_image(struct vk_cmd_queue_entry *cmd,
|
|||
struct rendering_state *state)
|
||||
{
|
||||
LVP_FROM_HANDLE(lvp_image, image, cmd->u.clear_color_image.image);
|
||||
|
||||
enum pipe_format format = image->planes[0].bo->format;
|
||||
const struct util_format_description *desc = util_format_description(format);
|
||||
if (util_format_is_int64(desc))
|
||||
format = util_format_get_array(desc->channel[0].type, 32, desc->nr_channels * 2, false, true);
|
||||
|
||||
union util_color uc;
|
||||
uint32_t *col_val = uc.ui;
|
||||
util_pack_color_union(image->planes[0].bo->format, &uc, (void*)cmd->u.clear_color_image.color);
|
||||
util_pack_color_union(format, &uc, (void*)cmd->u.clear_color_image.color);
|
||||
for (unsigned i = 0; i < cmd->u.clear_color_image.range_count; i++) {
|
||||
VkImageSubresourceRange *range = &cmd->u.clear_color_image.ranges[i];
|
||||
struct pipe_box box;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue