summaryrefslogtreecommitdiff
path: root/Source/Core/VideoBackends/OGL/FramebufferManager.cpp
AgeCommit message (Collapse)Author
2018-10-20GLContext: Remove global context pointerStenzek
2018-10-20Refactoring and cleanup of GLInterface (now GLContext)Stenzek
2018-05-12Fix syntax error in GLSL_GSScore_Under
2018-05-12Remove stray quote signScore_Under
This allows GLSL_EFB_POKE_GEOMETRY_GS to compile again.
2018-05-08OGL: Fix broken format changes in i965 driverStenzek
2018-05-01OGL/FramebufferManager: Clean up inline GLSL codespycrab
2018-04-12Reformat all the things!spycrab
2018-02-22OGL: Track state of last bound vertex array objectStenzek
This reduces the overhead of calling glBindVertexArray() every time RestoreAPIState() is called, even when it is redundant.
2017-11-23OGL: Update the window size after swapping buffers, not beforeStenzek
Prevents us from rendering beyond the viewport bounds.
2017-11-18VideoConfig: Make StereoMode an enum classLioncash
Makes for more strongly-typed identifiers (and doesn't pollute surrounding namespaces)
2017-11-17Remove old XFB logiciwubcode
2017-11-17Add support for hybrid XFBiwubcode
2017-08-27OGL: Fix EFB pokes using incorrect color/depthStenzek
2017-06-27FramebufferManager: Fix EFB layers being attached to the wrong FBO.Jules Blok
Fixes typo in commit 56fe938366950062984e11364af5ce1ffe474f27.
2017-04-01OGL: Use ARB_texture_storage to allocate TextureCache entriesStenzek
This ensures that they are complete textures by decoding time, as when using compute shaders we write directly to the destination texture.
2017-03-17OGL: Fix texture_type checks in CreateTextureVincent Duvert
The FrameBufferManager::CreateTexture (from the OpenGL backend) method introduced by commit 69cedf41 incorrectly compares the texture variable (which contains a name provided by glGenTextures) against GL_TEXTURE_2D_MULTISAMPLE_ARRAY and GL_TEXTURE_2D_MULTISAMPLE. It should instead use the texture_type variable for this (as done in the first branch of the if).
2017-03-15OGL: only create stencil buffer when neededMichael Maltese
2017-03-15OGL: implement Bounding Box on systems w/o SSBOMichael Maltese
This commit should have zero performance effect if SSBOs are supported. If they aren't (e.g. on all Macs), this commit alters FramebufferManager to attach a new stencil buffer and VertexManager to draw to it when bounding box is active. `BBoxRead` gets the pixel data from the buffer and dumbly loops through it to find the bounding box. This patch can run Paper Mario: The Thousand-Year Door at almost full speed (50–60 FPS) without Dual-Core enabled for all common bounding box-using actions I tested (going through pipes, Plane Mode, Paper Mode, Prof. Frankly's gate, combat, walking around the overworld, etc.) on my computer (macOS 10.12.3, 2.8 GHz Intel Core i7, 16 GB 1600 MHz DDR3, and Intel Iris 1536 MB). A few more demanding scenes (e.g. the self-building bridge on the way to Petalburg) slow to ~15% of their speed without this patch (though they don't run quite at full speed even on master). The slowdown is caused almost solely by `glReadPixels` in `OGL::BoundingBox::Get`. Other implementation ideas: - Use a stencil buffer that's separate from the depth buffer. This would require ARB_texture_stencil8 / OpenGL 4.4, which isn't available on macOS. - Use `glGetTexImage` instead of `glReadPixels`. This is ~5 FPS slower on my computer, presumably because it has to transfer the entire combined depth-stencil buffer instead of only the stencil data. Getting only stencil data from `glGetTexImage` requires ARB_texture_stencil8 / OpenGL 4.4, which (again) is not available on macOS. - Don't use a PBO, and use `glReadPixels` synchronously. This has no visible performance effect on my computer, and is theoretically slower.
2017-03-15extract OGL::FramebufferManager::BindLayeredTextureMichael Maltese
2017-03-15extract OGL::FramebufferManager::CreateTextureMichael Maltese
2017-02-03FramebufferManagerBase: Return a std::pair from GetTargetSizeLioncash
Keeps associated data together. It also eliminates the possibility of out parameters not being initialized properly. For example, consider the following example: -- some FramebufferManager implementation -- void FBMgrImpl::GetTargetSize(u32* width, u32* height) override { // Do nothing } -- somewhere else where the function is used -- u32 width, height; framebuffer_manager_instance->GetTargetSize(&width, &height); if (texture_width != width) <-- Uninitialized variable usage { ... } It makes it much more obvious to spot any initialization issues, because it requires something to be returned, as opposed to allowing an implementation to just not do anything.
2017-02-01ShaderGenCommon: Remove unnecessary includesLioncash
2017-01-23RenderBase: Forward declare EFBAccessTypeLioncash
2017-01-23VideoBackendBase: Convert EFBAccessType into an enum classLioncash
2016-12-27Vulkan/GL: Set the alpha channel to 0 when creating the EFB framebufferStenzek
2016-09-09OGL: Remove unnecessary c_str callsLioncash
2016-06-24Reformat all the things. Have fun with merge conflicts.Pierre Bourdon
2016-01-07FrameBufferManager: Fix typo in stereoscopic MSAA shader.Jules Blok
2015-12-30Merge pull request #3361 from stenzek/d3d-vectored-efb-pokesMarkus Wick
D3D: Implement vectored efb pokes
2015-12-26ShaderGeneration: Get rid of static buffersLioncash
2015-12-22FramebufferManager: Get rid of raw new and deleteLioncash
2015-12-21FramebufferManagerBase: Get rid of explicit delete and newLioncash
2015-12-20VideoCommon: Change PokeEFB to take a pointer rather than a vectorStenzek
This saves allocating a vector for the pass-through path.
2015-09-28Fix building with PCH disabled.Rohit Nirmal
2015-09-22Move GL interface code out of the OpenGL video backend.Scott Mansell
2015-09-05Properly support MSAA and SSAA as separate features(+GLES)Ryan Houdek
SSAA relies on MSAA being active to work. We only supports 4x SSAA while in fact you can enable SSAA at any MSAA level. I even managed to run 64xMSAA + SSAA on my Quadro which made some pretty sleek looking games. They were very cinematic though. With this, it properly fixes up SSAA and MSAA support in GLES as well. Before they were broken when stereo rendering was enabled. Now in GLES they can properly support MSAA and also stereo rendering with MSAA enabled(with proper extensions).
2015-07-25Video: respect stride of efb copies to xfbbooto
2015-06-07Fix OpenGL ES shader compilation.Ryan Houdek
2015-06-06Revert "Revert "OGL: Switch depth buffers to GL_DEPTH_COMPONENT32F format.""Jules Blok
This reverts commit 9ef1ca4141e8211fce7a2b852b5c58d59393baac.
2015-06-06Revert "Revert "OGL: Change the depth buffer type to GL_FLOAT.""Jules Blok
This reverts commit 05d60f4fef5fb7377ed1f2f905b48e93926501b3.
2015-06-02OGL: Rewrite POKE_Z with a draw calldegasus
It's now also merged and it should be faster than the glClear way.
2015-06-02Fix invalid enums on OpenGLESDwayne Slater
2015-05-29OGL: Always use sampler objects.degasus
We are used to use the texture parameter for all util draw calls, but AMD seems to have a bug where they use the sampler parameter of stage 0 if no sampler is bound to the used stage. So as workaround (and a bit as nicer code), we now use sampler objects everywhere.
2015-05-27OGL: use GL_TEXTURE* constantsTillmann Karras
2015-05-25Merge pull request #2357 from degasus/ogl_efb_poke_mergeRyan Houdek
ogl: efb poke merge
2015-05-25Set copyright year to when a file was createdTillmann Karras
2015-05-25Update license headers to GPLv2+Tillmann Karras
2015-05-20Revert "OGL: Change the depth buffer type to GL_FLOAT."Jules Blok
This reverts commit 4b2e04b862ef0e5166f1c855148a44bc7c88f381.
2015-05-20Revert "OGL: Switch depth buffers to GL_DEPTH_COMPONENT32F format."Jules Blok
This reverts commit be810eb75038bce43054d9a4443d59c5ddf0be83.
2015-05-20OGL: reimplement poke-colordegasus