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?
|
// Disabled?
|
||||||
// TODO(benvanik): reset sampler.
|
// TODO(benvanik): reset sampler.
|
||||||
if (!fetch.type) {
|
if (fetch.type != 0x2) {
|
||||||
return true;
|
return false;
|
||||||
}
|
}
|
||||||
assert_true(fetch.type == 0x2);
|
|
||||||
|
|
||||||
TextureInfo texture_info;
|
TextureInfo texture_info;
|
||||||
if (!TextureInfo::Prepare(fetch, &texture_info)) {
|
if (!TextureInfo::Prepare(fetch, &texture_info)) {
|
||||||
|
@ -1356,6 +1355,9 @@ bool TextureCache::SetupTextureBinding(VkCommandBuffer command_buffer,
|
||||||
return false; // invalid texture used
|
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 texture = Demand(texture_info, command_buffer, completion_fence);
|
||||||
auto sampler = Demand(sampler_info);
|
auto sampler = Demand(sampler_info);
|
||||||
// assert_true(texture != nullptr && sampler != nullptr);
|
// assert_true(texture != nullptr && sampler != nullptr);
|
||||||
|
|
Loading…
Reference in New Issue