65 const std::string& shaderString,
67 VkShaderModule* shaderModule,
70 std::string* outSPIRV,
88 const std::string& spirv,
90 VkShaderModule* shaderModule,
96 moduleCreateInfo.
pNext =
nullptr;
97 moduleCreateInfo.
flags = 0;
98 moduleCreateInfo.
codeSize = spirv.size();
99 moduleCreateInfo.
pCode = (
const uint32_t*)spirv.c_str();
110 stageInfo->
pNext =
nullptr;
111 stageInfo->
flags = 0;
112 stageInfo->
stage = stage;
113 stageInfo->
module = *shaderModule;
114 stageInfo->
pName =
"main";
bool GrVkFormatIsSupported(VkFormat format)
SkSL::ProgramKind vk_shader_stage_to_skiasl_kind(VkShaderStageFlagBits stage)
bool GrCompileVkShaderModule(GrVkGpu *gpu, const std::string &shaderString, VkShaderStageFlagBits stage, VkShaderModule *shaderModule, VkPipelineShaderStageCreateInfo *stageInfo, const SkSL::ProgramSettings &settings, std::string *outSPIRV, SkSL::Program::Interface *outInterface)
bool GrInstallVkShaderModule(GrVkGpu *gpu, const std::string &spirv, VkShaderStageFlagBits stage, VkShaderModule *shaderModule, VkPipelineShaderStageCreateInfo *stageInfo)
#define GR_VK_CALL_RESULT(GPU, RESULT, X)
GrContextOptions::ShaderErrorHandler * getShaderErrorHandler() const
const GrShaderCaps * shaderCaps() const
GrDirectContextPriv priv()
GrDirectContext * getContext()
const GrVkCaps & vkCaps() const
uint32_t uint32_t * format
bool SkSLToSPIRV(const SkSL::ShaderCaps *caps, const std::string &sksl, SkSL::ProgramKind programKind, const SkSL::ProgramSettings &settings, std::string *spirv, SkSL::ProgramInterface *outInterface, ShaderErrorHandler *errorHandler)
VkPipelineShaderStageCreateFlags flags
const VkSpecializationInfo * pSpecializationInfo
VkShaderStageFlagBits stage
VkShaderModuleCreateFlags flags
#define TRACE_EVENT0(category_group, name)
@ VK_SHADER_STAGE_VERTEX_BIT
@ VK_SHADER_STAGE_FRAGMENT_BIT
@ VK_FORMAT_R16G16B16A16_UNORM
@ VK_FORMAT_R8G8B8A8_SRGB
@ VK_FORMAT_D24_UNORM_S8_UINT
@ VK_FORMAT_B8G8R8A8_UNORM
@ VK_FORMAT_R16G16_SFLOAT
@ VK_FORMAT_B4G4R4A4_UNORM_PACK16
@ VK_FORMAT_G10X6_B10X6R10X6_2PLANE_420_UNORM_3PACK16
@ VK_FORMAT_R5G6B5_UNORM_PACK16
@ VK_FORMAT_R4G4B4A4_UNORM_PACK16
@ VK_FORMAT_A2B10G10R10_UNORM_PACK32
@ VK_FORMAT_R8G8B8A8_UNORM
@ VK_FORMAT_BC1_RGB_UNORM_BLOCK
@ VK_FORMAT_G8_B8_R8_3PLANE_420_UNORM
@ VK_FORMAT_R16G16B16A16_SFLOAT
@ VK_FORMAT_ETC2_R8G8B8_UNORM_BLOCK
@ VK_FORMAT_A2R10G10B10_UNORM_PACK32
@ VK_FORMAT_BC1_RGBA_UNORM_BLOCK
@ VK_FORMAT_G8_B8R8_2PLANE_420_UNORM
@ VK_FORMAT_B5G6R5_UNORM_PACK16
@ VK_FORMAT_D32_SFLOAT_S8_UINT
@ VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO
@ VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO