obs/gs/texture: Add new flags and fix flag decoding
This commit is contained in:
parent
1d183ae680
commit
96c7b101e5
|
|
@ -26,10 +26,14 @@
|
||||||
static uint32_t decode_flags(gs::texture::flags texture_flags)
|
static uint32_t decode_flags(gs::texture::flags texture_flags)
|
||||||
{
|
{
|
||||||
uint32_t flags = 0;
|
uint32_t flags = 0;
|
||||||
if (exact(texture_flags, gs::texture::flags::Dynamic))
|
if (has(texture_flags, gs::texture::flags::Dynamic))
|
||||||
flags |= GS_DYNAMIC;
|
flags |= GS_DYNAMIC;
|
||||||
if (exact(texture_flags, gs::texture::flags::BuildMipMaps))
|
if (has(texture_flags, gs::texture::flags::BuildMipMaps))
|
||||||
flags |= GS_BUILD_MIPMAPS;
|
flags |= GS_BUILD_MIPMAPS;
|
||||||
|
if (has(texture_flags, gs::texture::flags::Shared))
|
||||||
|
flags |= GS_SHARED_TEX;
|
||||||
|
if (has(texture_flags, gs::texture::flags::GlobalShared))
|
||||||
|
flags |= GS_SHARED_KM_TEX;
|
||||||
return flags;
|
return flags;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -29,6 +29,8 @@ namespace gs {
|
||||||
None,
|
None,
|
||||||
Dynamic,
|
Dynamic,
|
||||||
BuildMipMaps,
|
BuildMipMaps,
|
||||||
|
Shared,
|
||||||
|
GlobalShared,
|
||||||
};
|
};
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue