Vulkan: Search by a texture's base format when fetching.
This commit is contained in:
parent
63576aec35
commit
09c29bbdc5
|
@ -1340,10 +1340,9 @@ bool TextureCache::SetupTextureBinding(VkCommandBuffer command_buffer,
|
|||
|
||||
// Disabled?
|
||||
// TODO(benvanik): reset sampler.
|
||||
if (!fetch.type) {
|
||||
return true;
|
||||
if (fetch.type != 0x2) {
|
||||
return false;
|
||||
}
|
||||
assert_true(fetch.type == 0x2);
|
||||
|
||||
TextureInfo texture_info;
|
||||
if (!TextureInfo::Prepare(fetch, &texture_info)) {
|
||||
|
@ -1356,6 +1355,9 @@ bool TextureCache::SetupTextureBinding(VkCommandBuffer command_buffer,
|
|||
return false; // invalid texture used
|
||||
}
|
||||
|
||||
// Search via the base format.
|
||||
texture_info.texture_format = GetBaseFormat(texture_info.texture_format);
|
||||
|
||||
auto texture = Demand(texture_info, command_buffer, completion_fence);
|
||||
auto sampler = Demand(sampler_info);
|
||||
// assert_true(texture != nullptr && sampler != nullptr);
|
||||
|
|
Loading…
Reference in New Issue