Replace some nullptrs with VK_NULL_HANDLE
Also ensures GrVkRenderPass.h ends with a LF. GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1758003002 NOTRY=true Review URL: https://codereview.chromium.org/1758003002
This commit is contained in:
parent
73c4e64f4b
commit
9846ef2633
@ -29,7 +29,7 @@ public:
|
||||
VkDeviceMemory fAlloc;
|
||||
Flags fFlags;
|
||||
|
||||
Resource() : INHERITED(), fImage(nullptr), fAlloc(nullptr), fFlags(kNo_Flags) {}
|
||||
Resource() : INHERITED(), fImage(VK_NULL_HANDLE), fAlloc(VK_NULL_HANDLE), fFlags(kNo_Flags) {}
|
||||
|
||||
Resource(VkImage image, VkDeviceMemory alloc, Flags flags)
|
||||
: fImage(image), fAlloc(alloc), fFlags(flags) {}
|
||||
|
@ -495,7 +495,7 @@ GrVkPipeline* GrVkPipeline::Create(GrVkGpu* gpu, const GrPipeline& pipeline,
|
||||
|
||||
VkPipeline vkPipeline;
|
||||
VkResult err = GR_VK_CALL(gpu->vkInterface(), CreateGraphicsPipelines(gpu->device(),
|
||||
nullptr, 1,
|
||||
VK_NULL_HANDLE, 1,
|
||||
&pipelineCreateInfo,
|
||||
nullptr, &vkPipeline));
|
||||
if (err) {
|
||||
|
@ -100,18 +100,18 @@ void GrVkProgram::freeGPUResources(const GrVkGpu* gpu) {
|
||||
GR_VK_CALL(gpu->vkInterface(), DestroyPipelineLayout(gpu->device(),
|
||||
fPipelineLayout,
|
||||
nullptr));
|
||||
fPipelineLayout = nullptr;
|
||||
fPipelineLayout = VK_NULL_HANDLE;
|
||||
}
|
||||
|
||||
if (fDSLayout[0]) {
|
||||
GR_VK_CALL(gpu->vkInterface(), DestroyDescriptorSetLayout(gpu->device(), fDSLayout[0],
|
||||
nullptr));
|
||||
fDSLayout[0] = nullptr;
|
||||
fDSLayout[0] = VK_NULL_HANDLE;
|
||||
}
|
||||
if (fDSLayout[1]) {
|
||||
GR_VK_CALL(gpu->vkInterface(), DestroyDescriptorSetLayout(gpu->device(), fDSLayout[1],
|
||||
nullptr));
|
||||
fDSLayout[1] = nullptr;
|
||||
fDSLayout[1] = VK_NULL_HANDLE;
|
||||
}
|
||||
|
||||
if (fVertexUniformBuffer) {
|
||||
@ -129,9 +129,9 @@ void GrVkProgram::abandonGPUResources() {
|
||||
fPipeline = nullptr;
|
||||
fDescriptorPool->unrefAndAbandon();
|
||||
fDescriptorPool = nullptr;
|
||||
fPipelineLayout = nullptr;
|
||||
fDSLayout[0] = nullptr;
|
||||
fDSLayout[1] = nullptr;
|
||||
fPipelineLayout = VK_NULL_HANDLE;
|
||||
fDSLayout[0] = VK_NULL_HANDLE;
|
||||
fDSLayout[1] = VK_NULL_HANDLE;
|
||||
|
||||
fVertexUniformBuffer->abandon();
|
||||
fFragmentUniformBuffer->abandon();
|
||||
|
@ -19,7 +19,7 @@ class GrVkRenderTarget;
|
||||
|
||||
class GrVkRenderPass : public GrVkResource {
|
||||
public:
|
||||
GrVkRenderPass() : INHERITED(), fRenderPass(nullptr) {}
|
||||
GrVkRenderPass() : INHERITED(), fRenderPass(VK_NULL_HANDLE) {}
|
||||
void initSimple(const GrVkGpu* gpu, const GrVkRenderTarget& target);
|
||||
|
||||
struct AttachmentsDescriptor {
|
||||
|
Loading…
Reference in New Issue
Block a user