summaryrefslogtreecommitdiffstats
path: root/src/video_core/engines/maxwell_3d.cpp (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Implement Bindless Handling on SetupTextureFernando Sahmkow2019-04-081-13/+18
|
* maxwell_3d: Reduce severity of ProcessSyncPointReinUsesLisp2019-04-061-2/+2
|
* Merge pull request #2317 from FernandoS27/syncbunnei2019-04-061-0/+12
|\ | | | | Implement SyncPoint Register in the GPU.
| * Implement SyncPoint Register in the GPU.Fernando Sahmkow2019-04-061-0/+12
| |
* | video_core/engines: Make memory manager members privateLioncash2019-04-061-2/+2
| | | | | | | | | | These aren't used externally by anything, so they can be made private data members.
* | video_core/engines: Remove unnecessary inclusions where applicableLioncash2019-04-061-2/+1
|/ | | | | | Replaces header inclusions with forward declarations where applicable and also removes unused headers within the cpp file. This reduces a few more dependencies on core/memory.h
* gpu: Rewrite virtual memory manager using PageTable.bunnei2019-03-211-4/+4
|
* video_core: Refactor to use MemoryManager interface for all memory access.bunnei2019-03-161-29/+12
| | | | | | | | | | | # 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
* gpu: Use host address for caching instead of guest address.bunnei2019-03-151-1/+4
|
* maxwell_3d: Use std::bitset to manage dirty flagsReinUsesLisp2019-02-261-34/+32
|
* video_core: Remove usages of System::GetInstance() within the enginesLioncash2019-02-161-5/+7
| | | | | Avoids the use of the global accessor in favor of explicitly making the system a dependency within the interface.
* core_timing: Convert core timing into a classLioncash2019-02-161-1/+1
| | | | | | | | | | | Gets rid of the largest set of mutable global state within the core. This also paves a way for eliminating usages of GetInstance() on the System class as a follow-up. Note that no behavioral changes have been made, and this simply extracts the functionality into a class. This also has the benefit of making dependencies on the core timing functionality explicit within the relevant interfaces.
* core_timing: Rename CoreTiming namespace to Core::TimingLioncash2019-02-121-1/+1
| | | | | | Places all of the timing-related functionality under the existing Core namespace to keep things consistent, rather than having the timing utilities sitting in its own completely separate namespace.
* video_core: Assert on invalid GPU to CPU address queriesReinUsesLisp2019-02-031-19/+27
|
* maxwell_3d: Allow sampler handles with TSC id zeroReinUsesLisp2019-02-031-10/+6
|
* maxwell_3d: Allow texture handles with TIC id zeroReinUsesLisp2019-02-031-16/+7
| | | | | Also remove "enabled" field from Tegra::Texture::FullTextureInfo because it would become unused.
* maxwell_3d: Set rt_separate_frag_data to 1 by defaultReinUsesLisp2019-01-221-0/+5
| | | | | | | Commercial games assume that this value is 1 but they never set it. On the other hand nouveau manually sets this register. On ConfigureFramebuffers we were asserting for what we are actually implementing (according to envytools).
* gl_rasterizer_cache: Use dirty flags for the depth bufferReinUsesLisp2019-01-071-0/+10
|
* gl_rasterizer_cache: Use dirty flags for color buffersReinUsesLisp2019-01-071-0/+9
|
* gl_shader_cache: Use dirty flags for shadersReinUsesLisp2019-01-071-0/+8
|
* gpu: Rewrite GPU command list processing with DmaPusher class.bunnei2018-11-271-25/+28
| | | | - More accurate impl., fixes Undertale (among other games).
* Merge pull request #1723 from degasus/dirty_flagsbunnei2018-11-271-0/+16
|\ | | | | gl_rasterizer: Skip VB upload if the state is clean.
| * gl_rasterizer: Skip VB upload if the state is clean.Markus Wick2018-11-171-0/+16
| |
* | maxwell_3d: Initialize rasterizer color mask registers as enabled.bunnei2018-11-211-0/+9
| | | | | | | | - Fixes rendering regression with Sonic Mania.
* | set default value for point size registerRodolfo Bogado2018-11-171-0/+3
| |
* | fix viewport and scissor behaviorRodolfo Bogado2018-11-171-2/+2
|/
* gl_rasterizer: Minor cleanupFrederic L2018-11-131-4/+2
| | | Minor code cleanup from unaddressed feedback in #1654
* Try 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 Bogado2018-11-111-0/+13
|
* Merge pull request #1654 from degasus/dirty_flagsbunnei2018-11-111-0/+8
|\ | | | | gl_rasterizer: Skip VAO binding if the state is clean.
| * gl_rasterizer: Skip VAO binding if the state is clean.Markus Wick2018-11-061-0/+8
| |
* | Implement multi-target viewports and blendingRodolfo Bogado2018-11-051-0/+16
|/
* maxwell_3d: Restructure macro upload to use a single macro code memory.bunnei2018-11-011-8/+18
| | | | | - Fixes an issue where macros could be skipped. - Fixes rendering of distant objects in Super Mario Odyssey.
* global: Use std::optional instead of boost::optional (#1578)Frederic L2018-10-301-5/+5
| | | | | | | | | | | | | | | | * 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
* maxwell_3d: Add code for initializing register defaults.bunnei2018-10-261-1/+19
|
* maxwell_3d: Remove unused variable within ProcessQueryGet()Lioncash2018-10-241-1/+0
|
* engines/maxwell_*: Use nested namespace specifiers where applicableLioncash2018-10-201-4/+2
| | | | | | These three source files are the only ones within the engines directory that don't use nested namespaces. We may as well change these over to keep things consistent.
* Port #4182 from Citra: "Prefix all size_t with std::"fearlessTobi2018-09-151-6/+7
|
* rasterizer: Drop unused handler.Markus Wick2018-09-101-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.
* maxwell_3d: Remove assert that no longer applies.bunnei2018-09-081-4/+0
|
* maxwell_3d: Use CoreTiming for query timestampZach Hilman2018-09-011-2/+3
|
* core/core: Replace includes with forward declarations where applicableLioncash2018-08-311-2/+1
| | | | | | | | | | | The follow-up to e2457418dae19b889b2ad85255bb95d4cd0e4bff, which replaces most of the includes in the core header with forward declarations. This makes it so that if any of the headers the core header was previously including change, then no one will need to rebuild the bulk of the core, due to core.h being quite a prevalent inclusion. This should make turnaround for changes much faster for developers.
* maxwell3d: Move FinishedPrimitiveBatch event after AcceleratedDrawBatch()Lioncash2018-08-251-4/+4
| | | | | The start and finish events should likely not be right after one another like this, otherwise the batch will appear to complete immediately
* Rasterizer: Implemented instanced rendering.Subv2018-08-151-0/+12
| | | | | | 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.
* maxwell_3d: Ignore macros that have not been uploaded yet.bunnei2018-08-091-4/+9
| | | | - Used by Super Mario Odyssey (in game).
* maxwell_3d: Use correct const buffer size and check bounds.bunnei2018-08-081-0/+2
| | | | - Fixes mem corruption with Super Mario Odyssey and Pokkén Tournament DX.
* maxwell_3d: Remove outdated assert.bunnei2018-08-061-2/+0
|
* video_core: Eliminate the g_renderer global variableLioncash2018-08-041-5/+5
| | | | | | | | | | | | | | We move the initialization of the renderer to the core class, while keeping the creation of it and any other specifics in video_core. This way we can ensure that the renderer is initialized and doesn't give unfettered access to the renderer. This also makes dependencies on types more explicit. For example, the GPU class doesn't need to depend on the existence of a renderer, it only needs to care about whether or not it has a rasterizer, but since it was accessing the global variable, it was also making the renderer a part of its dependency chain. By adjusting the interface, we can get rid of this dependency.
* GPU: Remove the assert that required the CODE_ADDRESS to be 0.Subv2018-07-241-8/+0
| | | | Games usually just leave it at 0 but nouveau sets it to something else. This already works fine, the assert is useless.
* maxwell_3d: Remove unused variable within GetStageTextures()Lioncash2018-07-201-2/+0
|
* gl_rasterizer: Fix check for if a shader stage is enabled.bunnei2018-07-131-21/+0
|
* Merge pull request #609 from Subv/clear_buffersbunnei2018-07-041-0/+12
|\ | | | | GPU: Implemented the CLEAR_BUFFERS register.
| * GPU: Support clears that don't clear the color buffer.Subv2018-07-031-2/+3
| |
| * GPU: Bind and clear the render target when the CLEAR_BUFFERS register is written to.Subv2018-07-031-0/+11
| |
* | Update clang formatJames Rowe2018-07-031-2/+2
| |
* | Rename logging macro back to LOG_*James Rowe2018-07-031-1/+1
|/
* Build: Fixed some MSVC warnings in various parts of the code.Subv2018-06-201-2/+3
|
* GPU: Implement sampling multiple textures in the generated glsl shaders.Subv2018-06-061-0/+34
| | | | | | 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.
* GPU: Partial implementation of long GPU queries.Subv2018-06-041-9/+24
| | | | | | | | Long queries write a 128-bit result value to memory, which consists of a 64 bit query value and a 64 bit timestamp. In this implementation, only select=Zero of the Crop unit is implemented, this writes the query sequence as a 64 bit value, and a 0u64 value for the timestamp, since we emulate an infinitely fast GPU. This specific type was hwtested, but more rigorous tests should be performed in the future for the other types.
* maxwell_3d: Reset vertex counts after drawing.bunnei2018-04-291-0/+10
|
* general: Convert assertion macros over to be fmt-compatibleLioncash2018-04-271-2/+2
|
* GPU: Reduce the number of registers of Maxwell3D to 0xE00.Subv2018-04-251-3/+3
| | | | The rest are just macro shim registers.
* GPU: Move the Maxwell3D macro uploading code to the inside of the Maxwell3D processor.Subv2018-04-251-4/+10
| | | | It doesn't belong in the PFIFO handler.
* video-core: Move logging macros over to new fmt-capable onesLioncash2018-04-251-2/+2
|
* memory_manager: Make GpuToCpuAddress return an optional.bunnei2018-04-241-10/+11
|
* memory_manager: Use GPUVAdddr, not PAddr, for GPU addresses.bunnei2018-04-241-6/+5
|
* GPU: Added asserts to our code for handling the QUERY_GET GPU command.Subv2018-04-241-1/+26
| | | | | This is based on research from nouveau. Many things are currently unknown and will require hwtests in the future. This commit also stubs QueryMode::Write2 to do the same as Write. Nouveau code treats them interchangeably, it is currently unknown what the difference is.
* GPU: Pitch textures are now supported, don't assert when encountering them.Subv2018-04-181-2/+3
|
* Merge pull request #346 from bunnei/misc-gpu-improvementsbunnei2018-04-181-1/+2
|\ | | | | Misc gpu improvements
| * maxwell3d: Allow Texture2DNoMipmap as Texture2D.bunnei2018-04-181-1/+2
| |
* | renderer_opengl: Implement BlendEquation and BlendFunc.bunnei2018-04-181-3/+1
|/
* gl_rasterizer: Implement indexed vertex mode.bunnei2018-04-171-1/+3
|
* GPU: Added a function to determine whether a shader stage is enabled or not.Subv2018-04-151-0/+21
|
* GPU: Assert when finding a texture with a format type other than UNORM.Subv2018-04-071-0/+2
|
* GPU: Use the MacroInterpreter class to execute the GPU macros instead of HLEing them.Subv2018-04-011-100/+8
|
* GPU: Implemented a gpu macro interpreter.Subv2018-04-011-0/+5
| | | | | | The Ryujinx macro interpreter and envydis were used as reference. Macros are programs that are uploaded by the games during boot and can later be called by writing to their method id in a GPU command buffer.
* Maxwell3D: Call AccelerateDrawBatch on DrawArrays.bunnei2018-03-271-1/+8
|
* GPU: Load the sampler info (TSC) when retrieving active textures.Subv2018-03-261-20/+60
|
* GPU: Make the debug_context variable a member of the frontend instead of a global.Subv2018-03-251-11/+13
|
* GPU: Added a function to retrieve the active textures for a shader stage.Subv2018-03-241-44/+49
| | | | TODO: A shader may not use all of these textures at the same time, shader analysis should be performed to determine which textures are actually sampled.
* GPU: Implement the Incoming/FinishedPrimitiveBatch debug breakpoints.Subv2018-03-241-0/+7
|
* GPU: Implement the MaxwellCommandLoaded/Processed debug breakpoints.Subv2018-03-241-0/+10
|
* GPU: Added a method to unswizzle a texture without decoding it.Subv2018-03-241-1/+1
| | | | Allow unswizzling of DXT1 textures.
* GPU: Preliminary work for texture decoding.Subv2018-03-241-0/+45
|
* Clang FixesN00byKing2018-03-191-1/+2
|
* Clean Warnings (?)N00byKing2018-03-191-1/+1
|
* GPU: Implement macro 0xE1A BindTextureInfoBuffer in HLE.Subv2018-03-191-0/+18
| | | | This macro simply sets the current CB_ADDRESS to the texture buffer address for the input shader stage.
* GPU: Implement the BindStorageBuffer macro method in HLE.Subv2018-03-181-0/+21
| | | | | | This macro binds the SSBO Info Buffer as the current ConstBuffer. This buffer is usually bound to c0 during shader execution. Games seem to use this macro instead of directly writing the address for some reason.
* GPU: Handle writes to the CB_DATA method.Subv2018-03-181-0/+36
| | | | | | Writing to this method will cause the written value to be stored in the currently-set ConstBuffer plus CB_POS. This method is usually used to upload uniforms or other shader-visible data.
* GPU: Store uploaded GPU macros and keep track of the number of method parameters.Subv2018-03-181-7/+16
|
* GPU: Macros are specific to the Maxwell3D engine, so handle them internally.Subv2018-03-181-5/+36
|
* GPU: Renamed ShaderType to ShaderStage as that is less confusing.Subv2018-03-181-12/+12
|
* GPU: Store shader constbuffer bindings in the GPU state.Subv2018-03-181-2/+36
|
* GPU: Make the SetShader macro call do the same as the real macro's code.Subv2018-03-181-1/+19
| | | | | | It'll now set the CB_SIZE, CB_ADDRESS and CB_BIND registers when it's called. Presumably this SetShader function is binding the constant shader uniforms to buffer 1 (c1[]).
* GPU: Corrected the parameter documentation for the SetShader macro call.Subv2018-03-171-5/+6
| | | | | | Register 0xE24 is actually a macro that sets some shader parameters in the register structure. Macros are uploaded to the GPU at startup and have their own ISA, we'll probably write an interpreter for this in the future.
* GPU: Handle the SetShader method call (0xE24) and store the shader config.Subv2018-03-171-2/+22
|
* Merge pull request #241 from Subv/gpu_method_callbunnei2018-03-171-0/+17
|\ | | | | GPU: Process command mode 5 (IncreaseOnce) differently from other commands
| * GPU: Process command mode 5 (IncreaseOnce) differently from other commands.Subv2018-03-171-0/+17
| | | | | | | | | | | | Accumulate all arguments before calling the desired method. Note: Maybe we should do the same for the NonIncreasing mode?
* | GPU: Assert that we get a 0 CODE_ADDRESS register in the 3D engine.Subv2018-03-171-0/+8
|/ | | | Shader address calculation depends on this value to some extent, we do not currently know what it being 0 entails.
* GPU: Intercept writes to the VERTEX_END_GL register.Subv2018-03-051-0/+9
| | | | | | This is the register that gets written after a game calls DrawArrays(). We should collect all GPU state and draw using our graphics API here.
* GPU: Partially implemented the QUERY_* registers in the Maxwell3D engine.Subv2018-02-121-1/+39
| | | | Only QueryMode::Write is supported at the moment.
* Make a GPU class in VideoCore to contain the GPU state.Subv2018-02-121-3/+1
| | | | Also moved the GPU MemoryManager class to video_core since it makes more sense for it to be there.
* GPU: Added a command processor to decode the GPU pushbuffers and forward the commands to their respective engines.Subv2018-02-121-0/+15