mirror of
https://github.com/MobileGL-Dev/MobileGL
synced 2026-09-09 20:58:31 +09:00
Merge remote-tracking branch 'refs/remotes/origin/Feat/Backend-Direct-GLES' into Feat/Backend-Direct-GLES
This commit is contained in:
@@ -373,7 +373,11 @@ namespace MobileGL::MG_Backend::DirectGLES {
|
||||
#ifdef TRACY_ENABLE
|
||||
ZoneScopedC(TRACY_ZONECOLOR_BACKEND);
|
||||
#endif
|
||||
const auto& currentFBO = MG_State::pGLContext->GetFramebufferBindingSlot(target).GetBoundObject();
|
||||
auto& slot = MG_State::pGLContext->GetFramebufferBindingSlot(target);
|
||||
if (slot.GetVersion() == FramebufferImpl::g_fboBindVersions[(SizeT)target])
|
||||
return;
|
||||
|
||||
const auto& currentFBO = slot.GetBoundObject();
|
||||
if (currentFBO && currentFBO != MG_Impl::GLImpl::FramebufferImpl::pDefaultFramebufferInfo->defaultFBO) {
|
||||
const auto& backendFBOIt = FramebufferImpl::g_backendFramebufferObjects.find(currentFBO);
|
||||
if (backendFBOIt != FramebufferImpl::g_backendFramebufferObjects.end()) {
|
||||
|
||||
@@ -603,7 +603,8 @@ namespace MobileGL::MG_Backend::DirectGLES {
|
||||
return;
|
||||
}
|
||||
|
||||
Uint currentSamplerVersion = stateTextureObject->GetSamplerObject()->GetVersion();
|
||||
auto* samplerObject = stateTextureObject->GetSamplerObject().get();
|
||||
Uint currentSamplerVersion = samplerObject->GetVersion();
|
||||
if (m_syncedSamplerVersion == currentSamplerVersion) {
|
||||
MGLOG_D("Sampler parameters have not changed for texture ID: %u, skipping sync.", m_backendTextureId);
|
||||
return;
|
||||
@@ -631,7 +632,7 @@ namespace MobileGL::MG_Backend::DirectGLES {
|
||||
|
||||
// Update built-in sampler parameters
|
||||
MGLOG_D("Updating sampler parameters for texture with ID: %u", m_backendTextureId);
|
||||
const auto& samplerParams = stateTextureObject->GetSamplerObject()->GetAllSamplerParameters();
|
||||
const auto& samplerParams = samplerObject->GetAllSamplerParameters();
|
||||
|
||||
#define SYNC_TEX_SAMPLER_PARAM_IF_CHANGED(internalName, glName, type) \
|
||||
if (m_cacheSamplerParameters.internalName != samplerParams.internalName) { \
|
||||
|
||||
Reference in New Issue
Block a user