mirror of
https://github.com/MobileGL-Dev/MobileGL
synced 2026-11-20 00:11:56 +09:00
[MG_Backend] (Disaggregated): P5f fm - keep wire endpoint and transform checks role local
This commit is contained in:
@@ -41,7 +41,12 @@ namespace MobileGL {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
Bool IsRenderbuffer() const { return Renderbuffer != nullptr; }
|
Bool IsRenderbuffer() const { return Renderbuffer != nullptr; }
|
||||||
Bool Exists() const { return Texture != nullptr || Renderbuffer != nullptr; }
|
Bool Exists() const {
|
||||||
|
#if MOBILEGL_BUILD_DISAGGREGATED
|
||||||
|
if (!MG_Pipe::MGPipeHandleIsNull(TextureHandle)) return true;
|
||||||
|
#endif
|
||||||
|
return Texture != nullptr || Renderbuffer != nullptr;
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
enum class FormatCapability : Uint64 {
|
enum class FormatCapability : Uint64 {
|
||||||
|
|||||||
@@ -3155,9 +3155,12 @@ void main() {
|
|||||||
inline ProgramFactory::CompileOptionFlags GetShaderTransformFlags(VkSurfaceTransformFlagBitsKHR preTransform) {
|
inline ProgramFactory::CompileOptionFlags GetShaderTransformFlags(VkSurfaceTransformFlagBitsKHR preTransform) {
|
||||||
ProgramFactory::CompileOptionFlags flags = ProgramFactory::CompileOptionBit::PositionZRemap;
|
ProgramFactory::CompileOptionFlags flags = ProgramFactory::CompileOptionBit::PositionZRemap;
|
||||||
#if MOBILEGL_BUILD_DISAGGREGATED
|
#if MOBILEGL_BUILD_DISAGGREGATED
|
||||||
const auto* wireFbo = MG_Config::Transport != MG_Config::TransportMode::Monolith ? MG_Pipe::MGPipeApplier().DrawFramebuffer() : nullptr;
|
const Bool wire = MG_Config::Transport != MG_Config::TransportMode::Monolith;
|
||||||
const Bool isDefault = wireFbo ? wireFbo->IsDefault :
|
const auto* wireFbo = wire ? MG_Pipe::MGPipeApplier().DrawFramebuffer() : nullptr;
|
||||||
MGB_CTX->GetFramebufferBindingSlot(FramebufferTarget::Draw).GetBoundObject()->IsDefaultFramebuffer();
|
const auto currentDrawFBO = wire ? SharedPtr<MG_State::GLState::FramebufferObject>{} :
|
||||||
|
MGB_CTX->GetFramebufferBindingSlot(FramebufferTarget::Draw).GetBoundObject();
|
||||||
|
const Bool isDefault = wire ? (wireFbo && wireFbo->IsDefault) :
|
||||||
|
(currentDrawFBO && currentDrawFBO->IsDefaultFramebuffer());
|
||||||
#else
|
#else
|
||||||
const auto& currentDrawFBO = MGB_CTX->GetFramebufferBindingSlot(FramebufferTarget::Draw).GetBoundObject();
|
const auto& currentDrawFBO = MGB_CTX->GetFramebufferBindingSlot(FramebufferTarget::Draw).GetBoundObject();
|
||||||
const Bool isDefault = currentDrawFBO != nullptr && currentDrawFBO->IsDefaultFramebuffer();
|
const Bool isDefault = currentDrawFBO != nullptr && currentDrawFBO->IsDefaultFramebuffer();
|
||||||
|
|||||||
Reference in New Issue
Block a user