anv: Add a new enum to identify the pipeline type
authorCaio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Tue, 3 Mar 2020 18:09:29 +0000 (10:09 -0800)
committerCaio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Thu, 12 Mar 2020 20:18:54 +0000 (13:18 -0700)
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4040>

src/intel/vulkan/anv_pipeline.c
src/intel/vulkan/anv_private.h
src/intel/vulkan/genX_pipeline.c

index 0fcbe745f4b95f395d20f785889b5464bcf8c1e8..c16050bc3f5907a228ce0592129ea5cab16f70e8 100644 (file)
@@ -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);
index 13c2512e930ac37751696498ac3433b3e092c150..cdb2a725a91ba93a6b624c367189589e054f0138 100644 (file)
@@ -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;
 
index 52a363fc07569c85ad0b2efebe6a3107a94c2c20..c5c5e73874ec8128a8707837872411d8117cb76b 100644 (file)
@@ -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;