diff --git a/gfx/common/vulkan_common.c b/gfx/common/vulkan_common.c index 7ad90db896..b2f88b8ccd 100644 --- a/gfx/common/vulkan_common.c +++ b/gfx/common/vulkan_common.c @@ -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); diff --git a/gfx/drivers_font/vulkan_raster_font.c b/gfx/drivers_font/vulkan_raster_font.c index e562b867b7..26a82b3101 100644 --- a/gfx/drivers_font/vulkan_raster_font.c +++ b/gfx/drivers_font/vulkan_raster_font.c @@ -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,