From 613c9b78e3a9fa08bda2c671543d2ef0caba9dc2 Mon Sep 17 00:00:00 2001 From: Caio Marcelo de Oliveira Filho Date: Tue, 3 Mar 2020 10:09:29 -0800 Subject: [PATCH] anv: Add a new enum to identify the pipeline type Reviewed-by: Jason Ekstrand Part-of: --- src/intel/vulkan/anv_pipeline.c | 1 + src/intel/vulkan/anv_private.h | 6 ++++++ src/intel/vulkan/genX_pipeline.c | 1 + 3 files changed, 8 insertions(+) diff --git a/src/intel/vulkan/anv_pipeline.c b/src/intel/vulkan/anv_pipeline.c index 0fcbe745f4b..c16050bc3f5 100644 --- a/src/intel/vulkan/anv_pipeline.c +++ b/src/intel/vulkan/anv_pipeline.c @@ -1830,6 +1830,7 @@ anv_pipeline_init(struct anv_pipeline *pipeline, alloc = &device->alloc; pipeline->device = device; + pipeline->type = ANV_PIPELINE_GRAPHICS; ANV_FROM_HANDLE(anv_render_pass, render_pass, pCreateInfo->renderPass); assert(pCreateInfo->subpass < render_pass->subpass_count); diff --git a/src/intel/vulkan/anv_private.h b/src/intel/vulkan/anv_private.h index 13c2512e930..cdb2a725a91 100644 --- a/src/intel/vulkan/anv_private.h +++ b/src/intel/vulkan/anv_private.h @@ -3157,6 +3157,11 @@ struct anv_pipeline_executable { char *disasm; }; +enum anv_pipeline_type { + ANV_PIPELINE_GRAPHICS, + ANV_PIPELINE_COMPUTE, +}; + struct anv_pipeline { struct anv_device * device; struct anv_batch batch; @@ -3167,6 +3172,7 @@ struct anv_pipeline { void * mem_ctx; + enum anv_pipeline_type type; VkPipelineCreateFlags flags; struct anv_subpass * subpass; diff --git a/src/intel/vulkan/genX_pipeline.c b/src/intel/vulkan/genX_pipeline.c index 52a363fc075..c5c5e73874e 100644 --- a/src/intel/vulkan/genX_pipeline.c +++ b/src/intel/vulkan/genX_pipeline.c @@ -2231,6 +2231,7 @@ compute_pipeline_create( return vk_error(VK_ERROR_OUT_OF_HOST_MEMORY); pipeline->device = device; + pipeline->type = ANV_PIPELINE_COMPUTE; pipeline->blend_state.map = NULL; -- 2.30.2