mirror of
https://github.com/CTCaer/RetroArch.git
synced 2024-12-20 01:38:12 +00:00
Vulkan: Create image views with right amount of mip levels.
This commit is contained in:
parent
4e8e79eabd
commit
0eca956789
@ -267,7 +267,7 @@ void vulkan_sync_texture_to_cpu(vk_t *vk, const struct vk_texture *tex)
|
||||
|
||||
static unsigned vulkan_num_miplevels(unsigned width, unsigned height)
|
||||
{
|
||||
unsigned size = width > height ? width : height;
|
||||
unsigned size = MAX(width, height);
|
||||
unsigned levels = 0;
|
||||
while (size)
|
||||
{
|
||||
@ -488,7 +488,7 @@ struct vk_texture vulkan_create_texture(vk_t *vk,
|
||||
view.components.a = VK_COMPONENT_SWIZZLE_A;
|
||||
}
|
||||
view.subresourceRange.aspectMask = VK_IMAGE_ASPECT_COLOR_BIT;
|
||||
view.subresourceRange.levelCount = 1;
|
||||
view.subresourceRange.levelCount = info.mipLevels;
|
||||
view.subresourceRange.layerCount = 1;
|
||||
|
||||
vkCreateImageView(device, &view, NULL, &tex.view);
|
||||
|
@ -241,7 +241,7 @@ static void vulkan_raster_font_flush(vulkan_raster_t *font)
|
||||
const struct vk_draw_triangles call = {
|
||||
font->vk->pipelines.font,
|
||||
&font->texture,
|
||||
font->vk->samplers.nearest,
|
||||
font->vk->samplers.mipmap_linear,
|
||||
&font->vk->mvp,
|
||||
sizeof(font->vk->mvp),
|
||||
&font->range,
|
||||
|
Loading…
Reference in New Issue
Block a user