mirror of
https://github.com/MobileGL-Dev/MobileGL
synced 2026-09-11 05:38:31 +09:00
Merge branch 'dev' into Feat/Backend-Direct-Vulkan
This commit is contained in:
@@ -13,8 +13,8 @@ namespace MobileGL::MG_Backend::DirectVulkan {
|
|||||||
struct VulkanRendererConfig {
|
struct VulkanRendererConfig {
|
||||||
Uint32 MaxFramesInFlight = 2;
|
Uint32 MaxFramesInFlight = 2;
|
||||||
String AppName = "MobileGL-VulkanRenderer";
|
String AppName = "MobileGL-VulkanRenderer";
|
||||||
Version Version = MG_Config::CoreVersion;
|
MobileGL::Version Version = MG_Config::CoreVersion;
|
||||||
Uint64 CacheVersion = MG_Config::CacheVersion;
|
Uint64 CacheVersion = MG_Config::CacheVersion;
|
||||||
Bool EnableValidationLayers = true;
|
Bool EnableValidationLayers = true;
|
||||||
};
|
};
|
||||||
} // namespace MobileGL::MG_Backend::DirectVulkan
|
} // namespace MobileGL::MG_Backend::DirectVulkan
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ namespace MobileGL::MG_Impl::GLImpl {
|
|||||||
TextureUploadTarget textureUploadTarget, TextureTarget textureTarget) {
|
TextureUploadTarget textureUploadTarget, TextureTarget textureTarget) {
|
||||||
if (TextureImpl::IsProxyTextureTarget(textureUploadTarget)) {
|
if (TextureImpl::IsProxyTextureTarget(textureUploadTarget)) {
|
||||||
auto& textureObject =
|
auto& textureObject =
|
||||||
TextureImpl::pProxyTextureManager->CreateOrReplaceProxyTextureObject(textureUploadTarget);
|
TextureImpl::pProxyTextureManager->GetProxyTextureObject(textureUploadTarget);
|
||||||
if (!TextureImpl::ValidateTextureObject(textureObject)) return nullTextureObject;
|
if (!TextureImpl::ValidateTextureObject(textureObject)) return nullTextureObject;
|
||||||
return textureObject;
|
return textureObject;
|
||||||
} else {
|
} else {
|
||||||
@@ -554,9 +554,6 @@ namespace MobileGL::MG_Impl::GLImpl {
|
|||||||
|
|
||||||
textureObject->SetInternalFormat(textureInternalFormat);
|
textureObject->SetInternalFormat(textureInternalFormat);
|
||||||
|
|
||||||
// if isProxy, no more pixel transfer needed below
|
|
||||||
if (isProxy) return;
|
|
||||||
|
|
||||||
const void* originalPixels = pixels;
|
const void* originalPixels = pixels;
|
||||||
|
|
||||||
// PBO
|
// PBO
|
||||||
@@ -671,9 +668,6 @@ namespace MobileGL::MG_Impl::GLImpl {
|
|||||||
MG_Util::ConvertTextureInternalFormatToString(textureInternalFormat).c_str());
|
MG_Util::ConvertTextureInternalFormatToString(textureInternalFormat).c_str());
|
||||||
textureObject->SetInternalFormat(textureInternalFormat);
|
textureObject->SetInternalFormat(textureInternalFormat);
|
||||||
|
|
||||||
// if isProxy, no more pixel transfer needed below
|
|
||||||
if (isProxy) return;
|
|
||||||
|
|
||||||
const void* originalPixels = pixels;
|
const void* originalPixels = pixels;
|
||||||
|
|
||||||
// PBO
|
// PBO
|
||||||
@@ -797,7 +791,7 @@ namespace MobileGL::MG_Impl::GLImpl {
|
|||||||
auto& bindingSlot = activeUnit.GetBindingSlot(textureTarget);
|
auto& bindingSlot = activeUnit.GetBindingSlot(textureTarget);
|
||||||
Bool isProxy = TextureImpl::IsProxyTextureTarget(textureUploadTarget);
|
Bool isProxy = TextureImpl::IsProxyTextureTarget(textureUploadTarget);
|
||||||
auto& textureObject =
|
auto& textureObject =
|
||||||
isProxy ? TextureImpl::pProxyTextureManager->CreateOrReplaceProxyTextureObject(textureUploadTarget)
|
isProxy ? TextureImpl::pProxyTextureManager->GetProxyTextureObject(textureUploadTarget)
|
||||||
: bindingSlot.GetBoundObject();
|
: bindingSlot.GetBoundObject();
|
||||||
|
|
||||||
if (!TextureImpl::ValidateTextureObject(textureObject)) return;
|
if (!TextureImpl::ValidateTextureObject(textureObject)) return;
|
||||||
@@ -875,7 +869,7 @@ namespace MobileGL::MG_Impl::GLImpl {
|
|||||||
auto& bindingSlot = activeUnit.GetBindingSlot(textureTarget);
|
auto& bindingSlot = activeUnit.GetBindingSlot(textureTarget);
|
||||||
Bool isProxy = TextureImpl::IsProxyTextureTarget(textureUploadTarget);
|
Bool isProxy = TextureImpl::IsProxyTextureTarget(textureUploadTarget);
|
||||||
auto& textureObject =
|
auto& textureObject =
|
||||||
isProxy ? TextureImpl::pProxyTextureManager->CreateOrReplaceProxyTextureObject(textureUploadTarget)
|
isProxy ? TextureImpl::pProxyTextureManager->GetProxyTextureObject(textureUploadTarget)
|
||||||
: bindingSlot.GetBoundObject();
|
: bindingSlot.GetBoundObject();
|
||||||
|
|
||||||
if (!TextureImpl::ValidateTextureObject(textureObject)) return;
|
if (!TextureImpl::ValidateTextureObject(textureObject)) return;
|
||||||
@@ -967,7 +961,7 @@ namespace MobileGL::MG_Impl::GLImpl {
|
|||||||
auto& bindingSlot = activeUnit.GetBindingSlot(textureTarget);
|
auto& bindingSlot = activeUnit.GetBindingSlot(textureTarget);
|
||||||
Bool isProxy = TextureImpl::IsProxyTextureTarget(textureUploadTarget);
|
Bool isProxy = TextureImpl::IsProxyTextureTarget(textureUploadTarget);
|
||||||
auto& textureObject =
|
auto& textureObject =
|
||||||
isProxy ? TextureImpl::pProxyTextureManager->CreateOrReplaceProxyTextureObject(textureUploadTarget)
|
isProxy ? TextureImpl::pProxyTextureManager->GetProxyTextureObject(textureUploadTarget)
|
||||||
: bindingSlot.GetBoundObject();
|
: bindingSlot.GetBoundObject();
|
||||||
|
|
||||||
if (!TextureImpl::ValidateTextureObject(textureObject)) return;
|
if (!TextureImpl::ValidateTextureObject(textureObject)) return;
|
||||||
@@ -1039,6 +1033,7 @@ namespace MobileGL::MG_Impl::GLImpl {
|
|||||||
"pname is not a valid texture level parameter."));
|
"pname is not a valid texture level parameter."));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
MGLOG_D("returned %u",*params);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GetTexLevelParameterfv_State(GLenum target, GLint level, GLenum pname, GLfloat* params) {
|
void GetTexLevelParameterfv_State(GLenum target, GLint level, GLenum pname, GLfloat* params) {
|
||||||
@@ -1056,7 +1051,7 @@ namespace MobileGL::MG_Impl::GLImpl {
|
|||||||
auto& bindingSlot = activeUnit.GetBindingSlot(textureTarget);
|
auto& bindingSlot = activeUnit.GetBindingSlot(textureTarget);
|
||||||
Bool isProxy = TextureImpl::IsProxyTextureTarget(textureUploadTarget);
|
Bool isProxy = TextureImpl::IsProxyTextureTarget(textureUploadTarget);
|
||||||
auto& textureObject =
|
auto& textureObject =
|
||||||
isProxy ? TextureImpl::pProxyTextureManager->CreateOrReplaceProxyTextureObject(textureUploadTarget)
|
isProxy ? TextureImpl::pProxyTextureManager->GetProxyTextureObject(textureUploadTarget)
|
||||||
: bindingSlot.GetBoundObject();
|
: bindingSlot.GetBoundObject();
|
||||||
|
|
||||||
if (!TextureImpl::ValidateTextureObject(textureObject)) return;
|
if (!TextureImpl::ValidateTextureObject(textureObject)) return;
|
||||||
@@ -1395,7 +1390,7 @@ namespace MobileGL::MG_Impl::GLImpl {
|
|||||||
auto& bindingSlot = activeUnit.GetBindingSlot(textureTarget);
|
auto& bindingSlot = activeUnit.GetBindingSlot(textureTarget);
|
||||||
Bool isProxy = TextureImpl::IsProxyTextureTarget(textureUploadTarget);
|
Bool isProxy = TextureImpl::IsProxyTextureTarget(textureUploadTarget);
|
||||||
auto& textureObject =
|
auto& textureObject =
|
||||||
isProxy ? TextureImpl::pProxyTextureManager->CreateOrReplaceProxyTextureObject(textureUploadTarget)
|
isProxy ? TextureImpl::pProxyTextureManager->GetProxyTextureObject(textureUploadTarget)
|
||||||
: bindingSlot.GetBoundObject();
|
: bindingSlot.GetBoundObject();
|
||||||
|
|
||||||
if (!TextureImpl::ValidateTextureObject(textureObject)) {
|
if (!TextureImpl::ValidateTextureObject(textureObject)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user