egdaniel 2016-04-19 12:13:41 -07:00 committed by Commit bot
parent 718a5adc6d
commit e05bbbba79

View File

@ -180,16 +180,20 @@ GrBuffer* GrVkGpu::onCreateBuffer(size_t size, GrBufferType type, GrAccessPatter
SkASSERT(kDynamic_GrAccessPattern == accessPattern ||
kStatic_GrAccessPattern == accessPattern);
buff = GrVkVertexBuffer::Create(this, size, kDynamic_GrAccessPattern == accessPattern);
break;
case kIndex_GrBufferType:
SkASSERT(kDynamic_GrAccessPattern == accessPattern ||
kStatic_GrAccessPattern == accessPattern);
buff = GrVkIndexBuffer::Create(this, size, kDynamic_GrAccessPattern == accessPattern);
break;
case kXferCpuToGpu_GrBufferType:
SkASSERT(kStream_GrAccessPattern == accessPattern);
buff = GrVkTransferBuffer::Create(this, size, GrVkBuffer::kCopyRead_Type);
break;
case kXferGpuToCpu_GrBufferType:
SkASSERT(kStream_GrAccessPattern == accessPattern);
buff = GrVkTransferBuffer::Create(this, size, GrVkBuffer::kCopyWrite_Type);
break;
default:
SkFAIL("Unknown buffer type.");
return nullptr;