Lines Matching refs:compiler

970 void processResource(const spirv_cross::Compiler& compiler, const spirv_cross::Resource& resource,  in processResource()  argument
973 const uint32_t set = compiler.get_decoration(resource.id, spv::DecorationDescriptorSet); in processResource()
983 const uint32_t bindingIndex = compiler.get_decoration(resource.id, spv::DecorationBinding); in processResource()
988 const spirv_cross::SPIRType& spirType = compiler.get_type(resource.type_id); in processResource()
1002 void reflectDescriptorSets(const spirv_cross::Compiler& compiler, const spirv_cross::ShaderResource… in reflectDescriptorSets() argument
1006 … processResource(compiler, ref, shaderStateFlags, DescriptorType::COMBINED_IMAGE_SAMPLER, layouts); in reflectDescriptorSets()
1010 processResource(compiler, ref, shaderStateFlags, DescriptorType::SAMPLER, layouts); in reflectDescriptorSets()
1014 processResource(compiler, ref, shaderStateFlags, DescriptorType::SAMPLED_IMAGE, layouts); in reflectDescriptorSets()
1018 processResource(compiler, ref, shaderStateFlags, DescriptorType::STORAGE_IMAGE, layouts); in reflectDescriptorSets()
1022 processResource(compiler, ref, shaderStateFlags, DescriptorType::UNIFORM_BUFFER, layouts); in reflectDescriptorSets()
1026 processResource(compiler, ref, shaderStateFlags, DescriptorType::STORAGE_BUFFER, layouts); in reflectDescriptorSets()
1030 processResource(compiler, ref, shaderStateFlags, DescriptorType::INPUT_ATTACHMENT, layouts); in reflectDescriptorSets()
1034 … processResource(compiler, ref, shaderStateFlags, DescriptorType::ACCELERATION_STRUCTURE, layouts); in reflectDescriptorSets()
1049 void reflectPushContants(const spirv_cross::Compiler& compiler, const spirv_cross::ShaderResources&… in reflectPushContants() argument
1056 … const auto ranges = compiler.get_active_buffer_ranges(resources.push_constant_buffers[0].id); in reflectPushContants()
1066 const spirv_cross::Compiler& compiler, ShaderStageFlags shaderStateFlags) in reflectSpecializationConstants() argument
1070 for (auto const& constant : compiler.get_specialization_constants()) { in reflectSpecializationConstants()
1072 const spirv_cross::SPIRConstant& spirvConstant = compiler.get_constant(constant.id); in reflectSpecializationConstants()
1073 const auto type = compiler.get_type(spirvConstant.constant_type); in reflectSpecializationConstants()
1163 void reflectVertexInputs(const spirv_cross::Compiler& compiler, const spirv_cross::ShaderResources&… in reflectVertexInputs() argument
1171 const spirv_cross::SPIRType attributeType = compiler.get_type(attr.type_id); in reflectVertexInputs()
1176 info.description.location = compiler.get_decoration(attr.id, spv::DecorationLocation); in reflectVertexInputs()
1221 const spirv_cross::Compiler compiler(aBinary); in reflectSpvBinary() local
1225 const spirv_cross::ShaderResources resources = compiler.get_shader_resources(); in reflectSpvBinary()
1228 … reflectDescriptorSets(compiler, resources, shaderStateFlags, pipelineLayout.descriptorSetLayouts); in reflectSpvBinary()
1234 reflectPushContants(compiler, resources, shaderStateFlags, pipelineLayout.pushConstant); in reflectSpvBinary()
1239 const auto& blockType = compiler.get_type(remap.base_type_id); in reflectSpvBinary()
1240 auto name = compiler.get_name(remap.id); in reflectSpvBinary()
1243 … Gles::ProcessStruct(std::string_view(name.data(), name.size()), 0, compiler, remap.base_type_id, in reflectSpvBinary()
1247 auto specializationConstants = reflectSpecializationConstants(compiler, shaderStateFlags); in reflectSpvBinary()
1251 reflectVertexInputs(compiler, resources, shaderStateFlags, vertexInputAttributes); in reflectSpvBinary()
1340 …uint32_t size = compiler.get_execution_mode_argument(spv::ExecutionMode::ExecutionModeLocalSize, 0… in reflectSpvBinary()
1343 size = compiler.get_execution_mode_argument(spv::ExecutionMode::ExecutionModeLocalSize, 1); in reflectSpvBinary()
1346 size = compiler.get_execution_mode_argument(spv::ExecutionMode::ExecutionModeLocalSize, 2); in reflectSpvBinary()
1372 Binding get_binding(Gles::CoreCompiler& compiler, spirv_cross::ID id) in get_binding() argument
1374 const uint32_t dset = compiler.get_decoration(id, spv::Decoration::DecorationDescriptorSet); in get_binding()
1375 const uint32_t dbind = compiler.get_decoration(id, spv::Decoration::DecorationBinding); in get_binding()
1396 void Collect(Gles::CoreCompiler& compiler, const spirv_cross::SmallVector<spirv_cross::Resource>& r… in Collect() argument
1402 const auto binding = get_binding(compiler, remap.id); in Collect()
1410 if (auto origname = compiler.get_name(remap.id); origname.empty()) { in Collect()
1411 compiler.set_name(remap.base_type_id, name); in Collect()
1413 compiler.set_name(remap.id, name); in Collect()
1416 compiler.set_name(remap.id, name); in Collect()
1419 compiler.unset_decoration(remap.id, spv::DecorationDescriptorSet); in Collect()
1420 compiler.unset_decoration(remap.id, spv::DecorationBinding); in Collect()
1422 compiler.set_decoration( in Collect()
1433 …Gles::CoreCompiler& compiler, const spirv_cross::ShaderResources& res, ShaderModulePlatformDataGLE… in CollectRes() argument
1437 Collect(compiler, res.storage_buffers, defaultBinding + 1); in CollectRes()
1438 Collect(compiler, res.storage_images, defaultBinding + 1); in CollectRes()
1439 …Collect(compiler, res.uniform_buffers, 0); // 0 == remove binding decorations (let's the compiler … in CollectRes()
1440 …Collect(compiler, res.subpass_inputs, 0); // 0 == remove binding decorations (let's the compiler … in CollectRes()
1443 …Collect(compiler, res.sampled_images, 0); // 0 == remove binding decorations (let's the compiler d… in CollectRes()
1449 for (auto& remap : compiler.get_combined_image_samplers()) { in CollectRes()
1450 const auto imageBinding = get_binding(compiler, remap.image_id); in CollectRes()
1456 const auto samplerBinding = get_binding(compiler, remap.sampler_id); in CollectRes()
1468 compiler.set_name(remap.combined_id, temp); in CollectRes()
1482 void SetupSpirvCross(ShaderStageFlags stage, Gles::CoreCompiler* compiler, DeviceBackendType backen… in SetupSpirvCross() argument
1506 compiler->set_common_options(options); in SetupSpirvCross()
1521 auto compiler = Gles::CoreCompiler(reinterpret_cast<const uint32_t*>(createInfo.spvData.data()), in ProcessShaderModule() local
1524 SetupSpirvCross(me.shaderStageFlags_, &compiler, me.backend_, me.ovrEnabled); in ProcessShaderModule()
1528 Gles::ConvertSpecConstToConstant(compiler, "CORE_FLIP_NDC"); in ProcessShaderModule()
1531 auto active = compiler.get_active_interface_variables(); in ProcessShaderModule()
1532 const auto& res = compiler.get_shader_resources(active); in ProcessShaderModule()
1533 compiler.set_enabled_interface_variables(std::move(active)); in ProcessShaderModule()
1535 Gles::ReflectPushConstants(compiler, res, me.plat_.infos, me.shaderStageFlags_); in ProcessShaderModule()
1536 compiler.build_combined_image_samplers(); in ProcessShaderModule()
1537 CollectRes(compiler, res, me.plat_); in ProcessShaderModule()
1540 Gles::SetSpecMacro(compiler, "CORE_BACKEND_TYPE", 1U); in ProcessShaderModule()
1542 me.source_ = compiler.compile(); in ProcessShaderModule()
1543 Gles::ConvertConstantToUniform(compiler, me.source_, "CORE_FLIP_NDC"); in ProcessShaderModule()