Enable Queue, Device labels to be set.

Queue labels can be set by the defaultQueue.label member of the device
descriptor or the setQueue method.

Device labels can be set label member of the device
descriptor or the setQueue method.

D3D12 and VK backend label support included.

Change-Id: Id12dd6e1fc8f1519c55e4efb35e1ead67c085e46
Bug: dawn:1323
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/85540
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Commit-Queue: Brandon Jones <bajones@chromium.org>
This commit is contained in:
Brandon Jones
2022-04-02 04:45:41 +00:00
committed by Dawn LUCI CQ
parent c96ef43684
commit 0126761de8
17 changed files with 95 additions and 24 deletions

View File

@@ -39,7 +39,7 @@ namespace dawn::native::opengl {
const DeviceDescriptor* descriptor,
const OpenGLFunctions& functions) {
Ref<Device> device = AcquireRef(new Device(adapter, descriptor, functions));
DAWN_TRY(device->Initialize());
DAWN_TRY(device->Initialize(descriptor));
return device;
}
@@ -53,11 +53,11 @@ namespace dawn::native::opengl {
Destroy();
}
MaybeError Device::Initialize() {
MaybeError Device::Initialize(const DeviceDescriptor* descriptor) {
InitTogglesFromDriver();
mFormatTable = BuildGLFormatTable();
return DeviceBase::Initialize(new Queue(this));
return DeviceBase::Initialize(new Queue(this), descriptor);
}
void Device::InitTogglesFromDriver() {

View File

@@ -42,7 +42,7 @@ namespace dawn::native::opengl {
const OpenGLFunctions& functions);
~Device() override;
MaybeError Initialize();
MaybeError Initialize(const DeviceDescriptor* descriptor);
// Contains all the OpenGL entry points, glDoFoo is called via device->gl.DoFoo.
const OpenGLFunctions gl;