summaryrefslogtreecommitdiffstats
path: root/src/video_core/renderer_opengl/gl_state.cpp (unfollow)
Commit message (Collapse)AuthorFilesLines
2020-02-28gl_state: Remove completelyReinUsesLisp1-90/+0
2020-02-28gl_state: Remove program trackingReinUsesLisp1-31/+1
2020-02-28gl_state: Remove framebuffer trackingReinUsesLisp1-35/+0
2020-02-28gl_state: Remove image trackingReinUsesLisp1-7/+0
2020-02-28gl_state: Remove texture and sampler trackingReinUsesLisp1-42/+0
2020-02-28gl_state: Remove blend state trackingReinUsesLisp1-61/+0
2020-02-28gl_state: Remove stencil test trackingReinUsesLisp1-30/+0
2020-02-28gl_state: Remove clip control trackingReinUsesLisp1-8/+0
2020-02-28gl_state: Remove clip distances trackingReinUsesLisp1-8/+0
2020-02-28gl_state: Remove rasterizer disable trackingReinUsesLisp1-5/+0
2020-02-28gl_state: Remove viewport and depth range trackingReinUsesLisp1-29/+0
2020-02-28gl_state: Remove scissor test trackingReinUsesLisp1-35/+0
2020-02-28gl_state: Remove color mask trackingReinUsesLisp1-16/+0
2020-02-28gl_state: Remove clamp framebuffer color trackingReinUsesLisp1-8/+0
This commit doesn't reset it for screen draws because clamping doesn't change anything there.
2020-02-28gl_state: Remove multisample trackingReinUsesLisp1-8/+0
2020-02-28gl_state: Remove framebuffer sRGB trackingReinUsesLisp1-12/+0
2020-02-28gl_state: Remove VAO cache and trackingReinUsesLisp1-14/+0
2020-02-28gl_state: Remove depth clamp trackingReinUsesLisp1-17/+0
2020-02-28gl_state: Remove depth trackingReinUsesLisp1-15/+0
2020-02-28gl_state: Remove primitive restart trackingReinUsesLisp1-10/+0
2020-02-28gl_state: Remove logic op trackerReinUsesLisp1-9/+0
2020-02-28gl_state: Remove blend color trackingReinUsesLisp1-7/+0
2020-02-28gl_state: Remove polygon offset trackingReinUsesLisp1-22/+0
2020-02-28gl_state: Remove alpha test trackingReinUsesLisp1-9/+0
2020-02-28gl_state: Remove cull mode trackingReinUsesLisp1-9/+0
2020-02-28gl_state: Remove front face trackingReinUsesLisp1-4/+0
2020-02-28gl_state: Remove point size trackingReinUsesLisp1-9/+0
2020-02-28gl_rasterizer: Remove dirty flagsReinUsesLisp1-20/+0
2020-02-26renderer_opengl: Add OGLRenderbuffer to resource/state management.bunnei1-0/+15
2020-02-04gl_rasterizer: Implement GL_POINT_SPRITEReinUsesLisp1-0/+1
OpenGL core defaults to GL_POINT_SPRITE, meanwhile on OpenGL compatibility we have to explicitly enable it. This fixes gl_PointCoord's behaviour.
2020-01-15gl_state: Implement PROGRAM_POINT_SIZEReinUsesLisp1-0/+1
For gl_PointSize to have effect we have to activate GL_PROGRAM_POINT_SIZE.
2019-12-18gl_rasterizer: Implement RASTERIZE_ENABLEReinUsesLisp1-0/+5
RASTERIZE_ENABLE is the opposite of GL_RASTERIZER_DISCARD. Implement it naturally using this. NVN games expect rasterize to be enabled by default, reflect that in our initial GPU state.
2019-12-11Maxwell3D: Implement Depth Mode.Fernando Sahmkow1-2/+3
This commit finishes adding depth mode that was reverted before due to other unresolved issues.
2019-11-23gl_state: Skip null texture bindsReinUsesLisp1-1/+5
glBindTextureUnit doesn't support null textures. Skip binding these.
2019-11-23gl_shader_cache: Remove dynamic BaseBinding specializationReinUsesLisp1-4/+10
2019-11-07gl_rasterizer: Emulate viewport flipping with ARB_clip_controlReinUsesLisp1-0/+7
Emulates negative y viewports with ARB_clip_control. This allows us to more easily emulated pipelines with tessellation and/or geometry shader stages. It also avoids corrupting games with transform feedbacks and negative viewports (gl_Position.y was being modified).
2019-10-30gl_state: Use std::array::fill instead of std::fillRodrigo Locatti1-1/+1
Co-Authored-By: Mat M. <mathew1800@gmail.com>
2019-10-30gl_state: Move dirty checks to individual apply calls instead of ApplyReinUsesLisp1-41/+49
This requires removing constness from some methods, but for consistency it's removed in all methods.
2019-10-30gl_state: Remove ApplyDefaultStateReinUsesLisp1-11/+0
OpenGL has defaults values we can trust. Remove these.
2019-10-30gl_state: Change SetDefaultViewports to use default constructorReinUsesLisp1-13/+2
2019-10-30gl_state: Minor style changesReinUsesLisp1-3/+5
2019-10-30gl_state: Move initializers from constructor to class declarationReinUsesLisp1-98/+1
2019-09-11renderer_opengl: Fix sRGB blitsReinUsesLisp1-3/+0
Removes the sRGB hack of tracking if a frame used an sRGB rendertarget to apply at least once to blit the final texture as sRGB. Instead of doing this apply sRGB if the presented image has sRGB. Also enable sRGB by default on Maxwell3D registers as some games seem to assume this.
2019-09-06gl_state: Split textures and samplers into two arraysReinUsesLisp1-68/+31
2019-09-06gl_state: Add support for glBindImageTexturesReinUsesLisp1-0/+21
2019-07-17Maxwell3D: Address FeedbackFernando Sahmkow1-2/+1
2019-07-17GL_Rasterizer: Corrections to Clearing.Fernando Sahmkow1-0/+20
2019-07-17Maxwell3D: Implement State Dirty Flags.Fernando Sahmkow1-5/+17
2019-07-14GL_State: Add a microprofile timer to OpenGL state.Fernando Sahmkow1-0/+4
2019-05-30gl_rasterizer: Move alpha testing to the OpenGL pipelineReinUsesLisp1-0/+13
Removes the alpha testing code from each fragment shader invocation.
2019-04-19gl_state: Fix samplers memory corruptionReinUsesLisp1-3/+5
It was possible for "samplers" to be read without being written. This addresses that.
2019-04-04gl_state: Rework to enable individual appliesReinUsesLisp1-316/+294
2019-02-28gl_state: Fixup multibind bugReinUsesLisp1-2/+2
2019-02-15gl_state: Synchronize gl_state even when state is disabledReinUsesLisp1-83/+61
There are some potential edge cases where gl_state may fail to track the state if a related state changes while the toggle is disabled or it didn't change. This addresses that.
2019-01-30gl_rasterizer_cache: Move swizzling to textures instead of stateReinUsesLisp1-12/+4
2019-01-30gl_state: Use DSA and multi bind to update texture bindingsReinUsesLisp1-8/+22
2019-01-09gl_rasterizer: Workaround Intel VAO DSA bugReinUsesLisp1-6/+7
There is a bug on Intel's blob driver where it fails to properly build a vertex array object if it's not bound even after creating it with glCreateVertexArrays. This workaround binds it after creating it to bypass the issue.
2019-01-06gl_rasterizer: Use DSA for vertex array objectsReinUsesLisp1-21/+5
2019-01-06gl_state: Drop uniform buffer state trackingReinUsesLisp1-8/+0
2018-11-27Implement depth clampRodolfo Bogado1-9/+23
2018-11-27GPU States: Implement Polygon Offset. This is used in SMO all the time. (#1784)Marcos1-0/+57
* GPU States: Implement Polygon Offset. This is used in SMO all the time. * Clang Format fixes. * Initialize polygon_offset in the constructor.
2018-11-24Add support for clear_flags registerRodolfo Bogado1-3/+26
2018-11-21Removed pre 4.3 ARB extensionsFernandoS271-4/+4
2018-11-18drop support for non separate alpha as it seems to cause issues in some gamesRodolfo Bogado1-42/+19
2018-11-17add AlphaToCoverage and AlphaToOneRodolfo Bogado1-0/+17
2018-11-17add support for fragment_color_clampRodolfo Bogado1-0/+7
2018-11-17fix viewport and scissor behaviorRodolfo Bogado1-26/+41
2018-11-13gl_state: Amend compilation warningsLioncash1-2/+3
Makes float -> integral conversions explicit via casts and also silences a sign conversion warning.
2018-11-11Improve state management by splitting some of the states id separated function to avoid a full apply overheadRodolfo Bogado1-1/+7
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-14/+33
2018-11-05Implement multi-target viewports and blendingRodolfo Bogado1-62/+143
2018-10-31Improve OpenGL state handlingRodolfo Bogado1-101/+145
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/+15
2018-10-26gl_rasterizer: Implement depth range.bunnei1-0/+8
2018-09-28video_core: Implement point_size and add point state syncReinUsesLisp1-0/+7
2018-09-28gl_state: Pack sampler bindings into a single ARB_multi_bindReinUsesLisp1-3/+21
2018-09-22gl_state: Remove unused type aliasLioncash1-0/+1
This isn't used anywhere within the header, so we can remove it, along with the include that was previously necessary. This also uncovers an indirect include in the cpp file for the assertion macros.
2018-09-15Port #4182 from Citra: "Prefix all size_t with std::"fearlessTobi1-1/+1
2018-09-08gl_state: Keep track of texture target.bunnei1-4/+4
2018-08-23gl_state: Update to handle stencil front/back face separately.bunnei1-25/+28
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-21GLState: Allow enabling/disabling GL_COLOR_LOGIC_OP independently from blending.Subv1-5/+15
2018-08-12gl_state: Don't track constant buffer mappings.Markus Wick1-18/+0
2018-08-12gl_rasterizer: Use the stream buffer for constant buffers.Markus Wick1-3/+6
2018-07-20gl_state: Make references const where applicable in Apply()Lioncash1-2/+3
2018-07-20gl_state: Get rid of mismatched sign conversionsLioncash1-14/+17
While we're at it, amend the loop variable type to be the same width as that returned by the .size() call.
2018-06-26gl_state: Fix state management for texture swizzle.bunnei1-8/+3
2018-06-26gl_state: Remove unused state management from 3DS.bunnei1-66/+0
2018-06-20Build: Fixed some MSVC warnings in various parts of the code.Subv1-2/+2
2018-06-10Rasterizer: Use UBOs instead of SSBOs for uploading const buffers.Subv1-1/+1
This should help a bit with GPU performance once we're GPU-bound.
2018-06-07GLState: Support changing the GL_TEXTURE_SWIZZLE parameter of each texture unit.Subv1-0/+13
2018-04-20common_funcs: Remove ARRAY_SIZE macroLioncash1-2/+2
C++17 has non-member size() which we can just call where necessary.
2018-04-15GPU: Allow configuring ssbos in the opengl state manager.Subv1-0/+14
2018-04-07GL: Rename PicaTexture to MaxwellTexture.Subv1-1/+1
2018-03-20gl_state: Sync latest version with Citra.bunnei1-39/+86
2017-09-30Fixed type conversion ambiguityHuw Pascoe1-2/+2
2017-08-21gl_rasterizer: add clipping plane z<=0 defined in PICAwwylele1-0/+13
2017-07-01gl_rasterizer: use texture buffer for proctex LUTwwylele1-25/+25
2017-06-22gl_rasterizer: use texture buffer for fog LUTwwylele1-5/+5
2017-06-21gl_state: reset 1d textureswwylele1-0/+14
2017-06-21gl_rasterizer: manage texture ids in one placewwylele1-8/+8
2017-06-21gl_rasterizer/lighting: fix LUT interpolationwwylele1-8/+4
2017-05-20gl_rasterizer: implement procedural texturewwylele1-0/+36
2016-12-07OpenGL: Drop framebuffer completeness check.Markus Wick1-13/+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-11-27RasterizerGL: Use GL_TRUE and 0xFF in the stencil and depth masks instead of simply true and -1Subv1-2/+2
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-3/+1
This makes clang-format useful on those. Also add a bunch of forgotten transitive includes, which otherwise prevented compilation.
2016-09-18Sources: Run clang-format on everything.Emmanuel Gil Peyrot1-23/+26
2016-06-07OpenGL: Implement fogJannik Vogel1-0/+8
2016-05-12OpenGL: Support blend equationJannik Vogel1-0/+7
2016-04-30VideoCore: Run include-what-you-use and fix most includes.Emmanuel Gil Peyrot1-2/+5
2016-04-21HWRasterizer: Texture forwardingtfarley1-22/+41
2016-02-26renderer_opengl: Initalise fragment shader LUT texturesMerryMage1-0/+4
2016-02-05renderer_opengl: Use textures for fragment shader LUTs instead of UBOs.bunnei1-0/+8
- Gets us LUT interpolation for free. - Some older Intel GPU drivers did not support the big UBOs needed to store the LUTs.
2015-12-05OpenGL: Add support for glFrontFace in the state trackerYuri Kunde Schlesner1-0/+5
2015-11-19FragShader: Use an UBO instead of several individual uniformsSubv1-0/+8
2015-09-11video_core: Reorganize headersLioncash1-1/+1
2015-09-03OpenGL: Add support for Sampler Objects to state trackerYuri Kunde Schlesner1-4/+16
2015-08-20GLRasterizer: Implemented stencil testing in the hw renderer.Subv1-0/+9
2015-08-06OpenGL: Fix state tracking in situations with reused object handlesYuri Kunde Schlesner1-0/+32
If an OpenGL object is created, bound to a binding using the state tracker, and then destroyed, a newly created object can be assigned the same numeric handle by OpenGL. However, even though it is a new object, and thus needs to be bound to the binding again, the state tracker compared the current and previous handles and concluded that no change needed to be made, leading to failure to bind objects in certain cases. This manifested as broken text in VVVVVV, which this commit fixes along with similar texturing problems in other games.
2015-08-06OpenGL: Remove redundant texture.enable_2d field from OpenGLStateYuri Kunde Schlesner1-10/+2
All uses of this field where it's false can just set the texture id to 0 instead.
2015-07-22GL Renderer: Remove erroneous glEnable(GL_TEXTURE_2D) callsYuri Kunde Schlesner1-8/+5
In OpenGL 3, texturing is always enabled, and this call is invalid. While it produced no effect in the rest of the execution, it wouldn't have the intended effect of disabling texturing for that unit. Instead bind a null texture to the unit.
2015-06-09Renderer formatting editstfarley1-14/+17
2015-06-09Implemented glColorMasktfarley1-0/+13
2015-05-31Pica: Implement LogicOp function.bunnei1-0/+11
2015-05-29Remove every trailing whitespace from the project (but externals).Emmanuel Gil Peyrot1-1/+1
2015-05-23gl_state: Remove unnecessary const specifier on ApplyLioncash1-1/+1
2015-05-23gl_state: Fix a condition typo in ApplyLioncash1-1/+1
2015-05-23OpenGL renderertfarley1-0/+160