[GPU] Give images first found without metadata the DCC metadata of a texture request
Co-authored-by: Sekai <140012992+igettingit@users.noreply.github.com>
This commit is contained in:
parent
5951a64b94
commit
2295a55bd1
|
|
@ -126,6 +126,17 @@ public sealed unsafe partial class GuestImageCache : IGuestImageCache, IGuestIma
|
|||
var found = LookUpImage(ref request, exactFormat);
|
||||
if (request.Role is ImageRole.Texture or ImageRole.StorageImage)
|
||||
{
|
||||
if (request.Description.Metadata.Kind == MetadataKind.Dcc)
|
||||
{
|
||||
using var held = _lock.Hold();
|
||||
var image = _slots[found];
|
||||
if (image.Description.Metadata.Kind == MetadataKind.None)
|
||||
{
|
||||
image.Description.Metadata.Kind = MetadataKind.Dcc;
|
||||
image.Description.Metadata.Range = request.Description.Metadata.Range;
|
||||
}
|
||||
}
|
||||
|
||||
ref readonly var description = ref _slots[found].Description;
|
||||
if (description.DccSliceSize is var sliceSize and not 0)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue