mirror of
https://github.com/shadps4-emu/ext-SDL.git
synced 2024-11-23 10:09:48 +00:00
GPU: Fix multisample texture usage validation
This commit is contained in:
parent
926d143966
commit
c499f79fe9
@ -867,10 +867,11 @@ SDL_GPUTexture *SDL_CreateGPUTexture(
|
||||
SDL_assert_release(!"For any texture: usage cannot contain both GRAPHICS_STORAGE_READ and SAMPLER");
|
||||
failed = true;
|
||||
}
|
||||
if (createinfo->sample_count > 1 && (createinfo->usage & (SDL_GPU_TEXTUREUSAGE_SAMPLER |
|
||||
SDL_GPU_TEXTUREUSAGE_GRAPHICS_STORAGE_READ |
|
||||
SDL_GPU_TEXTUREUSAGE_COMPUTE_STORAGE_READ |
|
||||
SDL_GPU_TEXTUREUSAGE_COMPUTE_STORAGE_WRITE))) {
|
||||
if (createinfo->sample_count > SDL_GPU_SAMPLECOUNT_1 &&
|
||||
(createinfo->usage & (SDL_GPU_TEXTUREUSAGE_SAMPLER |
|
||||
SDL_GPU_TEXTUREUSAGE_GRAPHICS_STORAGE_READ |
|
||||
SDL_GPU_TEXTUREUSAGE_COMPUTE_STORAGE_READ |
|
||||
SDL_GPU_TEXTUREUSAGE_COMPUTE_STORAGE_WRITE))) {
|
||||
SDL_assert_release(!"For multisample textures: usage cannot contain SAMPLER or STORAGE flags");
|
||||
failed = true;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user