summaryrefslogtreecommitdiffstats
path: root/src/video_core/renderer_opengl/gl_rasterizer.cpp (unfollow)
Commit message (Collapse)AuthorFilesLines
2018-11-27Implement depth clampRodolfo Bogado1-0/+16
2018-11-27GPU States: Implement Polygon Offset. This is used in SMO all the time. (#1784)Marcos1-1/+11
* GPU States: Implement Polygon Offset. This is used in SMO all the time. * Clang Format fixes. * Initialize polygon_offset in the constructor.
2018-11-25Limit the amount of viewports tested for state changes only to the usable onesRodolfo Bogado1-2/+10
2018-11-24Add support for viewport_transfom_enable registerRodolfo Bogado1-5/+13
2018-11-24Add support for clear_flags registerRodolfo Bogado1-6/+38
2018-11-21Removed pre 4.3 ARB extensionsFernandoS271-5/+0
2018-11-19gl_rasterizer: Remove default clip distanceReinUsesLisp1-2/+0
2018-11-18drop support for non separate alpha as it seems to cause issues in some gamesRodolfo Bogado1-18/+16
2018-11-17fix sampler configuration, thanks to Marcos for his investigationRodolfo Bogado1-17/+38
2018-11-17small type fixRodolfo Bogado1-6/+6
2018-11-17add AlphaToCoverage and AlphaToOneRodolfo Bogado1-0/+7
2018-11-17add support for fragment_color_clampRodolfo Bogado1-0/+6
2018-11-17set border color not depending on the wrap modeRodolfo Bogado1-9/+9
only enable color mask for the first framebuffer id independent blending is disabled
2018-11-17set default value for point size registerRodolfo Bogado1-5/+1
2018-11-17fix viewport and scissor behaviorRodolfo Bogado1-16/+17
2018-11-17gl_rasterizer: Skip VB upload if the state is clean.Markus Wick1-4/+20
2018-11-11Use core extensions when available to set max anisotropic filtering levelRodolfo Bogado1-2/+7
2018-11-11Improve state management by splitting some of the states id separated function to avoid a full apply overheadRodolfo Bogado1-31/+23
2018-11-11Try to fix problems with stencil test in some games, relax translation to opengl enums to avoid crashing and only generate logs of the errors.Rodolfo Bogado1-4/+10
2018-11-11set sampler max lod, min lod, lod bias and max anisotropyRodolfo Bogado1-10/+21
2018-11-08gl_rasterizer: Fix compiler warningsFrederic Laing1-2/+2
2018-11-08rasterizer_cache: Remove reliance on the System singletonLioncash1-1/+2
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-06gl_rasterizer: Skip VAO binding if the state is clean.Markus Wick1-2/+7
2018-11-06gl_rasterizer: Split VAO and VB setup functions.Markus Wick1-4/+14
2018-11-05Add support to color mask to avoid issues in blending caused by wrong values in the alpha channel in some render targets.Rodolfo Bogado1-5/+18
2018-11-05Implement multi-target viewports and blendingRodolfo Bogado1-39/+56
2018-10-31Improve OpenGL state handlingRodolfo Bogado1-3/+1
2018-10-30video_core: Move surface declarations out of gl_rasterizer_cacheReinUsesLisp1-3/+4
2018-10-30global: Use std::optional instead of boost::optional (#1578)Frederic L1-1/+1
* get rid of boost::optional * Remove optional references * Use std::reference_wrapper for optional references * Fix clang format * Fix clang format part 2 * Adressed feedback * Fix clang format and MacOS build
2018-10-29Implement Mip FilterFernandoS271-3/+7
2018-10-28Implement sRGB Support, including workarounds for nvidia driver issues and QT sRGB supportRodolfo Bogado1-1/+12
2018-10-26gl_rasterizer: Implement primitive restart.bunnei1-0/+8
2018-10-26gl_rasterizer: Implement depth range.bunnei1-5/+5
2018-10-22Assert that multiple render targets are not set while alpha testingFernandoS271-0/+12
2018-10-22Use standard UBO and fix/stylize the codeFernandoS271-15/+0
2018-10-22Cache uniform locations and restructure the implementationFernandoS271-22/+4
2018-10-22Remove SyncAlphaTest and clang formatFernandoS271-2/+5
2018-10-22Added Alpha FuncFernandoS271-1/+9
2018-10-22Implemented Alpha TestingFernandoS271-0/+11
2018-10-19fermi_2d: Add support for more accurate surface copies.bunnei1-0/+6
2018-10-16config: Rename use_accurate_framebuffers -> use_accurate_gpu_emulation.bunnei1-2/+2
- This will be used as a catch-all for slow-but-accurate GPU emulation paths.
2018-10-16rasterizer_cache: Refactor to support in-order flushing.bunnei1-6/+3
2018-10-16gl_rasterizer_cache: Only flush when use_accurate_framebuffers is enabled.bunnei1-1/+6
2018-10-16gl_rasterizer: Implement flushing.bunnei1-1/+25
2018-10-15gl_rasterizer: Silence implicit cast warning in glBindBufferRangeReinUsesLisp1-1/+2
2018-10-09Implement Scissor TestFernandoS271-4/+9
2018-10-09Assert Scissor testsFernandoS271-0/+12
2018-10-07gl_shader_decompiler: Implement geometry shadersReinUsesLisp1-14/+26
2018-10-07gl_rasterizer: Fixup undefined behaviour in SetupDrawReinUsesLisp1-0/+1
2018-10-06Implemented Depth Compare and Shadow SamplersFernandoS271-0/+18
2018-10-06gl_rasterizer: Add rasterizer cache code to handle accerated fermi copies.bunnei1-7/+3
2018-10-04gl_rasterizer: Implement quads topologyReinUsesLisp1-43/+103
2018-10-01gl_rasterizer: Fixup unassigned point sizesReinUsesLisp1-1/+4
2018-09-30gl_rasterizer_cache: Workaround for Texture2D -> Texture2DArray scenario.bunnei1-1/+1
2018-09-28video_core: Implement point_size and add point state syncReinUsesLisp1-0/+7
2018-09-26video_core: Add asserts for CS, TFB and alpha testingReinUsesLisp1-0/+22
Add asserts for compute shader dispatching, transform feedback being enabled and alpha testing. These have in common that they'll probably break rendering without logging.
2018-09-21RasterizerGL: Use the correct framebuffer when clearing via the CLEAR_BUFFERS register.Subv1-1/+1
Previously we were clearing the default backbuffer framebuffer. Found thanks to a Piglit test :)
2018-09-19gl_rasterizer: Fix StartAddress handling with indexed draw calls.Markus Wick1-6/+7
We uploaded the wrong data before. So the offset on the host GPU pointer may work for the first vertices, the last ones run out bounds. Let's just offset the upload instead.
2018-09-15Port #4182 from Citra: "Prefix all size_t with std::"fearlessTobi1-15/+15
2018-09-13Use ARB_multi_bind for uniform buffers (#1287)ReinUsesLisp1-3/+22
* gl_rasterizer: use ARB_multi_bind for uniform buffers * address feedback
2018-09-10rasterizer: Drop unused handler.Markus Wick1-2/+0
This virtual function is called in a very hot spot, and it does nothing. If this kind of feature is required, please be more specific and add callbacks in the switch statement within Maxwell3D::WriteReg. There is no point in having another switch statement within the rasterizer.
2018-09-10gl_rasterizer: Implement clear for non-zero render targets.bunnei1-48/+55
- Several misc. changes to ConfigureFramebuffers in support of this.
2018-09-10gl_rasterizer: Implement multiple color attachments.bunnei1-69/+45
2018-09-08gl_rasterizer: Use baseInstance instead of moving the buffer points.bunnei1-21/+25
This hopefully helps our cache not to redundant upload the vertex buffer. # Conflicts: # src/video_core/renderer_opengl/gl_rasterizer.cpp
2018-09-08video_core: Arithmetic overflow warning fix for gl_rasterizer (#1262)Patrick Elsässer1-12/+14
* video_core: Arithmetic overflow fix for gl_rasterizer - Fixed warnings, which were indicating incorrect behavior from integral promotion rules and types larger than those in which arithmetic is typically performed. - Added const for variables where possible and meaningful. * Changed the casts from C to C++ style Changed the C-style casts to C++ casts as proposed. Took also care about signed / unsigned behaviour.
2018-09-08gl_rasterizer: Implement texture wrap mode p.bunnei1-2/+7
2018-09-08gl_rasterizer_cache: Keep track of texture type per surface.bunnei1-0/+1
2018-09-08gl_state: Keep track of texture target.bunnei1-3/+3
2018-09-06gl_rasterizer: Call state.Apply only once on SetupShaders.bunnei1-4/+2
2018-09-05gl_rasterizer: Implement a VAO cache.Markus Wick1-48/+48
This patch caches VAO objects instead of re-emiting all pointers per draw call. Configuring this pointers is known as a fast task, but it yields too many GL calls. So for better performance, just bind the VAO instead of 16 pointers.
2018-09-05renderer_opengl: Implement a buffer cache.Markus Wick1-74/+27
The idea of this cache is to avoid redundant uploads. So we are going to cache the uploaded buffers within the stream_buffer and just reuse the old pointers. The next step is to implement a VBO cache on GPU memory, but for now, I want to check the overhead of the cache management. Fetching the buffer over PCI-E should be quite fast.
2018-09-04gl_shader_cache: Use an u32 for the binding point cache.Markus Wick1-2/+2
The std::string generation with its malloc and free requirement was a noticeable overhead. Also switch to an ordered_map to avoid the std::hash call. As those maps usually have a size of two elements, the lookup time shall not matter.
2018-09-04Update microprofile scopes.Markus Wick1-3/+11
Blame the subsystems which deserve the blame :) The updated list is not complete, just the ones I've spotted on random sampling the stack trace.
2018-08-31gl_rasterizer_cache: Use accurate framebuffer setting for accurate copies.bunnei1-20/+0
2018-08-31gl_renderer: Cache textures, framebuffers, and shaders based on CPU address.bunnei1-11/+8
2018-08-31gl_rasterizer: Fix issues with the rasterizer cache.bunnei1-0/+38
- Use a single cached page map. - Fix calculation of ending page.
2018-08-28gpu: Make memory_manager privateLioncash1-2/+2
Makes the class interface consistent and provides accessors for obtaining a reference to the memory manager instance. Given we also return references, this makes our more flimsy uses of const apparent, given const doesn't propagate through pointers in the way one would typically expect. This makes our mutable state more apparent in some places.
2018-08-28gl_rasterizer: Remove unused variablesLioncash1-2/+0
2018-08-28renderer_opengl: Implement a new shader cache.bunnei1-59/+25
2018-08-28gl_rasterizer_cache: Update to use RasterizerCache base class.bunnei1-4/+1
2018-08-24gl_rasterizer: Correct assertion condition in SyncLogicOpState()Lioncash1-1/+2
Previously the assert would always be hit, since it was the equivalent of: array == nullptr, which is never true.
2018-08-23gl_rasterizer: Implement stencil test.bunnei1-4/+31
- Used by Splatoon 2.
2018-08-23gl_rasterizer: Implement partial color clear and stencil clear.bunnei1-12/+42
2018-08-22gl_shader_gen: Use a std::vector to represent program code instead of std::arrayLioncash1-1/+1
While convenient as a std::array, it's also quite a large set of data as well (32KB). It being an array also means data cannot be std::moved. Any situation where the code is being set or relocated means that a full copy of that 32KB data must be done. If we use a std::vector we do need to allocate on the heap, however, it does allow us to std::move the data we have within the std::vector into another std::vector instance, eliminating the need to always copy the program data (as std::move in this case would just transfer the pointers and bare necessities over to the new vector instance).
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-21GPU: Implemented the logic op functionality of the GPU.Subv1-0/+18
This will ASSERT if blending is enabled at the same time as logic ops.
2018-08-21rasterizer_interface: Remove ScreenInfo from AccelerateDraw()'s signatureLioncash1-4/+3
This is an OpenGL renderer-specific data type. Given that, this type shouldn't be used within the base interface for the rasterizer. Instead, we can pass this information to the rasterizer via reference.
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-4/+5
2018-08-18GLRasterizer: Implemented instanced vertex arrays.Subv1-3/+16
Before each draw call, for every enabled vertex array configured as instanced, we take the current instance id and divide it by its configured divisor, then we multiply that by the corresponding stride and increment the start address by the resulting amount. This way we can simulate the vertex array being incremented once per instance without actually using OpenGL's instancing functions.
2018-08-15Rasterizer: Implemented instanced rendering.Subv1-1/+1
We keep track of the current instance and update an uniform in the shaders to let them know which instance they are. Instanced vertex arrays are not yet implemented.
2018-08-15gl_rasterizer: Fix upload size for constant buffers.bunnei1-3/+3
2018-08-12gl_rasterizer: Use a shared helper to upload from CPU memory.Markus Wick1-28/+29
2018-08-12gl_state: Don't track constant buffer mappings.Markus Wick1-15/+3
2018-08-12gl_rasterizer: Use the stream buffer for constant buffers.Markus Wick1-20/+19
2018-08-12gl_rasterizer: Use the streaming buffer itself for the constant buffer.Markus Wick1-31/+14
Don't emut copies, especially not for data, which is used once. They just end in a huge GPU overhead.
2018-08-12gl_rasterizer: Use a helper for aligning the buffer.Markus Wick1-14/+19
2018-08-12Update the stream_buffer helper from Citra.Markus Wick1-22/+14
Please see https://github.com/citra-emu/citra/pull/3666 for more details.
2018-08-12RasterizerGL: Ignore invalid/unset vertex attributes.Subv1-1/+6
This should make the es2gears example not crash anymore.
2018-08-12gl_rasterizer: Silence implicit truncation warning in SetupShaders()Lioncash1-1/+1
Previously this would warn of truncating a std::size_t to a u32. This is safe because we'll obviously never have more than UINT32_MAX amount of uniform buffers.
2018-08-12core: Namespace EmuWindowLioncash1-1/+1
Gets the class out of the global namespace.
2018-08-10Revert "gl_state: Temporarily disable culling and depth test."bunnei1-3/+1
2018-08-10gl_rasterizer_cache: Remove unused viewport parameter of GetFramebufferSurfaces()Lioncash1-4/+3
2018-08-09gl_rasterizer: Do not render when no render target is configured.bunnei1-0/+5
- Used by Super Mario Odyssey.
2018-08-08maxwell_3d: Use correct const buffer size and check bounds.bunnei1-1/+4
- Fixes mem corruption with Super Mario Odyssey and Pokkén Tournament DX.
2018-08-08renderer_opengl: Use trace log in a few places.bunnei1-1/+1
2018-08-05added braces for conditionsDavid Marcec1-2/+3
2018-08-05fix the attrib format for intsDavid Marcec1-2/+7
2018-08-02video_core: Make global EmuWindow instance part of the base renderer classLioncash1-4/+3
Makes the global a member of the RendererBase class. We also change this to be a reference. Passing any form of null pointer to these functions is incorrect entirely, especially given the code itself assumes that the pointer would always be in a valid state. This also makes it easier to follow the lifecycle of instances being used, as we explicitly interact the renderer with the rasterizer, rather than it just operating on a global pointer.
2018-07-24gl_rasterizer: Replace magic number with GL_INVALID_INDEX in SetupConstBuffers()Lioncash1-3/+5
This is just the named constant that OpenGL provides, so we can use that instead of using a literal -1
2018-07-24gl_rasterizer: Use std::string_view instead of std::string when checking for extensionsLioncash1-1/+3
We can avoid heap allocations here by just using a std::string_view instead of performing unnecessary copying of the string data.
2018-07-24gl_rasterizer: Use in-class member initializers where applicableLioncash1-7/+0
We can just assign to the members directly in these cases.
2018-07-24gl_rasterizer: Implement texture border color.bunnei1-3/+6
2018-07-22gl_rasterizer_cache: Use GPUVAddr as cache key, not parameter set.bunnei1-10/+14
2018-07-22gl_rasterizer: Use zeta_enable register to enable depth buffer.bunnei1-2/+2
2018-07-21gpu: Rename Get3DEngine() to Maxwell3D()Lioncash1-5/+5
This makes it match its const qualified equivalent.
2018-07-19gl_state: Temporarily disable culling and depth test.bunnei1-1/+3
2018-07-19core: Don't construct instance of Core::System, just to access its live instanceLioncash1-13/+13
This would result in a lot of allocations and related object construction, just to toss it all away immediately after the call. These are definitely not intentional, and it was intended that all of these should have been accessing the static function GetInstance() through the name itself, not constructed instances.
2018-07-14OpenGL: Use MakeCurrent/DoneCurrent for multithreaded rendering.bunnei1-0/+6
2018-07-14GPU: Always enable the depth write when clearing the depth buffer.Subv1-3/+8
The GPU ignores that register when clearing, but OpenGL obeys the glDepthMask parameter, so we set the depth mask to GL_TRUE when clearing the depth buffer. It will be restored to the correct value automatically on the next draw call.
2018-07-13gl_rasterizer: Fix check for if a shader stage is enabled.bunnei1-11/+3
2018-07-13gl_shader_gen: Implement dual vertex shader mode.bunnei1-10/+33
- When VertexA shader stage is enabled, we combine with VertexB program to make a single Vertex Shader stage.
2018-07-08gl_rasterizer: Flip triangles when regs.viewport_transform[0].scale_y is negative.bunnei1-1/+4
- Fixes a regression with Binding of Isaac.
2018-07-04GPU: Ignore textures that the GLSL compiler deemed unused when binding textures to the shaders.Subv1-1/+4
2018-07-04GPU: Flip the triangle front face winding if the GPU is configured to not flip the triangles.Subv1-0/+10
OpenGL's default behavior is already correct when the GPU is configured to flip the triangles. This fixes 1-2 Switch's splash screen.
2018-07-04GPU: Only configure the used framebuffers during clear.Subv1-7/+13
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-03GPU: Factor out the framebuffer configuration code for both Clear and Draw commands.Subv1-72/+34
2018-07-03GPU: Support clears that don't clear the color buffer.Subv1-4/+14
2018-07-03GPU: Bind and clear the render target when the CLEAR_BUFFERS register is written to.Subv1-0/+71
2018-07-03gl_rasterizer: Only set cull mode and front face if enabled.bunnei1-2/+5
2018-07-03GPU: Don't try to parse the depth test function if the depth test is disabled.Subv1-0/+4
2018-07-03Update clang formatJames Rowe1-5/+5
2018-07-03Rename logging macro back to LOG_*James Rowe1-4/+4
2018-07-03GPU: Set up the culling configuration on each draw.Subv1-6/+8
2018-07-02GPU: Set up the depth test state on every draw.Subv1-0/+11
2018-07-02GPU: Implemented the Z24S8 depth format and load the depth framebuffer.Subv1-1/+3
2018-07-02GPU: Implement offsetted rendering when using non-indexed drawing.Subv1-1/+1
2018-07-02GPU: Fixed the index offset rendering, and implemented the base vertex functionality.Subv1-6/+8
This fixes Stardew Valley.
2018-07-02GPU: Ignore disabled textures and textures with an invalid address.Subv1-1/+5
2018-06-27gl_rasterizer_cache: Implement caching for texture and framebuffer surfaces.bunnei1-6/+19
gl_rasterizer_cache: Improved cache management based on Citra's implementation. gl_surface_cache: Add some docstrings.
2018-06-27gl_rasterizer: Implement AccelerateDisplay to forward textures to framebuffers.bunnei1-3/+22
2018-06-27gl_rasterizer_cache: Remove Citra's rasterizer cache, always load/flush surfaces.bunnei1-91/+26
2018-06-27gl_rasterizer: Workaround for when exceeding max UBO size.bunnei1-0/+6
2018-06-26gl_state: Fix state management for texture swizzle.bunnei1-1/+1
2018-06-20Build: Fixed some MSVC warnings in various parts of the code.Subv1-2/+2
2018-06-18gl_rasterizer: Get loose on independent blending.Jules Blok1-1/+1
2018-06-10Rasterizer: Use UBOs instead of SSBOs for uploading const buffers.Subv1-11/+17
This should help a bit with GPU performance once we're GPU-bound.
2018-06-09GPU: Synchronize the blend state on every draw call.Subv1-8/+18
Only independent blending on render target 0 is implemented for now. This fixes the elongated squids in Splatoon 2's boot screen.
2018-06-09GPU: Added registers for normal and independent blending.Subv1-26/+1
2018-06-08Rasterizer: Flush the written region when writing shader uniform data before copying it to the uniform buffers.Subv1-0/+3
This fixes the flip_viewport uniform having invalid values when drawing.
2018-06-07GLRenderer: Write the shader stage configuration UBO data *before* copying it to the GPU.Subv1-3/+4
This should fix the bug with the vs_config UBO being uninitialized during shader execution.
2018-06-07GPU: Support changing the texture swizzles for Maxwell textures.Subv1-0/+8
2018-06-07gl_shader_gen: Add uniform handling for indirect const buffer access.bunnei1-1/+10
2018-06-06GPU: Implement sampling multiple textures in the generated glsl shaders.Subv1-37/+46
All tested games that use a single texture show no regression. Only Texture2D textures are supported right now, each shader gets its own "tex_fs/vs/gs" sampler array to maintain independent textures between shader stages, the textures themselves are reused if possible.
2018-06-04GPU: Calculate the correct viewport dimensions based on the scale and translate registers.Subv1-2/+2
This is how nouveau calculates the viewport width and height. For some reason some games set 0xFFFF in the VIEWPORT_HORIZ and VIEWPORT_VERT registers, maybe those are a misnomer and actually refer to something else?
2018-05-19GLRenderer: Remove unused hw_vao_enabled_attributes variable.Subv1-3/+0
2018-05-19GLRenderer: Remove unused vertex buffer and increase the size of the stream buffer to 128 MB.Subv1-4/+1
The stream buffer is where all the vertex data is copied, some games require this to be much bigger than the 4 MB we used to have.
2018-05-02general: Make formatting of logged hex values more straightforwardLioncash1-1/+1
This makes the formatting expectations more obvious (e.g. any zero padding specified is padding that's entirely dedicated to the value being printed, not any pretty-printing that also gets tacked on).
2018-04-25video-core: Move logging macros over to new fmt-capable onesLioncash1-3/+3
2018-04-25gl_rasterizer_cache: Add a function for finding framebuffer GPU address.bunnei1-0/+1
2018-04-25gl_rasterizer_cache: Update to be based on GPU addresses, not CPU addresses.bunnei1-7/+6
2018-04-24memory_manager: Make GpuToCpuAddress return an optional.bunnei1-7/+7
2018-04-24memory_manager: Use GPUVAdddr, not PAddr, for GPU addresses.bunnei1-3/+3
2018-04-23GPU: Support multiple enabled vertex arrays.Subv1-40/+81
The vertex arrays will be copied to the stream buffer one after the other, and the attributes will be set using the ARB_vertex_attrib_binding extension. yuzu now thus requires OpenGL 4.3 or the ARB_vertex_attrib_binding extension.
2018-04-21opengl: Remove unnecessary header inclusionsLioncash1-1/+0
2018-04-20math_util: Remove the Clamp() functionLioncash1-12/+13
C++17 adds clamp() to the standard library, so we can remove ours in favor of it.
2018-04-18GLCache: Added boilerplate code to make supporting configurable texture component types.Subv1-0/+2
For now only the UNORM type is supported.
2018-04-18GLCache: Take into account the texture's block height when caching and unswizzling.Subv1-1/+2
2018-04-18renderer_opengl: Implement BlendEquation and BlendFunc.bunnei1-1/+26
2018-04-17gl_rendering: Use NGLOG* for changed code.bunnei1-3/+3
2018-04-17gl_rasterizer: Implement indexed vertex mode.bunnei1-19/+31
2018-04-15GPU: Use the same buffer names in the generated GLSL and the buffer uploading code.Subv1-10/+7
2018-04-15GPU: Don't use explicit binding points when uploading the constbuffers to opengl.Subv1-5/+25
The bindpoints will now be dynamically calculated based on the number of buffers used by the previous shader stage.
2018-04-15GPU: Don't use GetPointer when uploading the constbuffer data to the GPU.Subv1-3/+4
2018-04-15GPU: Use the buffer hints from the shader decompiler to upload only the necessary const buffers for each shader stage.Subv1-29/+38
2018-04-15GPU: Upload the entirety of each constbuffer for each shader stage as SSBOs.Subv1-1/+38
We're going to need the shader generator to give us a mapping of the actual used const buffers to properly bind them to the shader.
2018-04-15GPU: Allow configuring ssbos in the opengl state manager.Subv1-0/+8
2018-04-15GPU: Added a function to determine whether a shader stage is enabled or not.Subv1-3/+3
2018-04-14gl_rasterizer: Generate shaders and upload uniforms.bunnei1-28/+74
2018-04-14gl_rasterizer: Use shader program manager, remove test shader.bunnei1-143/+27
2018-04-14renderer_opengl: Use OGLProgram instead of OGLShader.bunnei1-1/+1
2018-04-07GL: Set up the textures used for each draw call.Subv1-2/+36
Each Maxwell shader stage can have an arbitrary number of textures, but we're limited to a certain number in OpenGL. We try to only use the minimum amount of host textures by not keeping a 1:1 relation between guest texture ids and host texture ids, ie, guest texture id 8 can be host texture id 0 if it's the only texture used in the guest shader program. This mapping will have to be passed to the shader decompiler so it can rewrite the texture accesses.
2018-04-07GL: Bind the textures to the shaders used for drawing.Subv1-2/+11
2018-04-07GL: Create the sampler objects when starting up the GL rasterizer.Subv1-0/+6
2018-04-07GL: Ported the SamplerInfo struct from citra.Subv1-0/+39
2018-03-27gl_rasterizer: Move code to bind framebuffer surfaces before draw to its own function.bunnei1-22/+27
2018-03-27gl_rasterizer: Add a SyncViewport method.bunnei1-18/+17
2018-03-27gl_rasterizer: Move PrimitiveTopology check to MaxwellToGL.bunnei1-11/+2
2018-03-27gl_rasterizer: Use ReadBlock instead of GetPointer for SetupVertexArray.bunnei1-1/+1
2018-03-27gl_rasterizer: Normalize vertex array data as appropriate.bunnei1-1/+1
2018-03-27rasterizer: Rename DrawTriangles to DrawArrays.bunnei1-2/+2
2018-03-27gl_rasterizer: Use passthrough shader for SetupVertexShader.bunnei1-1/+2
2018-03-27renderer_opengl: Logging, etc. cleanup.bunnei1-17/+18
2018-03-27gl_rasterizer: Implement SetupVertexArray.bunnei1-20/+38
2018-03-27gl_rasterizer: Use 32 texture units instead of 3.bunnei1-0/+1
2018-03-27gl_rasterizer: Implement DrawTriangles.bunnei1-1/+194
2018-03-27gl_rasterizer: Implement AnalyzeVertexArray.bunnei1-1/+21
2018-03-24gl_rasterizer: Fake render in green, because it's cooler.bunnei1-1/+1
2018-03-24gl_rasterizer: Log warning instead of sync'ing unimplemented funcs.bunnei1-7/+1
2018-03-23rasterizer: Flush and invalidate regions should be 64-bit.bunnei1-3/+3
2018-03-23gl_rasterizer: Implement AccelerateDisplay method from Citra.bunnei1-1/+33
2018-03-23video_core: Remove usage of PAddr and replace with VAddr.bunnei1-4/+4
2018-03-23video_core: Move FramebufferInfo to FramebufferConfig in GPU.bunnei1-2/+3
2018-03-23gl_rasterizer: Replace a bunch of UNIMPLEMENTED with ASSERT.bunnei1-15/+15
2018-03-23gl_rasterizer: Add a simple passthrough shader in lieu of shader generation.bunnei1-3/+56
2018-03-20renderer_gl: Port boilerplate rasterizer code over from Citra.bunnei1-0/+269
2018-01-13Remove references to PICA and rasterizers in video_coreJames Rowe1-1686/+0
2018-01-01core/video_core: Fix a bunch of u64 -> u32 warnings.bunnei1-2/+2
2017-09-17Fixed framebuffer warningHuw Pascoe1-7/+18
2017-08-25gl_rasterizer: implement custom clip planewwylele1-0/+28
2017-08-21gl_rasterizer: add clipping plane z<=0 defined in PICAwwylele1-0/+3
2017-07-01gl_rasterizer: use texture buffer for proctex LUTwwylele1-30/+35
2017-06-22gl_rasterizer: use texture buffer for fog LUTwwylele1-13/+12
2017-06-22gl_rasterizer: create the texture before applying the statewwylele1-2/+2
this is a rebasing error from #2792. It doesn't affect much though, because the later more Apply() call fixes/hides it
2017-06-21gl_rasterizer: fix glGetUniformLocation typewwylele1-8/+8
2017-06-21gl_rasterizer: manage texture ids in one placewwylele1-23/+24
2017-06-21gl_rasterizer/lighting: fix LUT interpolationwwylele1-49/+22
2017-06-10OpenGL: Update comment on AreQuaternionsOpposite with new informationYuri Kunde Schlesner1-8/+11
While debugging the software renderer implementation, it was noticed that this is actually exactly what the hardware does, upgrading the status of this "hack" to being a proper implementation. And there was much rejoicing.
2017-05-30gl_rasterizer: sync spot light statuswwylele1-0/+45
2017-05-20gl_rasterizer: implement procedural texturewwylele1-0/+232
2017-05-05pica: shader_dirty if texture2 coord changedwwylele1-0/+4
2017-04-17OpenGL: Pass Pica regs via parameterYuri Kunde Schlesner1-1/+1
2017-04-17OpenGL: Move PicaShaderConfig to gl_shader_gen.hYuri Kunde Schlesner1-1/+1
Also move the implementation of CurrentConfig to the cpp file.
2017-04-17OpenGL: Move Attributes enum to a more appropriate fileYuri Kunde Schlesner1-1/+0
2017-02-18OpenGL: Check if uniform block exists before updating it (#2581)Jannik Vogel1-29/+30
2017-02-09OpenGL: Remove unused duplicate of IsPassThroughTevStageYuri Kunde Schlesner1-12/+0
This copy was left behind when the shader generation code was moved to a separate file.
2017-02-09VideoCore: Split regs.h inclusionsYuri Kunde Schlesner1-1/+3
2017-02-04VideoCore: Move Regs to its own fileYuri Kunde Schlesner1-1/+1
2017-02-04VideoCore: Split framebuffer regs from Regs structYuri Kunde Schlesner1-49/+60
2017-02-04VideoCore: Split texturing regs from Regs structYuri Kunde Schlesner1-62/+67
2017-02-04VideoCore: Split rasterizer regs from Regs structYuri Kunde Schlesner1-25/+29
2017-01-30VideoCore: Change misleading register namesYuri Kunde Schlesner1-1/+1
A few registers had names such as "count" or "number" when they actually contained the maximum (that is, count - 1). This can easily lead to hard to notice off by one errors.
2017-01-30video_core: gl_rasterizer.cpp removed unused type aliasKloen1-2/+0
2017-01-23video_core: gl_rasterizer float to int warningKloen1-1/+2
2016-12-19Use GL_TRUE when setting color_maskAlbin Bernhardsson1-4/+4
2016-12-15VideoCore: Make profiling scope more representativeYuri Kunde Schlesner1-0/+12
2016-12-07OpenGL: Drop framebuffer completeness check.Markus Wick1-16/+0
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-05Report shader uniform block size in case of mismatchJannik Vogel1-1/+3
2016-12-04OpenGL: Non-zero stride only makes sense for linear buffersYuri Kunde Schlesner1-1/+1
2016-12-04OpenGL: Fix DisplayTransfer accel when input width != output widthYuri Kunde Schlesner1-1/+10
Fixes #2246, #2261
2016-11-30ClangFormat: Fixed the clang-format errorsSubv1-4/+8
2016-11-29Build: Fixed a few warnings.Subv1-4/+4
2016-11-27RasterizerGL: Use GL_TRUE and 0xFF in the stencil and depth masks instead of simply true and -1Subv1-2/+2
2016-11-27Rasterizer/Memfill: Set the correct stencil write mask when clearing the stencil buffer.Subv1-1/+1
2016-09-30OpenGL: Take cached viewport sub-rect into account for scissorYuri Kunde Schlesner1-21/+21
Fixes #1938
2016-09-29rasterizer: separate TextureCopy from DisplayTransferwwylele1-5/+5
2016-09-21Use negative priorities to avoid special-casing the self-includeYuri Kunde Schlesner1-1/+1
2016-09-21Remove empty newlines in #include blocks.Emmanuel Gil Peyrot1-5/+1
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-5/+5
2016-09-18Sources: Run clang-format on everything.Emmanuel Gil Peyrot1-86/+148
2016-06-28OpenGL: Add scaled resolution support to scissorYuri Kunde Schlesner1-0/+8
2016-06-28PICA: Scissor fixes and cleanupsYuri Kunde Schlesner1-10/+10
2016-06-28PICA: Implement scissor testSubv1-0/+26
2016-06-07OpenGL: Implement fogJannik Vogel1-0/+68
2016-05-23OpenGL: Set shader_dirty on lighting changesJannik Vogel1-0/+23
2016-05-23OpenGL: Use uniforms for dist_atten_bias and dist_atten_scaleJannik Vogel1-0/+72
2016-05-14OpenGL: Only update depth uniforms if the depth changedJannik Vogel1-7/+17
2016-05-12OpenGL: Support blend equationJannik Vogel1-0/+2
2016-05-11OpenGL: Implement texture type 3Jannik Vogel1-0/+8
2016-05-10OpenGL: Implement W-Buffers and fix depth-mappingJannik Vogel1-3/+8
2016-05-10Pica: Implement W-Buffer in SW rasterizerJannik Vogel1-2/+2
2016-05-07fixup simple type conversions where possibleAlexander Laties1-1/+1
2016-04-30OpenGL: border_color was never set. Fixed. (#1740)Jannik Vogel1-0/+1
2016-04-30VideoCore: Run include-what-you-use and fix most includes.Emmanuel Gil Peyrot1-6/+7
2016-04-29Common: Remove section measurement from profiler (#1731)Yuri Kunde Schlesner1-1/+0
This has been entirely superseded by MicroProfile. The rest of the code can go when a simpler frametime/FPS meter is added to the GUI.
2016-04-22HWRasterizer: sync specular uniform for new shaderstfarley1-0/+2
2016-04-21HWRasterizer: Texture forwardingtfarley1-511/+328
2016-04-08OpenGL: Respect buffer-write allow registersJannik Vogel1-6/+28
2016-04-08OpenGL: Split buffer-write mask sync into seperate functionsJannik Vogel1-8/+30
2016-04-08OpenGL: Keep stencil-test and framebuffer.depth_format in syncJannik Vogel1-0/+1
2016-04-05Common: Remove Common::make_unique, use std::make_uniqueMerryMage1-2/+1
2016-04-03OpenGL: Fix a double framebuffer completeness checks.Emmanuel Gil Peyrot1-4/+6
2016-04-03OpenGL: Check for framebuffer completenessJannik Vogel1-0/+3
2016-03-24OpenGL: Don't attempt to draw empty triangle batchesYuri Kunde Schlesner1-0/+3
Our code did not handle this well, causing random crashes in some situations.
2016-03-06Pica: Write depth value even when depth test is disabledYuri Kunde Schlesner1-2/+4
This has been confirmed on hardware. Fixes Etrian Odyssey IV.
2016-03-03Add immediate mode vertex submissionDwayne Slater1-0/+1
2016-02-05renderer_opengl: Use GLvec3/GLvec4 aliases for commonly used types.bunnei1-2/+2
2016-02-05gl_rasterizer: Fix issue with interpolation of opposite quaternions.bunnei1-3/+25
2016-02-05pica_types: Replace float24/20/16 with a template class.bunnei1-7/+7
2016-02-05renderer_opengl: Use textures for fragment shader LUTs instead of UBOs.bunnei1-12/+39
- Gets us LUT interpolation for free. - Some older Intel GPU drivers did not support the big UBOs needed to store the LUTs.
2016-02-05renderer_opengl: Initial implementation of basic specular lighting.bunnei1-0/+68
2016-02-05renderer_opengl: Implement HW fragment lighting LUTs within our default UBO.bunnei1-13/+52
2016-02-05renderer_opengl: Implement diffuse component of HW fragment lighting.bunnei1-0/+141
2016-02-03hwrasterizer: Use proper cached fb addr/sizetfarley1-40/+32
2016-01-21hwrasterizer: Use depth offsettfarley1-0/+16
2015-12-08VideoCore: Unify interface to OpenGL and SW rasterizersYuri Kunde Schlesner1-9/+0
This removes explicit checks sprinkled all over the codebase to instead just have the SW rasterizer expose an implementation with no-ops for most operations.
2015-12-07VideoCore: Rename HWRasterizer methods to be less confusingYuri Kunde Schlesner1-3/+3
2015-12-07OpenGL: Rename cache functions to better match what they actually doYuri Kunde Schlesner1-4/+4
2015-12-05OpenGL: Flip framebuffers during transfer rather than when renderingYuri Kunde Schlesner1-11/+10
2015-11-26renderer_opengl: Fix uniform issues introduced with kemenaran/avoid-explicit-uniform-location.bunnei1-4/+6
2015-11-25Use regular uniform locationPierre de La Morinerie1-3/+4
The support for GL_ARB_explicit_uniform_location is not that good (53% according to http://feedback.wildfiregames.com/report/opengl/feature/GL_ARB_explicit_uniform_location). This fix the shader compilation on Intel HD 4000 (#1222).
2015-11-19FragShader: Use an UBO instead of several individual uniformsSubv1-4/+29
2015-10-22gl_rasterizer: Define enum types for each vertex texcoord attribute.bunnei1-6/+6
2015-10-22gl_rasterizer: Use MMH3 hash for shader cache hey.bunnei1-4/+3
- Includes a check to confirm no hash collisions.
2015-10-22gl_shader_gen: Require explicit uniform locations.bunnei1-19/+8
- Fixes uniform issue on AMD.
2015-10-22renderer_opengl: Refactor shader generation/caching to be more organized + various cleanups.bunnei1-74/+57
2015-10-22gl_rasterizer: Move logic for creating ShaderCacheKey to a static function.bunnei1-17/+2
2015-10-22gl_rasterizer: Fix typo in uploading TEV const color uniforms.bunnei1-5/+5
2015-10-22gl_shader_util: Fix precision bug with alpha testing.bunnei1-2/+2
- Alpha testing is not done with float32 precision, this makes the HW renderer match the SW renderer.
2015-10-22Initial implementation of fragment shader generation with caching.Subv1-227/+124
2015-10-07Silence -Wsign-compare warnings.Rohit Nirmal1-3/+3
2015-09-11video_core: Reorganize headersLioncash1-1/+1
2015-09-10gl_rasterizer: Replace push_back calls with emplace_back in AddTriangleLioncash1-3/+3
2015-09-03OpenGL: Use Sampler Objects to decouple sampler config from texturesYuri Kunde Schlesner1-0/+46
Fixes #978
2015-09-03OpenGL: Remove ugly and endian-unsafe color pointer castsYuri Kunde Schlesner1-3/+3
2015-08-30Replace the previous OpenGL loader with a glad-generated 3.3 oneYuri Kunde Schlesner1-2/+2
The main advantage of switching to glad from glLoadGen is that, apart from being actively maintained, it supports a customizable entrypoint loader function, which makes it possible to also support OpenGL ES.
2015-08-28gl_rasterizer_cache: Detect and ignore unnecessary texture flushes.bunnei1-2/+2
2015-08-25Integrate the MicroProfile profiling libraryYuri Kunde Schlesner1-0/+10
This brings goodies such as a configurable user interface and multi-threaded timeline view.
2015-08-24HWRenderer: Added a workaround for the Intel Windows driver bug that causes glTexSubImage2D to not change the stencil buffer.Subv1-2/+9
Reported here https://communities.intel.com/message/324464
2015-08-20GLRasterizer: Implemented stencil testing in the hw renderer.Subv1-2/+11
2015-08-15GPU: Refactor "VertexShader" namespace to "Shader".bunnei1-3/+3
- Also renames "vertex_shader.*" to "shader_interpreter.*"
2015-08-06OpenGL: Remove redundant texture.enable_2d field from OpenGLStateYuri Kunde Schlesner1-10/+1
All uses of this field where it's false can just set the texture id to 0 instead.
2015-07-28OpenGL: Add a profiler category measuring framebuffer readbackYuri Kunde Schlesner1-0/+7
2015-07-19GLRasterizer: Don't try to get a pointer to the depth buffer if it doesn't exist.Subv1-3/+7
2015-06-28Core: Cleanup hw includes.Emmanuel Gil Peyrot1-0/+1
2015-06-28Common: Cleanup key_map includes.Emmanuel Gil Peyrot1-3/+5
2015-06-09Renderer formatting editstfarley1-12/+12
2015-06-09Render-to-texture flush, interval math fixtfarley1-1/+13
2015-06-09Liberal texture unbind (clout menu)tfarley1-4/+34
2015-06-09Depth format fix (crush3d intro/black screens)tfarley1-46/+46
2015-06-09Implemented glColorMasktfarley1-0/+4
2015-05-31Pica: Implement LogicOp function.bunnei1-0/+10
2015-05-30Move video_core/color.h to common/color.harchshift1-1/+2
2015-05-29Remove every trailing whitespace from the project (but externals).Emmanuel Gil Peyrot1-1/+1
2015-05-23Pica: Create 'State' structure and move state memory there.bunnei1-108/+126
2015-05-23OpenGL renderertfarley1-0/+879