Fix createBuffer in Vulkan
TBR=bsalomon@google.com BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1897373002 Review URL: https://codereview.chromium.org/1897373002
This commit is contained in:
parent
718a5adc6d
commit
e05bbbba79
@ -180,16 +180,20 @@ GrBuffer* GrVkGpu::onCreateBuffer(size_t size, GrBufferType type, GrAccessPatter
|
|||||||
SkASSERT(kDynamic_GrAccessPattern == accessPattern ||
|
SkASSERT(kDynamic_GrAccessPattern == accessPattern ||
|
||||||
kStatic_GrAccessPattern == accessPattern);
|
kStatic_GrAccessPattern == accessPattern);
|
||||||
buff = GrVkVertexBuffer::Create(this, size, kDynamic_GrAccessPattern == accessPattern);
|
buff = GrVkVertexBuffer::Create(this, size, kDynamic_GrAccessPattern == accessPattern);
|
||||||
|
break;
|
||||||
case kIndex_GrBufferType:
|
case kIndex_GrBufferType:
|
||||||
SkASSERT(kDynamic_GrAccessPattern == accessPattern ||
|
SkASSERT(kDynamic_GrAccessPattern == accessPattern ||
|
||||||
kStatic_GrAccessPattern == accessPattern);
|
kStatic_GrAccessPattern == accessPattern);
|
||||||
buff = GrVkIndexBuffer::Create(this, size, kDynamic_GrAccessPattern == accessPattern);
|
buff = GrVkIndexBuffer::Create(this, size, kDynamic_GrAccessPattern == accessPattern);
|
||||||
|
break;
|
||||||
case kXferCpuToGpu_GrBufferType:
|
case kXferCpuToGpu_GrBufferType:
|
||||||
SkASSERT(kStream_GrAccessPattern == accessPattern);
|
SkASSERT(kStream_GrAccessPattern == accessPattern);
|
||||||
buff = GrVkTransferBuffer::Create(this, size, GrVkBuffer::kCopyRead_Type);
|
buff = GrVkTransferBuffer::Create(this, size, GrVkBuffer::kCopyRead_Type);
|
||||||
|
break;
|
||||||
case kXferGpuToCpu_GrBufferType:
|
case kXferGpuToCpu_GrBufferType:
|
||||||
SkASSERT(kStream_GrAccessPattern == accessPattern);
|
SkASSERT(kStream_GrAccessPattern == accessPattern);
|
||||||
buff = GrVkTransferBuffer::Create(this, size, GrVkBuffer::kCopyWrite_Type);
|
buff = GrVkTransferBuffer::Create(this, size, GrVkBuffer::kCopyWrite_Type);
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
SkFAIL("Unknown buffer type.");
|
SkFAIL("Unknown buffer type.");
|
||||||
return nullptr;
|
return nullptr;
|
||||||
|
Loading…
Reference in New Issue
Block a user