/ohos5.0/foundation/graphic/graphic_3d/lume/LumeRender/src/vulkan/ |
H A D | gpu_image_vk.cpp | 198 plat_.aspectFlags = GpuImageUtilsVk::GetImageAspectFlagsFromFormat(plat_.format); in GpuImageVk() 225 if (!plat_.image && !plat_.imageView && hwBuffer) { in GpuImageVk() 230 if (plat_.image && !plat_.imageView && (desc_.usageFlags & IMAGE_VIEW_USAGE_FLAGS)) { in GpuImageVk() 232 } else if (plat_.imageView) { in GpuImageVk() 233 plat_.imageViewBase = plat_.imageView; in GpuImageVk() 341 PLUGIN_ASSERT(plat_.image); in CreateVkImageViews() 354 const ImageInputStruct imageInput = { plat_.image, plat_.format, componentMapping }; in CreateVkImageViews() 357 shaderViewImageAspectFlags, 0, plat_.mipLevels, 0, plat_.arrayLayers); in CreateVkImageViews() 358 plat_.imageViewBase = plat_.imageView; in CreateVkImageViews() 415 return plat_; in GetBasePlatformData() [all …]
|
H A D | device_vk.cpp | 653 plat_.instance, plat_.physicalDevice, plat_.device, allocatorCreateInfo); in DeviceVk() 683 CreateFunctionsVk::DestroyPipelineCache(plat_.device, plat_.pipelineCache); in ~DeviceVk() 715 if ((plat_.deviceApiMajor >= 1) && (plat_.deviceApiMinor >= 1)) { in CreateInstance() 732 plat_.deviceApiMajor = Math::min(plat_.deviceApiMajor, physicalDeviceApiMajor); in CreatePhysicalDevice() 733 plat_.deviceApiMinor = Math::min(plat_.deviceApiMinor, physicalDeviceApiMinor); in CreatePhysicalDevice() 794 if ((plat_.deviceApiMajor >= 1) && (plat_.deviceApiMinor >= 1)) { in CreateDevice() 814 …CreateFunctionsVk::CreateDevice(plat_.instance, plat_.physicalDevice, plat_.physicalDeviceExtensio… in CreateDevice() 891 return plat_; in GetPlatformData() 896 return plat_; in GetPlatformDataVk() 1082 CreateFunctionsVk::DestroyPipelineCache(plat_.device, plat_.pipelineCache); in InitializePipelineCache() [all …]
|
H A D | gpu_buffer_vk.cpp | 114 platAccel_.buffer = plat_.buffer; in GpuBufferVk() 115 platAccel_.byteSize = plat_.fullByteSize; in GpuBufferVk() 175 gpuMemAllocator->DestroyBuffer(plat_.buffer, mem_.allocation); in ~GpuBufferVk() 202 plat_.fullByteSize = plat_.bindMemoryByteSize * bufferingCount_; in CreateBufferImpl() 203 plat_.currentByteOffset = 0; in CreateBufferImpl() 204 plat_.usage = static_cast<VkBufferUsageFlags>(desc_.usageFlags); in CreateBufferImpl() 213 RecordAllocation(*gpuMemAllocator, desc_, plat_.fullByteSize); in CreateBufferImpl() 229 return plat_; in GetPlatformData() 255 …plat_.currentByteOffset = (plat_.currentByteOffset + plat_.bindMemoryByteSize) % plat_.fullByteSiz… in Map() 322 (VkDeviceSize)plat_.fullByteSize, // size in AllocateMemory() [all …]
|
H A D | swapchain_vk.cpp | 278 plat_.swapchainImages.width = swapchainExtent.width; in SwapchainVk() 279 plat_.swapchainImages.height = swapchainExtent.height; in SwapchainVk() 337 plat_.swapchainImages.images.resize(realImageCount); in SwapchainVk() 338 plat_.swapchainImages.imageViews.resize(realImageCount); in SwapchainVk() 339 plat_.swapchainImages.semaphores.resize(realImageCount); in SwapchainVk() 388 … desc_ = GetColorDesc(plat_.swapchainImages.width, plat_.swapchainImages.height, (Format)ci.format, in SwapchainVk() 393 …descDepthBuffer_ = GetDepthDesc(plat_.swapchainImages.width, plat_.swapchainImages.height, depthFo… in SwapchainVk() 404 for (auto const imageView : plat_.swapchainImages.imageViews) { in ~SwapchainVk() 411 for (const auto semaphore : plat_.swapchainImages.semaphores) { in ~SwapchainVk() 419 CreateFunctionsVk::DestroySwapchain(device, plat_.swapchain); in ~SwapchainVk() [all …]
|
H A D | gpu_semaphore_vk.cpp | 41 &plat_.semaphore)); // pSemaphore in RENDER_BEGIN_NAMESPACE() 49 plat_.semaphore = VulkanHandleCast<VkSemaphore>(handle); in GpuSemaphoreVk() 55 if (ownsResources_ && plat_.semaphore) { in ~GpuSemaphoreVk() 59 plat_.semaphore, // semaphore in ~GpuSemaphoreVk() 62 plat_.semaphore = VK_NULL_HANDLE; in ~GpuSemaphoreVk() 67 return VulkanHandleCast<uint64_t>(plat_.semaphore); in GetHandle() 72 return plat_; in GetPlatformData()
|
H A D | gpu_program_vk.cpp | 53 plat_.vert = ((const ShaderModulePlatformDataVk&)mod.GetPlatformData()).shaderModule; in RENDER_BEGIN_NAMESPACE() 66 plat_.frag = ((const ShaderModulePlatformDataVk&)mod.GetPlatformData()).shaderModule; in RENDER_BEGIN_NAMESPACE() 84 return plat_; in GetPlatformData() 101 plat_.comp = ((const ShaderModulePlatformDataVk&)mod.GetPlatformData()).shaderModule; in GpuComputeProgramVk() 120 return plat_; in GetPlatformData()
|
H A D | pipeline_state_object_vk.cpp | 489 plat_.pipelineLayout, // layout in GraphicsPipelineStateObjectVk() 517 if (plat_.pipeline) { in ~GraphicsPipelineStateObjectVk() 519 plat_.pipeline, // pipeline in ~GraphicsPipelineStateObjectVk() 522 if (plat_.pipelineLayout) { in ~GraphicsPipelineStateObjectVk() 524 plat_.pipelineLayout, // pipelineLayout in ~GraphicsPipelineStateObjectVk() 531 return plat_; in GetPlatformData() 606 plat_.pipelineLayout, // layout in ComputePipelineStateObjectVk() 616 &plat_.pipeline)); // pPipelines in ComputePipelineStateObjectVk() 633 plat_.pipeline, // pipeline in ~ComputePipelineStateObjectVk() 636 plat_.pipelineLayout, // pipelineLayout in ~ComputePipelineStateObjectVk() [all …]
|
H A D | gpu_sampler_vk.cpp | 84 &plat_.sampler)); // pSampler in GpuSamplerVk() 89 &plat_.sampler)); // pSampler in GpuSamplerVk() 104 plat_.sampler, // sampler in ~GpuSamplerVk() 115 return plat_; in GetPlatformData()
|
H A D | shader_module_vk.cpp | 102 plat_.shaderModule = CreateShaderModule(vkDevice, createInfo.spvData); in ShaderModuleVk() 111 if (plat_.shaderModule != VK_NULL_HANDLE) { in ~ShaderModuleVk() 113 plat_.shaderModule, // shaderModule in ~ShaderModuleVk() 125 return plat_; in GetPlatformData()
|
/ohos5.0/foundation/graphic/graphic_3d/lume/LumeRender/src/gles/ |
H A D | gpu_buffer_gles.cpp | 81 glGenBuffers(1, &plat_.buffer); 88 …plat_.alignedBindByteSize = ((plat_.bindMemoryByteSize + (minAlignment - 1)) / minAlignment) * min… 89 plat_.alignedByteSize = plat_.alignedBindByteSize; 97 device_.BindBuffer(INIT_TARGET, plat_.buffer); 139 if (plat_.buffer) { in ~GpuBufferGLES() 148 device_.DeleteBuffer(plat_.buffer); in ~GpuBufferGLES() 166 return plat_; in GetPlatformData() 182 plat_.currentByteOffset += plat_.alignedBindByteSize; in Map() 183 if (plat_.currentByteOffset >= plat_.alignedByteSize) { in Map() 184 plat_.currentByteOffset = 0; in Map() [all …]
|
H A D | gpu_image_gles.cpp | 194 if (plat_.renderBuffer) { in GpuImageGLES() 234 glGenTextures(1, &plat_.image); in GpuImageGLES() 253 DoSwizzle(desc, plat_); in GpuImageGLES() 254 device_.TexSwizzle(plat_.image, GL_TEXTURE_EXTERNAL_OES, plat_.swizzle); in GpuImageGLES() 266 if (plat_.image) { in ~GpuImageGLES() 267 device_.DeleteTexture(plat_.image); in ~GpuImageGLES() 272 if (plat_.renderBuffer) { in ~GpuImageGLES() 285 if (plat_.image) { in ~GpuImageGLES() 286 device_.DeleteTexture(plat_.image); in ~GpuImageGLES() 302 return plat_; in GetPlatformData() [all …]
|
H A D | gpu_sampler_gles.cpp | 65 glGenSamplers(1, &plat_.sampler); in RENDER_BEGIN_NAMESPACE() 66 glSamplerParameteri(plat_.sampler, GL_TEXTURE_MAG_FILTER, magFilter[desc.magFilter]); in RENDER_BEGIN_NAMESPACE() 70 glSamplerParameteri(plat_.sampler, GL_TEXTURE_WRAP_S, addressMode[desc.addressModeU]); in RENDER_BEGIN_NAMESPACE() 80 glSamplerParameteri(plat_.sampler, GL_TEXTURE_COMPARE_MODE, GL_NONE); in RENDER_BEGIN_NAMESPACE() 81 glSamplerParameteri(plat_.sampler, GL_TEXTURE_COMPARE_FUNC, GL_ALWAYS); in RENDER_BEGIN_NAMESPACE() 84 glSamplerParameterf(plat_.sampler, GL_TEXTURE_MIN_LOD, desc.minLod); in RENDER_BEGIN_NAMESPACE() 85 glSamplerParameterf(plat_.sampler, GL_TEXTURE_MAX_LOD, desc.maxLod); in RENDER_BEGIN_NAMESPACE() 109 glSamplerParameterfv(plat_.sampler, GL_TEXTURE_BORDER_COLOR, color); in RENDER_BEGIN_NAMESPACE() 116 if (plat_.sampler) { in ~GpuSamplerGLES() 118 device_.DeleteSampler(plat_.sampler); in ~GpuSamplerGLES() [all …]
|
H A D | pipeline_state_object_gles.cpp | 159 plat_.graphicsState = graphicsState; in GraphicsPipelineStateObjectGLES() 160 plat_.pipelineLayout = pipelineLayout; in GraphicsPipelineStateObjectGLES() 166 …plat_.vertexInputDeclaration.bindingDescriptions[plat_.vertexInputDeclaration.bindingDescriptionCo… in GraphicsPipelineStateObjectGLES() 169 plat_.renderPassDesc = renderPassDesc; in GraphicsPipelineStateObjectGLES() 178 plat_.views = views; in GraphicsPipelineStateObjectGLES() 182 if (plat_.graphicsShader) { in GraphicsPipelineStateObjectGLES() 207 if (plat_.vao == 0) { in MakeVAO() 239 if (plat_.vao) { in ~GraphicsPipelineStateObjectGLES() 247 return plat_; in GetPlatformData() 256 plat_.pipelineLayout = pipelineLayout; in ComputePipelineStateObjectGLES() [all …]
|
H A D | egl_state.cpp | 495 return plat_.majorVersion; in MajorVersion() 500 return plat_.minorVersion; in MinorVersion() 546 eglChooseConfig(plat_.display, attributes.data(), &plat_.config, 1, &num_configs); in ChooseConfiguration() 550 DumpEGLConfig(plat_.display, plat_.config); in ChooseConfiguration() 591 …plat_.context = eglCreateContext(plat_.display, plat_.config, sharedContext, context_attributes.da… in CreateContext() 640 eglQueryContext(plat_.display, plat_.context, EGL_CONTEXT_MAJOR_VERSION, &glMajor); in VerifyVersion() 775 eglDestroyContext(plat_.display, plat_.context); in CreateContext() 816 … &plat_.deviceProperties, sizeof(plat_.deviceProperties), 0x00, sizeof(plat_.deviceProperties)); in GlInitialize() 915 eglDestroyContext(plat_.display, plat_.context); in DestroyContext() 946 return plat_; in GetPlatformData() [all …]
|
H A D | gpu_program_gles.cpp | 533 if (plat_.program) { in ~GpuShaderProgramGLES() 628 ret->plat_.vertShaderModule_ = plat_.vertShaderModule_; in Specialize() 629 ret->plat_.fragShaderModule_ = plat_.fragShaderModule_; in Specialize() 665 ret->plat_.flipLocation = glGetUniformLocation(ret->plat_.program, "CORE_FLIP_NDC"); in Specialize() 690 return plat_; in GetPlatformData() 724 if (plat_.program) { in ~GpuComputeProgramGLES() 732 PLUGIN_ASSERT(plat_.program); in GetPlatformData() 733 return plat_; in GetPlatformData() 738 PLUGIN_ASSERT(plat_.module_); in GetReflection() 747 ret->plat_.module_ = plat_.module_; in Specialize() [all …]
|
H A D | wgl_state.cpp | 410 return plat_.context != nullptr; in IsValid() 432 if (!plat_.mhWnd) { in CreateContext() 435 plat_.display = GetDC(plat_.mhWnd); in CreateContext() 487 plat_.context = wglCreateContextAttribsARB(plat_.display, sharedContext, WGL_ATTRIBS); in CreateContext() 496 if (plat_.context) { in DestroyContext() 499 if (plat_.mhWnd && plat_.display) { in DestroyContext() 500 ReleaseDC(plat_.mhWnd, plat_.display); in DestroyContext() 522 … &plat_.deviceProperties, sizeof(plat_.deviceProperties), 0x00, sizeof(plat_.deviceProperties)); in GlInitialize() 553 wglMakeCurrent(plat_.display, plat_.context); in SetContext() 563 wglMakeCurrent(plat_.display, plat_.context); in SetContext() [all …]
|
H A D | swapchain_gles.cpp | 276 plat_.surface = in SwapchainGLES() 292 plat_.swapchainImageIndex = 0; in SwapchainGLES() 294 plat_.swapchainImages.width = info.width; in SwapchainGLES() 295 plat_.swapchainImages.height = info.height; in SwapchainGLES() 301 GenerateFBO(device_, plat_, (info.samples > 1)); in SwapchainGLES() 306 plat_.swapchainImages.images.resize(1); in SwapchainGLES() 324 for (auto id : plat_.fbos) { in ~SwapchainGLES() 333 device_.GetEglState().DestroySurface(plat_.surface); in ~SwapchainGLES() 339 return plat_; in GetPlatformData() 361 return plat_.swapchainImageIndex; in GetNextImage() [all …]
|
H A D | gpu_semaphore_gles.cpp | 37 plat_.sync = handle; in GpuSemaphoreGles() 43 if (ownsResources_ && plat_.sync) { in ~GpuSemaphoreGles() 45 GLsync sync = reinterpret_cast<GLsync>(plat_.sync); in ~GpuSemaphoreGles() 48 plat_.sync = 0; in ~GpuSemaphoreGles() 53 return plat_.sync; in GetHandle() 58 return plat_; in GetPlatformData()
|
H A D | shader_module_gles.cpp | 48 void CollectRes(const PipelineLayout& pipeline, ShaderModulePlatformDataGLES& plat_) in CollectRes() argument 64 Collect(set.set, binding, plat_.cbSets); in CollectRes() 70 Collect(set.set, binding, plat_.ciSets); in CollectRes() 77 Collect(set.set, binding, plat_.ubSets); in CollectRes() 80 Collect(set.set, binding, plat_.sbSets); in CollectRes() 87 Collect(set.set, binding, plat_.siSets); in CollectRes() 101 …plat_.combSets.push_back({ sBinding.set, sBinding.bind, iBinding.set, iBinding.bind, string { name… in CollectRes() 200 me.plat_.infos.push_back(move(refl)); in ProcessShaderModule() 206 CollectRes(me.pipelineLayout_, me.plat_); in ProcessShaderModule() 247 return plat_; in GetPlatformData()
|
/ohos5.0/foundation/graphic/graphic_3d/lume/LumeEngine/src/os/ohos/ |
H A D | platform_ohos.cpp | 28 plat_.coreRootPath = createInfo.coreRootPath; in CORE_BEGIN_NAMESPACE() 29 plat_.appRootPath = createInfo.appRootPath; in CORE_BEGIN_NAMESPACE() 30 plat_.appPluginPath = createInfo.appPluginPath; in CORE_BEGIN_NAMESPACE() 31 plat_.hapPath = createInfo.hapPath; in CORE_BEGIN_NAMESPACE() 32 plat_.bundleName = createInfo.bundleName; in CORE_BEGIN_NAMESPACE() 33 plat_.moduleName = createInfo.moduleName; in CORE_BEGIN_NAMESPACE() 39 BASE_NS::string hapPath = plat_.hapPath; in RegisterDefaultPaths() 40 BASE_NS::string bundleName = plat_.bundleName; in RegisterDefaultPaths() 41 BASE_NS::string moduleName = plat_.moduleName; in RegisterDefaultPaths() 46 const BASE_NS::string coreDirectory = "file://" + plat_.coreRootPath; in RegisterDefaultPaths() [all …]
|
/ohos5.0/foundation/graphic/graphic_3d/lume/LumeEngine/src/os/linux/ |
H A D | platform_linux.cpp | 72 plat_.coreRootPath = fixPath(createInfo.coreRootPath); in PlatformLinux() 73 plat_.appRootPath = fixPath(createInfo.appRootPath); in PlatformLinux() 74 plat_.appPluginPath = fixPath(createInfo.appPluginPath); in PlatformLinux() 79 return plat_; in GetPlatformData()
|
/ohos5.0/foundation/graphic/graphic_3d/lume/LumeEngine/src/os/mac/ |
H A D | platform_mac.cpp | 72 plat_.coreRootPath = fixPath(createInfo.coreRootPath); in PlatformMac() 73 plat_.appRootPath = fixPath(createInfo.appRootPath); in PlatformMac() 74 plat_.appPluginPath = fixPath(createInfo.appPluginPath); in PlatformMac() 79 return plat_; in GetPlatformData()
|
/ohos5.0/foundation/graphic/graphic_3d/lume/LumeEngine/src/os/windows/ |
H A D | platform_windows.cpp | 92 plat_.coreRootPath = fixPath(createInfo.coreRootPath); in PlatformWindows() 93 plat_.appRootPath = fixPath(createInfo.appRootPath); in PlatformWindows() 94 plat_.appPluginPath = fixPath(createInfo.appPluginPath); in PlatformWindows() 99 return plat_; in GetPlatformData()
|
/ohos5.0/foundation/graphic/graphic_3d/lume/LumeRender/src/vulkan/ohos/ |
H A D | platform_gpu_image_vk.cpp | 61 plat_.image = hwBufferImage.image; in CreatePlatformHwBuffer() 64 if (plat_.format == VK_FORMAT_UNDEFINED) { in CreatePlatformHwBuffer() 109 …PlatformHardwareBufferUtil::DestroyHwPlatformImage(deviceVk, plat_.image, mem_.allocationInfo.devi… in DestroyPlatformHwBuffer()
|
H A D | platform_device_vk.cpp | 27 plat_.instance, "vkGetNativeBufferPropertiesOHOS"); in RENDER_BEGIN_NAMESPACE() 32 …(PFN_vkGetMemoryNativeBufferOHOS)vkGetInstanceProcAddr(plat_.instance, "vkGetMemoryNativeBufferOHO… in RENDER_BEGIN_NAMESPACE()
|