mirror of
https://github.com/blawar/GLideN64.git
synced 2024-07-04 10:03:36 +00:00
Force disable fragment depth writing in GLES2
This commit is contained in:
parent
a7ecc8534b
commit
acff19e66c
|
@ -823,7 +823,7 @@ void CombinerProgramUniformFactory::buildUniforms(GLuint _program,
|
||||||
if (m_glInfo.imageTextures && config.frameBufferEmulation.N64DepthCompare != 0)
|
if (m_glInfo.imageTextures && config.frameBufferEmulation.N64DepthCompare != 0)
|
||||||
_uniforms.emplace_back(new UDepthInfo(_program));
|
_uniforms.emplace_back(new UDepthInfo(_program));
|
||||||
|
|
||||||
if (config.generalEmulation.enableFragmentDepthWrite != 0)
|
if (!m_glInfo.isGLES2 && config.generalEmulation.enableFragmentDepthWrite != 0)
|
||||||
_uniforms.emplace_back(new URenderTarget(_program));
|
_uniforms.emplace_back(new URenderTarget(_program));
|
||||||
|
|
||||||
_uniforms.emplace_back(new UScreenCoordsScale(_program));
|
_uniforms.emplace_back(new UScreenCoordsScale(_program));
|
||||||
|
|
|
@ -21,6 +21,7 @@
|
||||||
#include "Combiner.h"
|
#include "Combiner.h"
|
||||||
#include "Performance.h"
|
#include "Performance.h"
|
||||||
#include "DisplayWindow.h"
|
#include "DisplayWindow.h"
|
||||||
|
#include <Graphics/Context.h>
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
|
@ -748,7 +749,7 @@ void gDPFillRectangle( s32 ulx, s32 uly, s32 lrx, s32 lry )
|
||||||
// If color is not depth clear color, that is most likely the case
|
// If color is not depth clear color, that is most likely the case
|
||||||
if (gDP.fillColor.color == DepthClearColor) {
|
if (gDP.fillColor.color == DepthClearColor) {
|
||||||
frameBufferList().fillRDRAM(ulx, uly, lrx, lry);
|
frameBufferList().fillRDRAM(ulx, uly, lrx, lry);
|
||||||
if (config.generalEmulation.enableFragmentDepthWrite == 0 ||
|
if (config.generalEmulation.enableFragmentDepthWrite == 0 || !gfxContext.isSupported(graphics::SpecialFeatures::FragmentDepthWrite) ||
|
||||||
(ulx == 0 && uly == 0 && lrx == gDP.scissor.lrx && lry == gDP.scissor.lry)) {
|
(ulx == 0 && uly == 0 && lrx == gDP.scissor.lrx && lry == gDP.scissor.lry)) {
|
||||||
drawer.clearDepthBuffer(ulx, uly, lrx, lry);
|
drawer.clearDepthBuffer(ulx, uly, lrx, lry);
|
||||||
bBufferCleared = true;
|
bBufferCleared = true;
|
||||||
|
@ -758,7 +759,7 @@ void gDPFillRectangle( s32 ulx, s32 uly, s32 lrx, s32 lry )
|
||||||
} else if (gDP.fillColor.color == DepthClearColor && gDP.otherMode.cycleType == G_CYC_FILL) {
|
} else if (gDP.fillColor.color == DepthClearColor && gDP.otherMode.cycleType == G_CYC_FILL) {
|
||||||
depthBufferList().saveBuffer(gDP.colorImage.address);
|
depthBufferList().saveBuffer(gDP.colorImage.address);
|
||||||
frameBufferList().fillRDRAM(ulx, uly, lrx, lry);
|
frameBufferList().fillRDRAM(ulx, uly, lrx, lry);
|
||||||
if (config.generalEmulation.enableFragmentDepthWrite == 0 ||
|
if (config.generalEmulation.enableFragmentDepthWrite == 0 || !gfxContext.isSupported(graphics::SpecialFeatures::FragmentDepthWrite) ||
|
||||||
(ulx == 0 && uly == 0 && lrx == gDP.scissor.lrx && lry == gDP.scissor.lry)) {
|
(ulx == 0 && uly == 0 && lrx == gDP.scissor.lrx && lry == gDP.scissor.lry)) {
|
||||||
drawer.clearDepthBuffer(ulx, uly, lrx, lry);
|
drawer.clearDepthBuffer(ulx, uly, lrx, lry);
|
||||||
bBufferCleared = true;
|
bBufferCleared = true;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user