mirror of
https://github.com/Yours3lf/rpi-vk-driver.git
synced 2025-01-30 22:52:14 +01:00
disable auto lod is now handled by minlod
This commit is contained in:
parent
34cf9df0df
commit
3de1deb156
@ -135,18 +135,16 @@ void createSampler(VkDevice device, VkSampler* nearestTextureSampler, VkSampler*
|
||||
sampler.addressModeW = VK_SAMPLER_ADDRESS_MODE_REPEAT;
|
||||
sampler.mipLodBias = 0.0f;
|
||||
sampler.compareOp = VK_COMPARE_OP_NEVER;
|
||||
sampler.minLod = 0.0f;
|
||||
sampler.minLod = 1.0f; //disable auto LOD
|
||||
sampler.maxLod = 0.0f;
|
||||
sampler.borderColor = VK_BORDER_COLOR_FLOAT_TRANSPARENT_BLACK;
|
||||
rpi_vkCreateSampler(device, &sampler, 0, nearestTextureSampler);
|
||||
_sampler* s = nearestTextureSampler;
|
||||
s->disableAutoLod = 1;
|
||||
|
||||
sampler.magFilter = VK_FILTER_LINEAR;
|
||||
sampler.minFilter = VK_FILTER_LINEAR;
|
||||
rpi_vkCreateSampler(device, &sampler, 0, linearTextureSampler);
|
||||
s = linearTextureSampler;
|
||||
s->disableAutoLod = 1;
|
||||
}
|
||||
|
||||
void createRendertarget(VkDevice device, uint32_t baseMip, uint32_t width, uint32_t height, VkImage textureImage, VkImageView* textureView, VkRenderPass* offscreenRenderPass, VkFramebuffer* offscreenFramebuffer)
|
||||
@ -1030,12 +1028,11 @@ VKAPI_ATTR void VKAPI_CALL rpi_vkCmdBlitImage(
|
||||
samplerCI.addressModeW = VK_SAMPLER_ADDRESS_MODE_REPEAT;
|
||||
samplerCI.mipLodBias = srcMipLevel;
|
||||
samplerCI.compareOp = VK_COMPARE_OP_NEVER;
|
||||
samplerCI.minLod = 0.0f;
|
||||
samplerCI.minLod = 1.0f; //disable auto LOD
|
||||
samplerCI.maxLod = 999.0f;
|
||||
samplerCI.borderColor = VK_BORDER_COLOR_FLOAT_TRANSPARENT_BLACK;
|
||||
rpi_vkCreateSampler(device, &samplerCI, 0, &mipSampler);
|
||||
_sampler* s = mipSampler;
|
||||
s->disableAutoLod = 1;
|
||||
|
||||
VkImageViewCreateInfo view = {};
|
||||
view.sType = VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO;
|
||||
|
@ -32,7 +32,7 @@ VKAPI_ATTR VkResult VKAPI_CALL rpi_vkCreateSampler(
|
||||
s->maxLod = pCreateInfo->maxLod;
|
||||
s->borderColor = pCreateInfo->borderColor;
|
||||
s->unnormalizedCoordinates = pCreateInfo->unnormalizedCoordinates;
|
||||
s->disableAutoLod = 0;
|
||||
s->disableAutoLod = s->minLod > 0.0f;
|
||||
|
||||
*pSampler = s;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user