mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-14 23:56:16 +00:00
Freeze texture transitions while attached; consolidate OutputAttachment usage (#67)
* lock usages for attachments during subpasses * refactor IsTextureTransitionPossible * change attachment usages to OutputAttachment * make SetBindGroup validation lazier
This commit is contained in:
@@ -92,6 +92,13 @@ namespace backend {
|
||||
currentUsage = usage;
|
||||
}
|
||||
|
||||
bool TextureBase::IsDepthFormat(nxt::TextureFormat format) {
|
||||
switch (format) {
|
||||
case nxt::TextureFormat::R8G8B8A8Unorm:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
void TextureBase::TransitionUsage(nxt::TextureUsageBit usage) {
|
||||
if (!IsTransitionPossible(usage)) {
|
||||
device->HandleError("Texture frozen or usage not allowed");
|
||||
|
||||
Reference in New Issue
Block a user