mirror of https://github.com/libsdl-org/SDL
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");
|
SDL_assert_release(!"For any texture: usage cannot contain both GRAPHICS_STORAGE_READ and SAMPLER");
|
||||||
failed = true;
|
failed = true;
|
||||||
}
|
}
|
||||||
if (createinfo->sample_count > 1 && (createinfo->usage & (SDL_GPU_TEXTUREUSAGE_SAMPLER |
|
if (createinfo->sample_count > SDL_GPU_SAMPLECOUNT_1 &&
|
||||||
SDL_GPU_TEXTUREUSAGE_GRAPHICS_STORAGE_READ |
|
(createinfo->usage & (SDL_GPU_TEXTUREUSAGE_SAMPLER |
|
||||||
SDL_GPU_TEXTUREUSAGE_COMPUTE_STORAGE_READ |
|
SDL_GPU_TEXTUREUSAGE_GRAPHICS_STORAGE_READ |
|
||||||
SDL_GPU_TEXTUREUSAGE_COMPUTE_STORAGE_WRITE))) {
|
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");
|
SDL_assert_release(!"For multisample textures: usage cannot contain SAMPLER or STORAGE flags");
|
||||||
failed = true;
|
failed = true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue