summaryrefslogtreecommitdiffstats
path: root/src/video_core/command_processor.cpp (unfollow)
Commit message (Collapse)AuthorFilesLines
2018-03-18GPU: Store uploaded GPU macros and keep track of the number of method parameters.Subv1-15/+41
2018-03-18GPU: Macros are specific to the Maxwell3D engine, so handle them internally.Subv1-29/+0
2018-03-17GPU: Process command mode 5 (IncreaseOnce) differently from other commands.Subv1-5/+38
Accumulate all arguments before calling the desired method. Note: Maybe we should do the same for the NonIncreasing mode?
2018-02-12Make a GPU class in VideoCore to contain the GPU state.Subv1-22/+11
Also moved the GPU MemoryManager class to video_core since it makes more sense for it to be there.
2018-02-12GPU: Added a command processor to decode the GPU pushbuffers and forward the commands to their respective engines.Subv1-0/+130
2018-01-13Remove references to PICA and rasterizers in video_coreJames Rowe1-647/+0
2017-10-15hle: Initial implementation of NX service framework and IPC.bunnei1-1/+1
2017-10-04Extracted the attribute setup and draw commands into their own functionsHuw Pascoe1-217/+222
2017-09-23Remove pipeline.gpu_mode and fix minor issuesJames Rowe1-12/+2
2017-09-11GPU: Add draw for immediate and batch modesJames Rowe1-2/+17
PR #1461 introduced a regression where some games would change configuration even while in the poorly named "drawing" mode, which broke the heuristic citra was using to determine when to draw the batch. This change adds back in a draw call for batching, and also adds in a draw call in immediate mode each time it adds a triangle.
2017-08-19pica/command_processor: build geometry pipeline and run geometry shaderwwylele1-27/+27
The geometry pipeline manages data transfer between VS, GS and primitive assembler. It has known four modes: - no GS mode: sends VS output directly to the primitive assembler (what citra currently does) - GS mode 0: sends VS output to GS input registers, and sends GS output to primitive assembler - GS mode 1: sends VS output to GS uniform registers, and sends GS output to primitive assembler. It also takes an index from the index buffer at the beginning of each primitive for determine the primitive size. - GS mode 2: similar to mode 1, but doesn't take the index and uses a fixed primitive size. hwtest shows that immediate mode also supports GS (at least for mode 0), so the geometry pipeline gets refactored into its own class for supporting both drawing mode. In the immediate mode, some games don't set the pipeline registers to a valid value until the first attribute input, so a geometry pipeline reset flag is set in `pipeline.vs_default_attributes_setup.index` trigger, and the actual pipeline reconfigure is triggered in the first attribute input. In the normal drawing mode with index buffer, the vertex cache is a little bit modified to support the geometry pipeline. Instead of OutputVertex, it now holds AttributeBuffer, which is the input to the geometry pipeline. The AttributeBuffer->OutputVertex conversion is done inside the pipeline vertex handler. The actual hardware vertex cache is believed to be implemented in a similar way (because this is the only way that makes sense). Both geometry pipeline and GS unit rely on states preservation across drawing call, so they are put into the global state. In the future, the other three vertex shader units should be also placed in the global state, and a scheduler should be implemented on top of the four units. Note that the current gs_unit already allows running VS on it in the future.
2017-08-07pica: upload shared shader code to both unitwwylele1-25/+37
2017-05-20pica/swrasterizer: implement procedural texturewwylele1-0/+31
2017-05-17pica: use correct register value for shader bool_uniformswwylele1-2/+2
variable value is not masked. the masked and combined register value should be used instead
2017-05-12Pica: Write GS registersJannik Vogel1-0/+52
This adds the handlers for the geometry shader register writes which will call the functions from the previous commit to update registers for the GS.
2017-05-12Pica: Write shader registers in functionsJannik Vogel1-57/+103
The commit after this one adds GS register writes, so this moves the VS handlers into functions so they can be re-used and extended more easily.
2017-02-09VideoCore: Split regs.h inclusionsYuri Kunde Schlesner1-0/+2
2017-02-09VideoCore: Use union to index into Regs structYuri Kunde Schlesner1-4/+8
Also remove some unused members.
2017-02-04VideoCore: Move Regs to its own fileYuri Kunde Schlesner1-1/+1
2017-02-04VideoCore: Split geometry pipeline regs from Regs structYuri Kunde Schlesner1-25/+26
2017-02-04VideoCore: Split texturing regs from Regs structYuri Kunde Schlesner1-12/+12
2017-02-04VideoCore: Split rasterizer regs from Regs structYuri Kunde Schlesner1-2/+3
2017-01-30VideoCore: Split shader output writing from semantic loadingYuri Kunde Schlesner1-6/+8
2017-01-30VideoCore: Consistently use shader configuration to load attributesYuri Kunde Schlesner1-2/+2
2017-01-30VideoCore: Use correct register for immediate mode attribute countYuri Kunde Schlesner1-6/+7
2017-01-30VideoCore: Rename some types to more accurate namesYuri Kunde Schlesner1-6/+5
2017-01-30VideoCore: Change misleading register namesYuri Kunde Schlesner1-2/+3
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-26VideoCore/Shader: Move entry_point to SetupBatchYuri Kunde Schlesner1-4/+4
2017-01-26VideoCore/Shader: Move per-batch ShaderEngine state into ShaderSetupYuri Kunde Schlesner1-4/+4
2017-01-26Shader: Remove OutputRegisters structYuri Kunde Schlesner1-3/+4
2017-01-26VideoCore/Shader: Split shader uniform state and shader engineYuri Kunde Schlesner1-5/+8
Currently there's only a single dummy implementation, which will be split in a following commit.
2017-01-26VideoCore/Shader: Use only entry_point as ShaderSetup paramYuri Kunde Schlesner1-2/+2
This removes all implicit dependency of ShaderState on global PICA state.
2017-01-26VideoCore/Shader: Extract input vertex loading code into functionYuri Kunde Schlesner1-2/+4
2016-12-16VideoCore/Shader: Extract DebugData out from UnitStateYuri Kunde Schlesner1-2/+2
2016-12-15VideoCore: Make profiling scope more representativeYuri Kunde Schlesner1-0/+3
2016-12-15VideoCore: Inline IsPicaTracingYuri Kunde Schlesner1-1/+4
Speeds up ALBW main menu slightly (~3%)
2016-12-15VideoCore: Eliminate an unnecessary copy in the drawcall loopYuri Kunde Schlesner1-3/+1
2016-12-11Add all services to the Service namespaceLioncash1-1/+1
Previously there was a split where some of the services were in the Service namespace and others were not.
2016-11-27GPU: Remove the broken frame_skip option.Emmanuel Gil Peyrot1-4/+0
Fixes #1960.
2016-11-24Cache Vertices instead of Output registers (#2165)jphalimi1-6/+7
This patch brings +3% performance improvement on average. It removes ToVertex() as an important hotspot of the emulator.
2016-11-22Fix format error from #2195wwylele1-1/+1
2016-11-20GPU/CiTrace: Avoid calling GetTextures() when not necessary.Subv1-6/+5
2016-10-20Fix typosRicardo de Almeida Gonzaga1-1/+1
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-4/+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-1/+2
2016-09-18Sources: Run clang-format on everything.Emmanuel Gil Peyrot1-321/+328
2016-06-07Pica: Add fog stateJannik Vogel1-0/+14
2016-05-16Retrieve shader result from new OutputRegisters-typeJannik Vogel1-8/+13
2016-05-12Move default_attributes into Pica stateJannik Vogel1-1/+1
2016-05-11Turn ShaderSetup into structJannik Vogel1-4/+4
2016-05-09vertex_loader: Add constructors to facilitate immediate and two-step initializationLioncash1-2/+1
2016-05-04Pica: Rename VertexLoaded breakpoint to VertexShaderInvocationJannik Vogel1-6/+4
2016-04-30VideoCore: Run include-what-you-use and fix most includes.Emmanuel Gil Peyrot1-8/+14
2016-04-29Common: Remove section measurement from profiler (#1731)Yuri Kunde Schlesner1-4/+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-29Move and rename the MemoryAccesses class to MemoryAccessTracker.Henrik Rydgard1-1/+1
2016-04-28Don't keep base_address in the loader, it doesn't belong there (with it, the loader can't be cached).Henrik Rydgard1-3/+4
2016-04-28Refactor: Extract VertexLoader from command_processor.cpp.Henrik Rydgard1-124/+10
Preparation for a similar concept to Dolphin or PPSSPP. These can be JIT-ed and cached.
2016-04-28Remove late accesses to attribute_configHenrik Rydgard1-5/+7
2016-04-14shader: Remove unused 'state' argument from 'Setup' function.bunnei1-2/+2
2016-04-10Pica: Remove geometry dumper (PICA_DUMP_GEOMETRY)Jannik Vogel1-19/+0
2016-03-24Pica: Improve accuracy of immediate-mode supportYuri Kunde Schlesner1-20/+26
This partially fixes Etrian Odyssey IV.
2016-03-17video_core: Don't cast away constLioncash1-5/+6
2016-03-17PICA: Alignment happens locally in vertexJannik Vogel1-6/+6
2016-03-13PICA: Align vertex attributesJannik Vogel1-1/+5
2016-03-09renderer_base: Don't directly expose the rasterizer unique_ptrLioncash1-5/+5
There's no reason to allow direct access to the unique_ptr instance. Only its contained pointer.
2016-03-03Add immediate mode vertex submissionDwayne Slater1-1/+47
2016-02-21Fix out of bounds array access when loading a component >= 12Dwayne Slater1-1/+4
2016-02-21Add support for padding vertex attributesDwayne Slater1-6/+13
2016-02-12BitField: Make trivially copyable and remove assignment operatorMerryMage1-2/+2
2016-02-05pica_types: Replace float24/20/16 with a template class.bunnei1-8/+8
2016-02-05command_processor: Add an assertion to ensure LUTs are not written past their boundaries.bunnei1-0/+3
2016-02-05pica: Implement fragment lighting LUTs.bunnei1-0/+15
2016-01-17command_processor: Get rid of variable shadowingLioncash1-2/+1
2015-12-08VideoCore: Unify interface to OpenGL and SW rasterizersYuri Kunde Schlesner1-17/+10
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-11-10GPU/Loaders: Log an error when a loader tries to load from a component beyond the available ones (12).Subv1-0/+2
Related to #1170
2015-09-11video_core: Reorganize headersLioncash1-11/+10
2015-09-02video_core: Fix format specifiers warningsaroulin1-1/+1
2015-08-30GPU: Implemented register 0x22A.Subv1-1/+2
This is the equivalent of the "first" parameter in glDrawArrays, it tells the GPU the vertex index at which to start rendering. Register 0x22A doesn't affect indexed rendering.
2015-08-25Integrate the MicroProfile profiling libraryYuri Kunde Schlesner1-0/+4
This brings goodies such as a configurable user interface and multi-threaded timeline view.
2015-08-16Introduce a shader tracer to allow inspection of input/output values for each processed instruction.Tony Wasserka1-1/+1
2015-08-15Shader: Define a common interface for running vertex shader programs.bunnei1-1/+4
2015-08-15Shader: Move shader code to its own subdirectory, "shader".bunnei1-1/+1
2015-08-15GPU: Refactor "VertexShader" namespace to "Shader".bunnei1-10/+9
- Also renames "vertex_shader.*" to "shader_interpreter.*"
2015-08-05Videocore: Implement simple vertex cachingYuri Kunde Schlesner1-62/+89
This gives a ~2/3 reduction in the amount of vertices that need to be processed through the vertex loaders and the vertex shader, yielding a good speedup.
2015-07-26citra-qt/command list: Add mask columnLectem1-14/+17
2015-07-26VideoCore: #ifdef out some debugging routinesYuri Kunde Schlesner1-1/+9
Some disabled debugging functionality was being called from rendering routines in VideoCore. Although disabled, many of them still allocated memory or did some extra work that was enough to show up in a profiler. Gives a slight (~2ms) speedup.
2015-07-23VideoCore: Fix values of unset components in input attribute arraysYuri Kunde Schlesner1-42/+38
If an input attribute array had a field with less than 4 components, the remaining components were left unset if not specified by a default vertex attribute. If neither mechanism would set a component, it would assume a garbage value. It has been verified that the hardware behavior is to instead to set the missing components from the fixed default of (0 0 0 1). The default vertex attribute values aren't used at all if a vertex array is specified for that attribute. Fixes UI graphics on Fire Emblem: Awakening, a small texturing glitch when selecting a character in Cubic Ninja, as well as eliminating the unset-W hack which was required for Ocarina of Time to not have garbled triangles. This change has been tested against hardware.
2015-07-23Qt/GPU Breakpoints: Added three more breakpoint types:Subv1-2/+2
* IncomingDisplayTransfer: Triggered just before a display transfer is performed. * GSPCommandProcessed: Triggered right after a GSP command is processed. * BufferSwapped: Triggered when the frames flip
2015-07-19Video_Core : Type fixeszawata1-1/+1
2015-07-19Video_Core : Fix Conversion Warningszawata1-1/+1
2015-07-15Pica/Shader: Add geometry shader definitions.Tony Wasserka1-39/+39
2015-07-15Pica/CommandProcessor: Move default attribute setup to the proper position.Tony Wasserka1-40/+40
2015-07-13Clean up command_processor.cpp.Tony Wasserka1-22/+27
2015-07-13Add CiTrace recording support.Tony Wasserka1-2/+53
This is exposed in the GUI as a new "CiTrace Recording" widget. Playback is implemented by a standalone 3DS homebrew application (which only runs reliably within Citra currently; on an actual 3DS it will often crash still).
2015-06-28CitraQt: Cleanup includes.Emmanuel Gil Peyrot1-5/+7
2015-05-31Pica: Implement command buffer execution registers.bunnei1-32/+38
2015-05-29Remove every trailing whitespace from the project (but externals).Emmanuel Gil Peyrot1-4/+4
2015-05-23Pica: Create 'State' structure and move state memory there.bunnei1-24/+23
2015-05-23OpenGL renderertfarley1-3/+23
2015-05-17GPU/DefaultAttributes: Clear up a comment in command_processorSubv1-2/+2
2015-05-17GPU/DefaultAttributes: Let the attribute data from the loaders overwrite the default attributes, if set.Subv1-21/+23
closes #735
2015-05-09Memory: Add GetPhysicalPointer helper functionYuri Kunde Schlesner1-2/+2
2015-05-09Memory: Support more regions in the VAddr-PAddr translation functionsYuri Kunde Schlesner1-2/+2
Also adds better documentation and removes the one-off reimplementation of the function in pica.h.
2015-05-07GPU: Implemented default vertex shader attributes.Subv1-27/+71
Fixes some games crashing.
2015-03-02Add profiling infrastructure and widgetYuri Kunde Schlesner1-0/+6
2015-02-18Pica/CommandProcessor: Properly implement shader load destination offset registers.Tony Wasserka1-18/+4
2015-02-18Pica/CommandProcessor: Work around initialized vertex attributes some more.Tony Wasserka1-2/+8
2014-12-31Pica/CommandProcessor: Cleanups.Tony Wasserka1-3/+4
2014-12-31Pica/CommandProcessor: Workaround games not setting the input position's w component.Tony Wasserka1-0/+14
2014-12-31Pica/CommandProcessor: Add support for integer uniforms.Tony Wasserka1-0/+13
2014-12-29GPU: Implement frameskip and remove forced framebuffer swap hack.bunnei1-0/+5
2014-12-21More warning cleanupsChin1-2/+2
2014-12-21License changepurpasmart961-1/+1
2014-12-20Pica: Add support for boolean uniforms.Tony Wasserka1-0/+6
2014-12-20Pica/DebugUtils: Add an event triggered after loading a vertex.Tony Wasserka1-0/+3
2014-12-20Pica/CommandProcessor: Add a safety check for invalid (?) GPU configurations.Tony Wasserka1-0/+7
2014-12-20Pica/CommandProcessor: Fix vertex decoding if multiple memory areas are accessed for different attributes.Tony Wasserka1-7/+8
2014-12-20Pica: Unify ugly address translation hacks.Tony Wasserka1-2/+2
2014-12-13Convert old logging calls to new logging macrosYuri Kunde Schlesner1-3/+3
2014-12-10GSP: Trigger GPU interrupts at more accurate locations.bunnei1-0/+6
2014-12-10GPU: Fixed bug in command list size decoding.bunnei1-1/+2
2014-12-09Pica/DebugUtils: Add breakpoint functionality.Tony Wasserka1-0/+13
2014-12-01Silence a few -Wsign-compare warnings.Rohit Nirmal1-1/+1
2014-10-30Fix some warningsSean1-1/+1
2014-10-08Fix warnings in video_coreLioncash1-6/+6
2014-08-25Pica: Consolidate the primitive assembly code in PrimitiveAssembly and GeometryDumper.Tony Wasserka1-4/+16
2014-08-25Pica/DebugUtils: Add convenient tev setup printer.Tony Wasserka1-0/+2
2014-08-25Pica/citra-qt: Replace command list view and command list debugging code with something more sophisticated.Tony Wasserka1-0/+2
2014-08-25Pica/CommandProcessor: Implement parameter masking.Tony Wasserka1-5/+13
2014-08-25Pica: Add debug utility functions for dumping geometry data.Tony Wasserka1-0/+8
2014-08-12Pica: Add primitive assembly stage.Tony Wasserka1-1/+2
2014-08-12Pica: Add vertex shader implementation.Tony Wasserka1-5/+103
2014-08-12Pica: Implement vertex loading.Tony Wasserka1-1/+80
2014-08-12Pica: Add command processor.Tony Wasserka1-0/+60