mirror of https://github.com/PCSX2/pcsx2.git
gsdx-ogl: request texture barrier to emulate accurate date
Actually it can partially be done with GL_ARB_shader_image_load_store extension. However all drivers that support shader_image have texture barrier too.
This commit is contained in:
parent
2901e94ebc
commit
25bd5f5e85
|
@ -507,6 +507,7 @@ namespace GLLoader {
|
|||
if (!found_GL_ARB_texture_barrier) {
|
||||
fprintf(stderr, "Error GL_ARB_texture_barrier is not supported by your driver. You can't emulate correctly the GS blending unit! Sorry!\n");
|
||||
theApp.SetConfig("accurate_blending_unit", 0);
|
||||
theApp.SetConfig("accurate_date", 0);
|
||||
}
|
||||
|
||||
fprintf(stderr, "\n");
|
||||
|
|
|
@ -441,15 +441,16 @@ void GSRendererOGL::DrawPrims(GSTexture* rt, GSTexture* ds, GSTextureCache::Sour
|
|||
|
||||
// DATE: selection of the algorithm. Must be done before blending because GL42 is not compatible with blending
|
||||
|
||||
if (DATE) {
|
||||
if (GLLoader::found_GL_ARB_texture_barrier && (m_prim_overlap == PRIM_OVERLAP_NO)) {
|
||||
if (DATE && GLLoader::found_GL_ARB_texture_barrier) {
|
||||
if (m_prim_overlap == PRIM_OVERLAP_NO) {
|
||||
require_barrier = true;
|
||||
DATE_GL45 = true;
|
||||
DATE = false;
|
||||
} else if (m_accurate_date && om_csel.wa
|
||||
&& (!m_context->TEST.ATE || m_context->TEST.ATST == ATST_ALWAYS)) {
|
||||
// texture barrier will split the draw call into n draw call. It is very efficient for
|
||||
// few primitive draws. Otherwise it sucks.
|
||||
if (GLLoader::found_GL_ARB_texture_barrier && (m_index.tail < 100)) {
|
||||
if (m_index.tail < 100) {
|
||||
require_barrier = true;
|
||||
DATE_GL45 = true;
|
||||
DATE = false;
|
||||
|
@ -586,9 +587,7 @@ void GSRendererOGL::DrawPrims(GSTexture* rt, GSTexture* ds, GSTextureCache::Sour
|
|||
|
||||
// DATE (setup part)
|
||||
|
||||
if (DATE_GL45) {
|
||||
gl_TextureBarrier();
|
||||
} else if (DATE) {
|
||||
if (DATE) {
|
||||
GSVector4i dRect = ComputeBoundingBox(rtscale, rtsize);
|
||||
|
||||
// Reduce the quantity of clean function
|
||||
|
|
Loading…
Reference in New Issue