summaryrefslogtreecommitdiffstats
path: root/src/video_core/renderer_opengl/gl_rasterizer_cache.h (unfollow)
Commit message (Collapse)AuthorFilesLines
2019-04-21Rasterizer Cache: Use a temporal storage for Surfaces loading/flushing.Fernando Sahmkow1-6/+15
This PR should heavily reduce memory usage since temporal buffers are no longer stored per Surface but instead managed by the Rasterizer Cache.
2019-04-20RasterizerCache Redesign: Flush Fernando Sahmkow1-4/+5
flushing is now responsability of children caches instead of the cache object. This change will allow the specific cache to pass extra parameters on flushing and will allow more flexibility.
2019-04-08gl_backend: Align Pixel StorageFernando Sahmkow1-0/+8
This commit makes sure GL reads on the correct pack size for the respective texture buffer.
2019-04-04video_core/renderer_opengl: Remove unnecessary includesLioncash1-2/+1
Quite a few unused includes have built up over time, particularly on core/memory.h. Removing these includes means the source files including those files will no longer need to be rebuilt if they're changed, making compilation slightly faster in this scenario.
2019-03-27video_core: Add missing override specifiersLioncash1-2/+2
Ensures that the signatures will always match with the base class. Also silences a few compilation warnings.
2019-03-22Revert "Devirtualize Register/Unregister and use a wrapper instead."bunnei1-2/+6
- Fixes graphical issues from transitions in Super Mario Odyssey.
2019-03-21gl_rasterizer_cache: Check that backing memory is valid before creating a surface.bunnei1-0/+5
- Fixes a crash in Puyo Puyo Tetris.
2019-03-21gpu: Move GPUVAddr definition to common_types.bunnei1-3/+3
2019-03-16video_core: Refactor to use MemoryManager interface for all memory access.bunnei1-2/+2
# Conflicts: # src/video_core/engines/kepler_memory.cpp # src/video_core/engines/maxwell_3d.cpp # src/video_core/morton.cpp # src/video_core/morton.h # src/video_core/renderer_opengl/gl_global_cache.cpp # src/video_core/renderer_opengl/gl_global_cache.h # src/video_core/renderer_opengl/gl_rasterizer_cache.cpp
2019-03-15gpu: Use host address for caching instead of guest address.bunnei1-7/+8
2019-02-28Devirtualize Register/Unregister and use a wrapper instead.Fernando Sahmkow1-6/+2
2019-02-28Corrections and redesign.Fernando Sahmkow1-9/+8
2019-02-28Fix linux compile error.Fernando Sahmkow1-1/+1
2019-02-28Remove NotifyFrameBuffer as we are doing a texception pass every drawcall.Fernando Sahmkow1-4/+0
2019-02-28Remove certain optimizations that caused texception to fail in certain scenarios.Fernando Sahmkow1-3/+0
2019-02-28Bug fixes and formattingFernando Sahmkow1-2/+1
2019-02-28rasterizer_cache_gl: Implement Texception PassFernando Sahmkow1-0/+5
2019-02-28rasterizer_cache_gl: Implement Partial Reinterpretation of Surfaces.Fernando Sahmkow1-0/+11
2019-02-28rasterizer_cache: mark reinterpreted surfaces and add ability to reload marked surfaces on next use.Fernando Sahmkow1-0/+73
2019-02-28rasterizer_cache_gl: Notify on framebuffer changeFernando Sahmkow1-1/+6
2019-02-27gl_rasterizer_cache: Create texture views for array discrepanciesReinUsesLisp1-20/+8
When a texture is sampled in a shader with a different array mode than the cached state, create a texture view and bind that to the shader instead.
2019-02-27common/math_util: Move contents into the Common namespaceLioncash1-4/+4
These types are within the common library, so they should be within the Common namespace.
2019-02-12gl_rasterizer_cache: Remove unnecessary newlineLioncash1-2/+0
2019-02-12gl_rasterizer_cache: Get rid of variable shadowingLioncash1-6/+14
Avoids shadowing the members of the struct itself, which results in a -Wshadow warning.
2019-02-09Implement linear textures (#2089)Fernando Sahmkow1-0/+2
2019-02-07gl_rasterizer_cache: Mark surface copy destinations as modified.bunnei1-0/+4
2019-02-07gl_rasterizer: Implement a more accurate fermi 2D copy.bunnei1-1/+3
- This is a blit, use the blit registers.
2019-01-30gl_rasterizer_cache: Move swizzling to textures instead of stateReinUsesLisp1-0/+6
2019-01-30gl_rasterizer: Use DSA for texturesReinUsesLisp1-1/+0
2019-01-30gl_shader_cache: Fix texture view for cubemaps as cubemap arraysReinUsesLisp1-1/+2
Cubemaps are considered layered and to create a texture view the texture mustn't be a layered texture, resulting in cubemaps being bound as cubemap arrays. To fix this issue this commit introduces an extra surface parameter called "is_array" and uses this to query for texture view creation. Now that texture views for cubemaps are actually being created, this also fixes the number of layers created for the texture view (since they have to be 6 to create a texture view of cubemaps).
2019-01-07gl_rasterizer_cache: Use dirty flags for the depth bufferReinUsesLisp1-0/+1
2019-01-07gl_rasterizer_cache: Use dirty flags for color buffersReinUsesLisp1-0/+2
2018-12-30gl_rasterizer_cache: Texture view if shader samples array but OGL is notReinUsesLisp1-3/+29
When a shader samples a texture array but that texture in OpenGL is created without layers, use a texture view to increase the texture hierarchy. For example, instead of binding a GL_TEXTURE_2D bind a GL_TEXTURE_2D_ARRAY view.
2018-12-09Add more info into textures' object labelsFernandoS271-0/+52
2018-11-26Implemented Tile Width SpacingFernandoS271-3/+10
2018-11-20Implemented Fast Layered CopyFernandoS271-0/+1
2018-11-08rasterizer_cache: Remove reliance on the System singletonLioncash1-1/+3
Rather than have a transparent dependency, we can make it explicit in the interface. This also gets rid of the need to put the core include in a header.
2018-11-02Fix ASTC Decompressor to support depth parameterFernandoS271-1/+1
2018-11-01Implement Cube ArraysFernandoS271-0/+2
2018-10-30video_core: Move surface declarations out of gl_rasterizer_cacheReinUsesLisp1-781/+8
2018-10-29renderer_opengl: Correct bpp value for ASTC_2D_8X5_SRGBRodolfo Bogado1-1/+1
2018-10-29Fixed mipmap block autosizing algorithmFernandoS271-9/+15
2018-10-29Fixed Block Resizing algorithm and Clang FormatFernandoS271-8/+15
2018-10-29Implement Mip FilterFernandoS271-2/+2
2018-10-28Implement MipmapsFernandoS271-7/+65
2018-10-28Correct bpp value for ASTC_2D_8X5Tobias1-1/+1
2018-10-28Implement sRGB Support, including workarounds for nvidia driver issues and QT sRGB supportRodolfo Bogado1-19/+61
2018-10-27Implement Default Block Height for each formatFernandoS271-0/+62
2018-10-23Fixed Layered Textures Loading and CubemapsFernandoS271-0/+40
2018-10-18Implement 3D TexturesFernandoS271-0/+3
2018-10-16gl_rasterizer_cache: Use AccurateCopySurface for use_accurate_gpu_emulation.bunnei1-0/+3
2018-10-16rasterizer_cache: Refactor to support in-order flushing.bunnei1-13/+4
2018-10-16gl_rasterizer_cache: Refactor to only call GetRegionEnd on surface creation.bunnei1-2/+5
2018-10-16gl_rasterizer_cache: Separate guest and host surface size managment.bunnei1-12/+26
2018-10-16gl_rasterizer_cache: Rename GetGLBytesPerPixel to GetBytesPerPixel.bunnei1-7/+8
- This does not really have anything to do with OpenGL.
2018-10-16gl_rasterizer_cache: Remove unused FlushSurface method.bunnei1-3/+0
2018-10-16gl_rasterizer_cache: Clamp cached surface size to mapped GPU region size.bunnei1-3/+8
2018-10-16gl_rasterizer_cache: Reintroduce code for handling swizzle and flush to guest RAM.bunnei1-0/+13
2018-10-13Added ASTC 5x4; 8x5Hexagon121-5/+15
2018-10-10Add memory Layout to Render Targets and Depth BuffersFernandoS271-4/+4
2018-10-10Fixed block height settings for RenderTargets and Depth Buffers, and added block width and block depthFernandoS271-1/+4
2018-10-06gl_rasterizer: Add rasterizer cache code to handle accerated fermi copies.bunnei1-0/+9
2018-09-30gl_rasterizer_cache: Fixes to how we do render to cubemap.bunnei1-23/+0
- Fixes issues with Splatoon 2.
2018-09-30gl_rasterizer_cache: Implement render to cubemap.bunnei1-0/+34
2018-09-30gl_rasterizer_cache: Add support for SurfaceTarget::TextureCubemap.bunnei1-0/+2
2018-09-30gl_rasterizer_cache: Track texture target and depth in the cache.bunnei1-2/+3
2018-09-30gl_rasterizer_cache: Workaround for Texture2D -> Texture2DArray scenario.bunnei1-2/+5
2018-09-30gl_rasterizer_cache: Keep track of surface 2D size separately from total size.bunnei1-6/+12
2018-09-23Added glObjectLabels for renderdoc for textures and shader programs (#1384)David1-0/+21
* Added glObjectLabels for renderdoc for textures and shader programs * Changed hardcoded "Texture" name to reflect the texture type instead * Removed string initialize
2018-09-16Implement ASTC_2D_8X8 (Bayonetta 2)raven021-5/+10
2018-09-15Implement RenderTargetFormat::BGR5A1_UNORM (Pokken Tournament DX)raven021-0/+3
2018-09-15Port #4182 from Citra: "Prefix all size_t with std::"fearlessTobi1-15/+17
2018-09-12gl_shader_cache: Remove cache_width/cache_height.bunnei1-6/+2
- This was once an optimization, but we no longer need it with the cache reserve. - This is also inaccurate.
2018-09-10gl_rasterizer_cache: Implement RenderTargetFormat::BGRA8_SRGB.bunnei1-0/+2
- Used by Octopath Traveler (with multiple render targets).
2018-09-10gl_rasterizer: Implement multiple color attachments.bunnei1-5/+6
2018-09-08gl_rasterizer_cache: Improve accuracy of RecreateSurface for non-2D textures.bunnei1-0/+4
2018-09-08gl_rasterizer_cache: Track texture depth.bunnei1-1/+2
2018-09-08gl_rasterizer_cache: Keep track of texture type per surface.bunnei1-1/+34
2018-09-08gl_rasterizer_cache: Remove unused DownloadGLTexture.bunnei1-1/+0
2018-08-31gl_rasterizer_cache: Also use reserve cache for RecreateSurface.bunnei1-12/+3
2018-08-31gl_renderer: Cache textures, framebuffers, and shaders based on CPU address.bunnei1-7/+4
2018-08-31Implement BC6H_UF16 & BC6H_SF16 (#1092)greggameplayer1-28/+38
* Implement BC6H_UF16 & BC6H_SF16 Require by ARMS * correct coding style * correct coding style part 2
2018-08-28gl_rasterizer_cache: Update to use RasterizerCache base class.bunnei1-27/+10
2018-08-23gl_rasterizer_cache: Reserve surfaces that have already been created for later use.bunnei1-0/+33
2018-08-22renderer_opengl: Namespace OpenGL codeLioncash1-0/+4
Namespaces all OpenGL code under the OpenGL namespace. Prevents polluting the global namespace and allows clear distinction between other renderers' code in the future.
2018-08-20Rasterizer: Don't attempt to copy over the old texture's data when doing a format reinterpretation if we're only going to clear the framebuffer.Subv1-2/+3
2018-08-20Implemented RGBA8_UINTDavid Marcec1-45/+53
Needed by kirby
2018-08-16gl_rasterizer_cache: Treat Depth formats differently from DepthStencil.bunnei1-8/+16
2018-08-15gl_rasterizer_cache: Cleanup some PixelFormat names and logging.bunnei1-26/+56
2018-08-15gl_rasterizer_cache: Add RGBA16U to PixelFormatFromTextureFormat.bunnei1-1/+9
- Used by Breath of the Wild.
2018-08-15Implement Z16_UNORM in PixelFormatFromTextureFormat functiongreggameplayer1-0/+2
Require by Zelda Breath Of The Wild
2018-08-15gl_rasterizer_cache: Implement G8R8S format.bunnei1-29/+40
- Used by Super Mario Odyssey.
2018-08-14renderer_opengl: Implement RenderTargetFormat::RGBA16_UNORM.bunnei1-37/+43
- Used by Breath of the Wild.
2018-08-13Implement RG32UI and R32UIDavid Marcec1-7/+35
Needed for xenoblade
2018-08-13renderer_opengl: Implement RenderTargetFormat::RGBA16_UINT.bunnei1-34/+40
- Used by Breath of the Wild.
2018-08-13renderer_opengl: Implement RenderTargetFormat::RG8_UNORM.bunnei1-6/+12
- Used by Breath of the Wild.
2018-08-12Implement R8_UINT RenderTargetFormat & PixelFormat (#1014)greggameplayer1-35/+49
- Used by Go Vacation
2018-08-12gl_rasterizer: Implement render target format RG8_SNORM.bunnei1-5/+11
- Used by Super Mario Odyssey.
2018-08-12gl_rasterizer: Implement render target format RGBA8_SNORM.bunnei1-43/+57
- Used by Super Mario Odyssey.
2018-08-11Implement R16S & R16UI & R16I RenderTargetFormats & PixelFormats and more (R16_UNORM needed by Fate Extella) (#848)greggameplayer1-12/+39
* Implement R16S & R16UI & R16I RenderTargetFormats & PixelFormats Do a separate function in order to get Bytes Per Pixel of DepthFormat Apply the new function in gpu.h delete unneeded white space * correct merging error
2018-08-10gl_rasterizer_cache: Remove unused viewport parameter of GetFramebufferSurfaces()Lioncash1-2/+1
2018-08-10textures: Refactor out for Texture/Depth FormatFromPixelFormat.bunnei1-86/+0
2018-08-10Implement SNORM for BC5/DXN2 (#998)Khangaroo1-26/+38
* Implement BC5/DXN2 (#996) - Used by Kirby Star Allies. * Implement BC5/DXN2 SNORM UNORM for Kirby Star Allies SNORM for Super Mario Odyssey
2018-08-09Implement BC5/DXN2 (#996)Khangaroo1-21/+28
- Used by Kirby Star Allies.
2018-08-08gl_rasterizer_cached: Implement RenderTargetFormat::B5G6R5_UNORM.bunnei1-0/+3
- Used by Super Mario Odyssey.
2018-08-08Fixed the sRGB pixel format (#963)Hexagon121-1/+2
* Changed the sRGB pixel format return * Add a message about SRGBA -> RGBA conversion
2018-08-06gl_rasterizer_cache: Avoid superfluous surface copies.bunnei1-0/+11
2018-08-02Implement RGB32F PixelFormat (#886) (used by Go Vacation)greggameplayer1-6/+13
2018-08-01Implement R32_FLOAT RenderTargetFormatUnknown1-0/+3
2018-07-26GPU: Allow using R16F as a render target format.Subv1-1/+3
2018-07-26Implement R16_G16Unknown1-6/+67
correct trailing white spaces Delete tabs correct placement Add RG16F & RG16UI & RG16I & RG16S PixelFormats Return correct data according to changes done previously correct PixelFormat declaration correct coding style error correct coding style error part 2 correct RG16S Declaration error correct alignment
2018-07-25GPU: Use the right texture format for sRGBA framebuffers.Subv1-6/+11
2018-07-25GPU: Allow the use of Z24S8 as a texture format.Subv1-0/+4
2018-07-25GPU: Implemented the Z32_S8_X24 depth buffer format.Subv1-0/+8
2018-07-25GPU: Allow using Z32 as a texture format.Subv1-0/+4
2018-07-25GPU: Allow the usage of R8 as a render target format.Subv1-0/+3
2018-07-24GPU: Implemented the R16 and R16F texture formats.Subv1-4/+23
2018-07-24GPU: Implement texture format R32F.Subv1-4/+11
2018-07-24gl_rasterizer_cache: Implement RenderTargetFormat RG32_FLOAT.bunnei1-4/+14
2018-07-24gl_rasterizer_cache: Implement RenderTargetFormat RGBA32_FLOAT.bunnei1-7/+27
2018-07-24gl_rasterizer_cache: Implement RenderTargetFormat BGRA8_UNORM.bunnei1-4/+14
2018-07-24gl_rasterizer_cache: Add missing log statements.bunnei1-0/+2
2018-07-22gl_rasterizer_cache: Blit surfaces on recreation instead of flush and load.bunnei1-0/+3
2018-07-22gl_rasterizer_cache: Use GPUVAddr as cache key, not parameter set.bunnei1-22/+16
2018-07-22gl_rasterizer_cache: Use zeta_width and zeta_height registers for depth buffer.bunnei1-3/+3
2018-07-15gl_rasterizer_cache: Implement texture format G8R8.bunnei1-4/+11
2018-07-15gl_rasterizer_cache: Implement depth format Z16_UNORM.bunnei1-0/+8
2018-07-07GPU: Implemented the BC7U texture format.Subv1-4/+11
Note: Our version of glad exports GL_COMPRESSED_RGBA_BPTC_UNORM as GL_COMPRESSED_RGBA_BPTC_UNORM_ARB, maybe it's time we update it.
2018-07-04GPU: Implemented the 32 bit float depth buffer format.Subv1-0/+9
2018-07-04GPU: Only configure the used framebuffers during clear.Subv1-2/+7
Don't try to configure the color buffer if it is not being cleared, it may not be completely valid at this point.
2018-07-03gl_rasterizer_cache: Implement PixelFormat S8Z24.bunnei1-0/+8
2018-07-03Rename logging macro back to LOG_*James Rowe1-7/+7
2018-07-02GPU: Implemented the Z24S8 depth format and load the depth framebuffer.Subv1-2/+45
2018-06-30GPU: Implemented the RGBA32_UINT rendertarget format.Subv1-5/+16
2018-06-27gl_rasterizer_cache: Implement caching for texture and framebuffer surfaces.bunnei1-3/+40
gl_rasterizer_cache: Improved cache management based on Citra's implementation. gl_surface_cache: Add some docstrings.
2018-06-27gl_rasterizer_cache: Various fixes for ASTC handling.bunnei1-6/+5
2018-06-27gl_rasterizer_cache: Use SurfaceParams as a key for surface caching.bunnei1-13/+33
2018-06-27gl_rasterizer: Implement AccelerateDisplay to forward textures to framebuffers.bunnei1-0/+11
2018-06-27gl_rasterizer_cache: Cache size_in_bytes as a const per surface.bunnei1-0/+1
2018-06-27gl_rasterizer_cache: Refactor to make SurfaceParams members const.bunnei1-13/+13
2018-06-27gl_rasterizer_cache: Remove Citra's rasterizer cache, always load/flush surfaces.bunnei1-274/+49
2018-06-18gl_rasterizer: Implement texture format ASTC_2D_4X4.bunnei1-0/+16
2018-06-06GPU: Implemented the R11FG11FB10F texture and rendertarget formats.Subv1-4/+14
2018-06-06GPU: Fixed the compression factor for RGBA16F textures.Subv1-1/+1
They're not compressed.
2018-06-02GPU: Implemented the DXN1 (BC4) texture format.Subv1-0/+7
2018-05-31gl_rasterizer_cache: Implement PixelFormat RGBA16F.bunnei1-3/+14
2018-05-30GPU: Implemented the R8 texture format (0x1D)Subv1-3/+10
2018-05-27GPU: Implemented the A1B5G5R5 texture format (0x14)Subv1-3/+12
2018-04-25gl_rasterizer_cache: Use CHAR_BIT for bpp conversions instead of 8.bunnei1-1/+1
2018-04-25gl_rasterizer_cache: Add a function for finding framebuffer GPU address.bunnei1-0/+3
2018-04-25gl_rasterizer_cache: Handle compressed texture sizes.bunnei1-4/+48
2018-04-25gl_rasterizer_cache: Update to be based on GPU addresses, not CPU addresses.bunnei1-11/+16
2018-04-23GPU: Implement the RGB10_A2 RenderTarget format, it will use the same format as the A2BGR10 texture format.Subv1-0/+2
2018-04-22GPU: Implement the A2BGR10 texture format.Subv1-3/+9
2018-04-19GPU: Add support for the DXT23 and DXT45 compressed texture formats.Subv1-3/+15
2018-04-19GPU: Implemented the B5G6R5 format.Subv1-3/+13
2018-04-18GLCache: Added boilerplate code to make supporting configurable texture component types.Subv1-0/+44
For now only the UNORM type is supported.
2018-04-18GLCache: Unify texture and framebuffer formats when converting to OpenGL.Subv1-13/+7
2018-04-18GPU: Texture format 8 and framebuffer format 0xD5 are actually ABGR8.Subv1-7/+7
2018-04-18GLCache: Take into account the texture's block height when caching and unswizzling.Subv1-0/+1
2018-04-18GLCache: Added a function to convert cached PixelFormats back to texture formats.Subv1-0/+12
TODO: The way we handle cached formats must change, framebuffer and texture formats are too different to keep them in the same place.
2018-04-18gl_rasterizer_cache: Add missing LOG statements.bunnei1-0/+3
2018-04-14renderer_opengl: Use OGLProgram instead of OGLShader.bunnei1-1/+1
2018-04-07RasterizerCache: Remove 3DS-specific pixel formats.Subv1-59/+30
We're only left with RGB8 and DXT1 for now. More will be added as they are needed.
2018-04-04gl_rasterizer_cache.h: Update from citra to yuzuN00byKing1-3/+3
2018-03-27gl_rasterizer_cache: Implement UpdatePagesCachedCount.bunnei1-1/+1
2018-03-27gl_rasterizer_cache: Implement GetFramebufferSurfaces.bunnei1-1/+10
2018-03-23gl_rasterizer: Implement AccelerateDisplay method from Citra.bunnei1-1/+11
2018-03-23video_core: Remove usage of PAddr and replace with VAddr.bunnei1-9/+9
2018-03-23renderer: Create rasterizer and cleanup.bunnei1-2/+2
2018-03-20renderer_gl: Port over gl_rasterizer_cache module from Citra.bunnei1-0/+350
2018-01-13Remove references to PICA and rasterizers in video_coreJames Rowe1-239/+0
2017-02-09VideoCore: Split regs.h inclusionsYuri Kunde Schlesner1-1/+2
2017-02-04VideoCore: Move Regs to its own fileYuri Kunde Schlesner1-1/+1
2017-02-04VideoCore: Split framebuffer regs from Regs structYuri Kunde Schlesner1-3/+3
2017-02-04VideoCore: Split texturing regs from Regs structYuri Kunde Schlesner1-2/+2
2017-01-29video_core: silence unused-local-typedef boost related warning on GCCKloen1-0/+7
2016-12-07OpenGL: Drop framebuffer completeness check.Markus Wick1-1/+1
This OpenGL call synchronize the worker thread of the nvidia blob. It can be verified on linux with the __GL_THREADED_OPTIMIZATIONS=1 environment variable. Those errors should not happen on tested drivers. It was used as a workaround for https://bugs.freedesktop.org/show_bug.cgi?id=94148
2016-12-04OpenGL: Non-zero stride only makes sense for linear buffersYuri Kunde Schlesner1-1/+2
2016-09-21Remove empty newlines in #include blocks.Emmanuel Gil Peyrot1-4/+0
This makes clang-format useful on those. Also add a bunch of forgotten transitive includes, which otherwise prevented compilation.
2016-09-19Manually tweak source formatting and then re-run clang-formatYuri Kunde Schlesner1-2/+2
2016-09-18Sources: Run clang-format on everything.Emmanuel Gil Peyrot1-33/+45
2016-04-30VideoCore: Run include-what-you-use and fix most includes.Emmanuel Gil Peyrot1-4/+10
2016-04-21HWRasterizer: Texture forwardingtfarley1-18/+191
2015-12-07OpenGL: Rename cache functions to better match what they actually doYuri Kunde Schlesner1-4/+4
2015-09-11video_core: Reorganize headersLioncash1-6/+6
2015-09-03OpenGL: Use Sampler Objects to decouple sampler config from texturesYuri Kunde Schlesner1-1/+6
Fixes #978
2015-08-28gl_rasterizer_cache: Detect and ignore unnecessary texture flushes.bunnei1-1/+3
2015-05-23OpenGL renderertfarley1-0/+36