zink: add a #define for vk shader bits

Acked-by: Dave Airlie <airlied@redhat.com>
Reviewed-By: Tatsuyuki Ishi <ishitatsuyuki@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17111>
This commit is contained in:
Mike Blumenkrantz 2022-06-18 09:43:01 -04:00
parent 566aaed094
commit f851c180df
2 changed files with 7 additions and 5 deletions

View file

@ -3063,11 +3063,7 @@ zink_resource_image_barrier_init(VkImageMemoryBarrier *imb, struct zink_resource
static inline bool
is_shader_pipline_stage(VkPipelineStageFlags pipeline)
{
return pipeline & (VK_PIPELINE_STAGE_VERTEX_SHADER_BIT |
VK_PIPELINE_STAGE_TESSELLATION_CONTROL_SHADER_BIT |
VK_PIPELINE_STAGE_TESSELLATION_EVALUATION_SHADER_BIT |
VK_PIPELINE_STAGE_GEOMETRY_SHADER_BIT |
VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT);
return pipeline & GFX_SHADER_BITS;
}
static void

View file

@ -50,6 +50,12 @@
#include <vulkan/vulkan.h>
#define GFX_SHADER_BITS (VK_PIPELINE_STAGE_VERTEX_SHADER_BIT | \
VK_PIPELINE_STAGE_TESSELLATION_CONTROL_SHADER_BIT | \
VK_PIPELINE_STAGE_TESSELLATION_EVALUATION_SHADER_BIT | \
VK_PIPELINE_STAGE_GEOMETRY_SHADER_BIT | \
VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT)
#define pipe_buffer_write "use tc_buffer_write to avoid breaking threaded context"
#ifdef __cplusplus