Fully deprecates DawnTogglesDeviceDescriptor.
Change-Id: I81ac6e70e086e1f5839733d2dd35c283ed6eba68 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/128681 Kokoro: Kokoro <noreply+kokoro@google.com> Reviewed-by: Austin Eng <enga@chromium.org> Commit-Queue: Loko Kung <lokokung@google.com> Reviewed-by: Kai Ninomiya <kainino@chromium.org>
This commit is contained in:
parent
439abaecf7
commit
aae9f6bc5f
13
dawn.json
13
dawn.json
|
@ -164,18 +164,6 @@
|
|||
{"name": "default queue", "type": "queue descriptor"}
|
||||
]
|
||||
},
|
||||
"dawn toggles device descriptor": {
|
||||
"tags": ["dawn", "native", "deprecated"],
|
||||
"category": "structure",
|
||||
"chained": "in",
|
||||
"chain roots": ["device descriptor"],
|
||||
"members": [
|
||||
{"name": "force enabled toggles count", "type": "uint32_t", "default": 0},
|
||||
{"name": "force enabled toggles", "type": "char", "annotation": "const*const*", "length": "force enabled toggles count"},
|
||||
{"name": "force disabled toggles count", "type": "uint32_t", "default": 0},
|
||||
{"name": "force disabled toggles", "type": "char", "annotation": "const*const*", "length": "force disabled toggles count"}
|
||||
]
|
||||
},
|
||||
"dawn toggles descriptor": {
|
||||
"tags": ["dawn", "native"],
|
||||
"category": "structure",
|
||||
|
@ -2606,7 +2594,6 @@
|
|||
{"value": 14, "name": "surface descriptor from windows swap chain panel", "tags": ["dawn"]},
|
||||
{"value": 15, "name": "render pass descriptor max draw count"},
|
||||
{"value": 1000, "name": "dawn texture internal usage descriptor", "tags": ["dawn"]},
|
||||
{"value": 1002, "name": "dawn toggles device descriptor", "tags": ["dawn", "native", "deprecated"]},
|
||||
{"value": 1003, "name": "dawn encoder internal usage descriptor", "tags": ["dawn"]},
|
||||
{"value": 1004, "name": "dawn instance descriptor", "tags": ["dawn", "native"]},
|
||||
{"value": 1005, "name": "dawn cache device descriptor", "tags": ["dawn", "native"]},
|
||||
|
|
|
@ -260,33 +260,6 @@ ResultOrError<Ref<DeviceBase>> AdapterBase::CreateDeviceInternal(
|
|||
const DawnTogglesDescriptor* deviceTogglesDesc = nullptr;
|
||||
FindInChain(descriptor->nextInChain, &deviceTogglesDesc);
|
||||
|
||||
// Handle the deprecated DawnTogglesDeviceDescriptor
|
||||
// TODO(dawn:1495): Remove this fallback once Chromium is changed to use DawnToggleDescriptor
|
||||
// and DawnTogglesDeviceDescriptor is removed.
|
||||
const DawnTogglesDeviceDescriptor* deprecatedTogglesDeviceDesc = nullptr;
|
||||
DawnTogglesDescriptor convertedDeviceTogglesDesc = {};
|
||||
FindInChain(descriptor->nextInChain, &deprecatedTogglesDeviceDesc);
|
||||
|
||||
if (deprecatedTogglesDeviceDesc) {
|
||||
// Emit the deprecation warning.
|
||||
dawn::WarningLog()
|
||||
<< "DawnTogglesDeviceDescriptor is deprecated and replaced by DawnTogglesDescriptor.";
|
||||
// Ensure that at most one toggles descriptor is used.
|
||||
DAWN_INVALID_IF(
|
||||
deviceTogglesDesc && deprecatedTogglesDeviceDesc,
|
||||
"DawnTogglesDeviceDescriptor should not be used together with DawnTogglesDescriptor.");
|
||||
|
||||
convertedDeviceTogglesDesc.enabledToggles =
|
||||
deprecatedTogglesDeviceDesc->forceEnabledToggles;
|
||||
convertedDeviceTogglesDesc.enabledTogglesCount =
|
||||
deprecatedTogglesDeviceDesc->forceEnabledTogglesCount;
|
||||
convertedDeviceTogglesDesc.disabledToggles =
|
||||
deprecatedTogglesDeviceDesc->forceDisabledToggles;
|
||||
convertedDeviceTogglesDesc.disabledTogglesCount =
|
||||
deprecatedTogglesDeviceDesc->forceDisabledTogglesCount;
|
||||
deviceTogglesDesc = &convertedDeviceTogglesDesc;
|
||||
}
|
||||
|
||||
// Create device toggles state.
|
||||
TogglesState deviceToggles =
|
||||
TogglesState::CreateFromTogglesDescriptor(deviceTogglesDesc, ToggleStage::Device);
|
||||
|
|
Loading…
Reference in New Issue