summaryrefslogtreecommitdiffstats
path: root/src/video_core/engines/maxwell_3d.h (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Fix typos in video_coreViktor Szépe2024-01-071-5/+5
|
* Query Cachge: Fully rework Vulkan's query cacheFernando Sahmkow2023-09-231-3/+0
|
* video_core: Keep the definition of DimensionControl consistent with nvidia open docFeng Chen2023-03-311-4/+4
|
* video_core: Implement maxwell3d draw texture methodFeng Chen2023-01-051-1/+15
|
* Video_core: Address feedbackFernando Sahmkow2023-01-041-18/+12
|
* Vulkan: rework stencil tracking.Fernando Sahmkow2023-01-031-4/+4
|
* MacroHLE: Final cleanup and fixes.Fernando Sahmkow2023-01-011-1/+1
|
* DMAPusher: Improve collection of non executing methodsFernando Sahmkow2023-01-011-0/+4
|
* Revert Buffer cache changes and setup additional macros.Fernando Sahmkow2023-01-011-5/+18
|
* MacroHLE: Reduce massive calculations on sizing estimation.Fernando Sahmkow2023-01-011-0/+2
|
* MacroHLE: Add HLE replacement for base vertex and base instance.Fernando Sahmkow2023-01-011-0/+17
|
* MacroHLE: Add Index Buffer size estimation.Fernando Sahmkow2023-01-011-0/+2
|
* MacroHLE: Refactor MacroHLE system.Fernando Sahmkow2023-01-011-3/+18
|
* MacroHLE: Implement DrawIndexedIndirect & DrawArraysIndirect.Fernando Sahmkow2023-01-011-3/+9
|
* video_core: Implement maxwell3d draw manager and split draw logicFeng Chen2022-12-081-20/+5
|
* Merge pull request #9353 from vonchenplus/draw_indexedliamwhite2022-12-031-0/+1
|\ | | | | video_core: Fine tuning the index drawing judgment logic
| * video_core: Fine tuning the index drawing judgment logicFeng Chen2022-12-011-0/+1
| |
* | maxwell_3d: Mark shifted value as unsignedLioncash2022-11-291-3/+3
| | | | | | | | | | | | | | Otherwise this is technically creating a signed int result that gets converted. Just a consistency change. While we're in the area, we can mark Samples() as const.
* | engines: Remove unnecessary castsLioncash2022-11-291-48/+25
|/ | | | In a few cases we have some casts that can be trivially removed.
* video_core: Optimize maxwell drawing trigger mechanismFengChen2022-11-221-2/+6
|
* maxwell3d: full HLE for multi-layer clearsLiam2022-11-171-4/+3
|
* maxwell3d: HLE multi-layer clear macroLiam2022-11-171-0/+1
|
* Fix regs regression with OpenGL two-sided stencil, and re-add data invalidation regKelebek12022-11-111-4/+12
|
* ir/texture_pass: Use host_info instead of querying Settings::values (#9176)Morph2022-11-111-2/+2
|
* video_core: Fix drawing trigger mechanism regressionFengChen2022-10-271-0/+2
|
* video_core: Implement maxwell inline_index methodFengChen2022-10-221-8/+5
|
* video_coare: Reimplementing the maxwell drawing trigger mechanismFengChen2022-10-211-29/+4
|
* renderer_(opengl/vulkan): Fix tessellation clockwise parameterMorph2022-10-131-2/+2
| | | | This should be assigned CW only on Triangles_CW rather than not Triangles_CCW, making CCW the default winding order rather than CW.
* Fix stencil func registers, make clip control equivalent to how it was before, but surely wrong.Kelebek12022-10-101-10/+12
|
* Update 3D regsKelebek12022-10-071-1014/+2825
|
* common: Change semantics of UNREACHABLE to unconditionally crashLiam2022-06-141-6/+6
|
* Maxwell3D: Fix 3D semaphore counter type 0 handlingBilly Laws2022-06-021-1/+1
| | | | Counter type 0 actually releases the semaphore payload rather than a constant zero as was previously thought. This is required by Skyrim.
* general: Convert source file copyright comments over to SPDXMorph2022-04-231-3/+2
| | | | | This formats all copyright comments according to SPDX formatting guidelines. Additionally, this resolves the remaining GPLv2 only licensed files by relicensing them to GPLv2.0-or-later.
* maxwell3d: add small_index_2 registerLiam2022-04-141-1/+6
|
* video_core: Reduce unused includesameerj2022-03-191-1/+0
|
* Merge pull request #8023 from ameerj/kirby-pop-inFernando S2022-03-161-14/+1
|\ | | | | maxwell_3d: Implement a safer CB data upload
| * maxwell_3d: Implement a safer CB data uploadameerj2022-03-151-14/+1
| | | | | | | | This makes constant buffer uploads safer and more accurate by updating the GPU memory as soon as the CB Data method is invoked. The previous implementation was deferring the updates until a different maxwell 3d method was detected, then writing all CB data at once.
* | Maxwell3D: Link to override constant definition in nouveaubyte[]2022-03-141-0/+2
| |
* | Maxwell3D: Use override constants from nouveauLiam2022-03-141-1/+15
| | | | | | | | This fixes some incorrect rendering in Sunshine
* | Maxwell3D: Restrict topology override effect to after the register is setLiam2022-03-121-0/+1
| |
* | Maxwell3D: read small-index draw and primitive topology override registersLiam2022-03-111-2/+16
|/ | | | This allows Galaxy and Sunshine to render for the first time.
* Rasterizer: Refactor inlineToMemory.Fernando Sahmkow2022-02-011-1/+1
|
* Rasterizer: Implement Inline2Memory Acceleration.Fernando Sahmkow2022-01-291-1/+2
|
* common/logging: Move Log::Entry declaration to a separate headerameerj2021-10-021-0/+1
| | | | This reduces the load of requiring to include std::chrono in all files which include log.h
* Fix blend equation enum errorFeng Chen2021-09-071-4/+4
|
* vk_rasterizer: Workaround bug in VK_EXT_vertex_input_dynamic_stateReinUsesLisp2021-07-231-4/+0
| | | | | Workaround potential bug on Nvidia's driver where only updating high attributes leaves low attributes out dated.
* shader: Rework varyings and implement passthrough geometry shadersReinUsesLisp2021-07-231-1/+6
| | | | | | Put all varyings into a single std::bitset with helpers to access it. Implement passthrough geometry shaders using host's.
* vk_graphics_pipeline: Implement conservative renderingReinUsesLisp2021-07-231-1/+6
|
* shader: Unify shader stage typesReinUsesLisp2021-07-231-1/+0
|
* vulkan: Use VK_EXT_provoking_vertex when availableReinUsesLisp2021-07-231-1/+6
|
* shader: Remove old shader managementReinUsesLisp2021-07-231-19/+1
|
* maxwell3d: Add missing return in default SizeInBytes() caseLioncash2021-06-231-0/+1
| | | | | We were returning '1' in ComponentCount()'s default case but were neglecting to do the same with SizeInBytes().
* video_core: Reimplement the buffer cacheReinUsesLisp2021-02-131-9/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Reimplement the buffer cache using cached bindings and page level granularity for modification tracking. This also drops the usage of shared pointers and virtual functions from the cache. - Bindings are cached, allowing to skip work when the game changes few bits between draws. - OpenGL Assembly shaders no longer copy when a region has been modified from the GPU to emulate constant buffers, instead GL_EXT_memory_object is used to alias sub-buffers within the same allocation. - OpenGL Assembly shaders stream constant buffer data using glProgramBufferParametersIuivNV, from NV_parameter_buffer_object. In theory this should save one hash table resolve inside the driver compared to glBufferSubData. - A new OpenGL stream buffer is implemented based on fences for drivers that are not Nvidia's proprietary, due to their low performance on partial glBufferSubData calls synchronized with 3D rendering (that some games use a lot). - Most optimizations are shared between APIs now, allowing Vulkan to cache more bindings than before, skipping unnecesarry work. This commit adds the necessary infrastructure to use Vulkan object from OpenGL. Overall, it improves performance and fixes some bugs present on the old cache. There are still some edge cases hit by some games that harm performance on some vendors, this are planned to be fixed in later commits.
* gpu: Report renderer errors with exceptionsReinUsesLisp2021-02-131-1/+1
| | | | | | Instead of using a two step initialization to report errors, initialize the GPU renderer and rasterizer on the constructor and report errors through std::runtime_error.
* maxwell_3d: Silence array bounds warningsReinUsesLisp2021-01-241-1/+1
|
* common/common_funcs: Rename INSERT_UNION_PADDING_{BYTES,WORDS} to _NOINITReinUsesLisp2021-01-151-75/+75
| | | | INSERT_PADDING_BYTES_NOINIT is more descriptive of the underlying behavior.
* video_core: Rewrite the texture cacheReinUsesLisp2020-12-301-50/+77
| | | | | | | | | | | | | | The current texture cache has several points that hurt maintainability and performance. It's easy to break unrelated parts of the cache when doing minor changes. The cache can easily forget valuable information about the cached textures by CPU writes or simply by its normal usage.The current texture cache has several points that hurt maintainability and performance. It's easy to break unrelated parts of the cache when doing minor changes. The cache can easily forget valuable information about the cached textures by CPU writes or simply by its normal usage. This commit aims to address those issues.
* maxwell_3d: Move member variables to end of classLioncash2020-12-071-31/+32
| | | | Follows our established coding style.
* maxwell_3d: Resolve -Wdocumentation warningLioncash2020-12-071-1/+1
| | | | Removes a documentation comment for a non-existent member.
* maxwell_3d: Remove unused dirty_pointer arrayLioncash2020-12-071-2/+0
| | | | This is unused and removing it shrinks the structure by 3584 bytes.
* vk_shader_decompiler: Implement force early fragment testsReinUsesLisp2020-11-261-1/+6
| | | | | | | | Force early fragment tests when the 3D method is enabled. The established pipeline cache takes care of recompiling if needed. This is implemented only on Vulkan to avoid invalidating the shader cache on OpenGL.
* maxwell_3d: Move code to separate functionsReinUsesLisp2020-11-111-0/+8
| | | | | Deduplicate some code and put it in separate functions so it's easier to understand and profile.
* video_core: Initialize renderer with a GPUReinUsesLisp2020-08-221-10/+11
| | | | | Add an extra step in GPU initialization to be able to initialize render backends with a valid GPU instance.
* maxwell_3d: Resolve -Wextra-semi warningLioncash2020-08-141-1/+1
| | | | Semicolons after a function definition aren't necessary.
* Addressed issuesDavid Marcec2020-06-241-0/+4
|
* Macro HLE supportDavid Marcec2020-06-241-0/+4
|
* Merge pull request #4049 from ReinUsesLisp/separate-samplersbunnei2020-06-131-0/+2
|\ | | | | shader/texture: Join separate image and sampler pairs offline
| * shader/texture: Join separate image and sampler pairs offlineReinUsesLisp2020-06-051-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Games using D3D idioms can join images and samplers when a shader executes, instead of baking them into a combined sampler image. This is also possible on Vulkan. One approach to this solution would be to use separate samplers on Vulkan and leave this unimplemented on OpenGL, but we can't do this because there's no consistent way of determining which constant buffer holds a sampler and which one an image. We could in theory find the first bit and if it's in the TIC area, it's an image; but this falls apart when an image or sampler handle use an index of zero. The used approach is to track for a LOP.OR operation (this is done at an IR level, not at an ISA level), track again the constant buffers used as source and store this pair. Then, outside of shader execution, join the sample and image pair with a bitwise or operation. This approach won't work on games that truly use separate samplers in a meaningful way. For example, pooling textures in a 2D array and determining at runtime what sampler to use. This invalidates OpenGL's disk shader cache :) - Used mostly by D3D ports to Switch
* | texture_cache: Implement rendering to 3D texturesReinUsesLisp2020-06-081-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This allows rendering to 3D textures with more than one slice. Applications are allowed to render to more than one slice of a texture using gl_Layer from a VTG shader. This also requires reworking how 3D texture collisions are handled, for now, this commit allows rendering to slices but not to miplevels. When a render target attempts to write to a mipmap, we fallback to the previous implementation (copying or flushing as needed). - Fixes color correction 3D textures on UE4 games (rainbow effects). - Allows Xenoblade games to render to 3D textures directly.
* | Mark parameters as constDavid Marcec2020-06-031-2/+1
| |
* | Pass by reference instead of copying parametersDavid Marcec2020-06-021-1/+1
| |
* | Implement macro JITDavid Marcec2020-05-301-15/+4
|/
* Merge pull request #3885 from ReinUsesLisp/viewport-swizzlesbunnei2020-05-081-1/+19
|\ | | | | video_core: Implement viewport swizzles with NV_viewport_swizzle
| * vk_graphics_pipeline: Implement viewport swizzles with NV_viewport_swizzleReinUsesLisp2020-05-041-0/+1
| |
| * maxwell_3d: Add viewport swizzlesReinUsesLisp2020-05-041-1/+18
| |
* | Merge pull request #3815 from FernandoS27/command-list-2bunnei2020-05-051-4/+6
|\ \ | |/ |/| GPU: More optimizations to GPU Command List Processing and DMA Copy Optimizations
| * Clang Format and Documentation.Fernando Sahmkow2020-04-281-1/+2
| |
| * VideoCore/Engines: Refactor Engines CallMethod.Fernando Sahmkow2020-04-281-4/+5
| |
* | Merge pull request #3808 from ReinUsesLisp/wait-for-idlebunnei2020-05-031-1/+4
|\ \ | | | | | | {maxwell_3d,buffer_cache}: Implement memory barriers using 3D registers
| * | {maxwell_3d,buffer_cache}: Implement memory barriers using 3D registersReinUsesLisp2020-04-281-1/+4
| |/ | | | | | | | | | | | | | | | | | | | | | | | | Drop MemoryBarrier from the buffer cache and use Maxwell3D's register WaitForIdle. To implement this on OpenGL we just call glMemoryBarrier with the necessary bits. Vulkan lacks this synchronization primitive, so we set an event and immediately wait for it. This is not a pretty solution, but it's what Vulkan can do without submitting the current command buffer to the queue (which ends up being more expensive on the CPU).
* / maxwell_3d: Fix depth clamping registerReinUsesLisp2020-04-281-0/+1
|/ | | | | | | | | | | | | | | | | | | | | | Using deko3d as reference: https://github.com/devkitPro/deko3d/blob/4e47ba0013552e592a86ab7a2510d1e7dadf236a/source/maxwell/gpu_3d_state.cpp#L42 We were using bits 3 and 4 to determine depth clamping, but these are the same both enabled and disabled: state->depthClampEnable ? 0x101A : 0x181D The same happens on Nvidia's OpenGL driver, where they do something like this (default capabilities, GL 4.5 compatibility): (state & DEPTH_CLAMP) != 0 ? 0x201a : 0x281c There's always a difference between the first bits in this register, but bit 11 is consistently disabled on both deko3d/NVN and OpenGL. This commit changes yuzu's behaviour to use bit 11 to determine depth clamping. - Fixes depth issues on Super Mario Odyssey's intro.
* Merge pull request #3742 from FernandoS27/command-listbunnei2020-04-271-0/+4
|\ | | | | Optimize GPU Command Lists and Introduce Fast GPU Time Option
| * DMAPusher: Propagate multimethod writes into the engines.Fernando Sahmkow2020-04-231-0/+4
| |
* | gl_rasterizer: Fix buffers without sizeReinUsesLisp2020-04-221-1/+2
|/ | | | | | | | | | | On NVN buffers can be enabled but have no size. According to deko3d and the behavior we see in Animal Crossing: New Horizons these buffers get the special address of 0x1000 and limit themselves to 0xfff. Implement buffers without a size by binding a null buffer to OpenGL without a side. https://github.com/devkitPro/deko3d/blob/1d1930beea093b5a663419e93b0649719a3ca5da/source/maxwell/gpu_3d_vbo.cpp#L62-L63
* fixed_pipeline_state: Pack attribute stateReinUsesLisp2020-04-191-1/+1
| | | | Reduce FixedPipelineState's size from 1384 to 664 bytes
* gl_rasterizer: Implement constant vertex attributesReinUsesLisp2020-04-141-0/+4
| | | | | Credits go to gdkchan from Ryujinx for finding constant attributes are used in retail games.
* gl_rasterizer: Implement line widths and smooth linesReinUsesLisp2020-04-131-2/+8
| | | | | Implements "legacy" features from OpenGL present on hardware such as smooth lines and line width.
* video_core: Add MSAA registers in 3D engine and TICReinUsesLisp2020-04-121-6/+61
| | | | | This adds the registers used for multisampling. It doesn't implement anything for now.
* maxwell_3d: change declaration ordernamkazy2020-03-221-1/+3
|
* maxwell_3d: update comments for shadow ram usagenamkazy2020-03-221-0/+4
|
* maxwell_3d: implement MME shadow RAMNguyen Dac Nam2020-03-221-1/+14
|
* maxwell_3d: Add padding words to XFB entriesReinUsesLisp2020-03-131-2/+4
| | | | | Use INSERT_UNION_PADDING_WORDS instead of alignas to ensure a size requirement.
* gl_rasterizer: Implement transform feedback bindingsReinUsesLisp2020-03-131-0/+9
|
* Merge branch 'master' into shader-purgeRodrigo Locatti2020-03-131-2/+20
|\
| * gl_rasterizer: Implement polygon modes and fill rectanglesReinUsesLisp2020-03-101-2/+20
| |
* | engines/maxwell_3d: Add TFB registers and store them in shader registryReinUsesLisp2020-03-091-2/+32
|/
* state_tracker: Remove type traits with named structuresReinUsesLisp2020-02-281-4/+8
|
* maxwell_3d: Use two tables instead of three for dirty flagsReinUsesLisp2020-02-281-1/+1
|
* maxwell_3d: Change write dirty flags to a bitsetReinUsesLisp2020-02-281-4/+2
|
* maxwell_3d: Flatten cull and front face registersReinUsesLisp2020-02-281-16/+14
|
* video_core: Reintroduce dirty flags infrastructureReinUsesLisp2020-02-281-0/+14
|
* gl_state: Remove clip distances trackingReinUsesLisp2020-02-281-10/+1
|
* gl_state: Remove viewport and depth range trackingReinUsesLisp2020-02-281-9/+9
|
* gl_rasterizer: Remove dirty flagsReinUsesLisp2020-02-281-75/+0
|
* Merge pull request #3425 from ReinUsesLisp/layered-framebufferbunnei2020-02-241-2/+7
|\ | | | | texture_cache: Implement layered framebuffer attachments
| * texture_cache: Implement layered framebuffer attachmentsReinUsesLisp2020-02-161-2/+7
| | | | | | | | | | | | Layered framebuffer attachments is a feature that allows applications to write attach layered textures to a single attachment. What layer the fragments are written to is decided from the shader using gl_Layer.
* | gl_query_cache: Implement host queries using a deferred cacheReinUsesLisp2020-02-141-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of waiting immediately for executed commands, defer the query until the guest CPU reads it. This way we get closer to what the guest program is doing. To archive this we have to build a dependency queue, because host APIs (like OpenGL and Vulkan) use ranged queries instead of counters like NVN. Waiting for queries implicitly uses fences and this requires a command being queued, otherwise the driver will lock waiting until a timeout. To fix this when there are no commands queued, we explicitly call glFlush.
* | maxwell_3d: Slow implementation of passed samples (query 21)ReinUsesLisp2020-02-141-4/+34
|/ | | | Implements GL_SAMPLES_PASSED by waiting immediately for queries.
* Merge pull request #3395 from FernandoS27/queriesbunnei2020-02-141-7/+9
|\ | | | | GPU: Refactor queries implementation and correct GPU Clock.
| * Maxwell3D: Correct query reporting.Fernando Sahmkow2020-02-101-7/+9
| |
* | Merge pull request #3376 from ReinUsesLisp/point-spritebunnei2020-02-111-1/+6
|\ \ | |/ |/| gl_rasterizer: Implement GL_POINT_SPRITE
| * gl_rasterizer: Implement GL_POINT_SPRITEReinUsesLisp2020-02-041-1/+6
| | | | | | | | | | | | OpenGL core defaults to GL_POINT_SPRITE, meanwhile on OpenGL compatibility we have to explicitly enable it. This fixes gl_PointCoord's behaviour.
* | maxwell_3d: Fix stencil back maskReinUsesLisp2020-02-021-3/+3
|/
* Shader_IR: Allow constant access of guest driver.Fernando Sahmkow2020-01-241-0/+2
|
* GPU: Implement guest driver profile and deduce texture handler sizes.Fernando Sahmkow2020-01-241-0/+2
|
* Merge pull request #3305 from ReinUsesLisp/point-size-programbunnei2020-01-181-1/+9
|\ | | | | gl_state: Implement PROGRAM_POINT_SIZE
| * gl_state: Implement PROGRAM_POINT_SIZEReinUsesLisp2020-01-151-1/+9
| | | | | | | | | | For gl_PointSize to have effect we have to activate GL_PROGRAM_POINT_SIZE.
* | maxwell_3d: Make dirty_pointers privateLioncash2020-01-161-2/+2
|/ | | | | This isn't used outside of the class itself, so we can make it private for the time being.
* Merge pull request #3244 from ReinUsesLisp/vk-fpsFernando Sahmkow2019-12-251-6/+14
|\ | | | | fixed_pipeline_state: Define structure and loaders
| * maxwell_3d: Add depth bounds registersReinUsesLisp2019-12-231-6/+14
| |
* | gl_rasterizer: Implement RASTERIZE_ENABLEReinUsesLisp2019-12-181-1/+6
|/ | | | | | | | 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.
* Maxwell3D: Implement Depth Mode.Fernando Sahmkow2019-12-111-6/+7
| | | | | This commit finishes adding depth mode that was reverted before due to other unresolved issues.
* maxwell_3d: Add tessellation tess level registersReinUsesLisp2019-12-071-1/+6
|
* maxwell_3d: Add tessellation mode registerReinUsesLisp2019-12-071-1/+28
|
* maxwell_3d: Add patch vertices registerReinUsesLisp2019-12-071-1/+4
|
* Merge pull request #3098 from ReinUsesLisp/shader-invalidationsbunnei2019-11-251-11/+3
|\ | | | | gl_shader_cache: Miscellaneous changes to shaders
| * gl_shader_cache: Remove dynamic BaseBinding specializationReinUsesLisp2019-11-231-1/+0
| |
| * video_core: Unify ProgramType and ShaderStage into ShaderTypeReinUsesLisp2019-11-231-10/+3
| |
* | maxwell_3d: Fix stencil_back_func_mask offsetReinUsesLisp2019-11-131-3/+3
|/ | | | | stencil_back_func_mask and stencil_back_mask were misplaced. This commit addresses that issue.
* common_func: Use std::array for INSERT_PADDING_* macros.bunnei2019-11-041-58/+58
| | | | - Zero initialization here is useful for determinism.
* maxwell_3d/kepler_compute: Remove unused arguments in GetTextureReinUsesLisp2019-10-281-3/+2
|
* maxwell_3d: Remove unused method GetStageTexturesReinUsesLisp2019-10-281-3/+0
|
* maxwell_3d: Silence implicit conversion warningsReinUsesLisp2019-10-271-0/+2
| | | | While we are at it, unify types for dirty reg pointers.
* Shader_IR: allow lookup of texture samplers within the shader_ir for instructions that don't provide itFernando Sahmkow2019-10-251-1/+10
|
* VideoCore: Unify const buffer accessing along engines and provide ConstBufferLocker class to shaders.Fernando Sahmkow2019-10-251-2/+3
|
* maxwell_3d: Add dirty flags for depth bounds valuesReinUsesLisp2019-10-051-1/+5
| | | | | This is useful in Vulkan where we want to update depth bounds without caring if it's enabled or disabled through vkCmdSetDepthBounds.
* Maxwell3D: Corrections and refactors to MME instance refactorFernando Sahmkow2019-09-221-2/+5
|
* VideoCore: Corrections to the MME Inliner and removal of hacky instance management.Fernando Sahmkow2019-09-191-2/+5
|
* Video Core: initial Implementation of InstanceDraw PackagingFernando Sahmkow2019-09-191-1/+22
|
* Merge pull request #2824 from ReinUsesLisp/mmeFernando Sahmkow2019-09-151-1/+7
|\ | | | | Revert "Revert #2466" and stub FirmwareCall 4
| * Revert "Revert #2466" and stub FirmwareCall 4ReinUsesLisp2019-09-041-1/+7
| |
* | Merge pull request #2810 from ReinUsesLisp/mme-optbunnei2019-09-101-1/+2
|\ \ | | | | | | maxwell_3d: Avoid moving macro_params
| * | maxwell_3d: Avoid moving macro_paramsReinUsesLisp2019-09-041-1/+2
| |/
* / gl_rasterizer: Implement image bindingsReinUsesLisp2019-09-061-0/+1
|/
* maxwell_3d: Fix macro binding cursorReinUsesLisp2019-09-011-1/+1
|
* Merge pull request #2704 from FernandoS27/conditionalbunnei2019-07-241-1/+44
|\ | | | | maxwell3d: Implement Conditional Rendering
| * maxwell3d: Implement Conditional RenderingFernando Sahmkow2019-07-171-1/+44
| | | | | | | | | | | | Conditional Rendering takes care of conditionaly clearing or drawing depending on a set of queries. This PR implements the query checks to stablish if things can be rendered or not.
* | Maxwell3D: Reorganize and address feedbackFernando Sahmkow2019-07-201-2/+2
| |
* | GL_State: Feedback and fixesFernando Sahmkow2019-07-171-1/+7
| |
* | Maxwell3D: Address FeedbackFernando Sahmkow2019-07-171-3/+3
| |
* | Maxwell3D: Implement State Dirty Flags.Fernando Sahmkow2019-07-171-6/+4
| |
* | Maxwell3D: Rework CBData UploadFernando Sahmkow2019-07-171-0/+11
| |
* | Maxwell3D: Rework the dirty system to be more consistant and scaleableFernando Sahmkow2019-07-171-11/+63
|/
* gl_rasterizer: Minor style changesReinUsesLisp2019-07-061-0/+1
|
* video_core/engines: Move ConstBufferInfo out of Maxwell3DReinUsesLisp2019-06-081-7/+1
|
* Merge pull request #2441 from ReinUsesLisp/al2pbunnei2019-05-191-0/+1
|\ | | | | shader: Implement AL2P and ALD.PHYS
| * gl_shader_decompiler: Declare all possible varyings on physical attribute usageReinUsesLisp2019-05-031-0/+1
| |
* | video_core/engines/maxwell_3d: Add is_trivially_copyable_v check for RegsLioncash2019-05-141-0/+2
| | | | | | | | | | | | | | std::memset is used to clear the entire register structure, which requires that the Regs struct be trivially copyable (otherwise undefined behavior is invoked). This prevents the case where a non-trivial type is potentially added to the struct.
* | Merge pull request #2429 from FernandoS27/computebunnei2019-05-091-1/+24
|\ \ | |/ |/| Corrections and Implementation on GPU Engines
| * Refactors and name corrections.Fernando Sahmkow2019-05-011-1/+1
| |
| * Add Documentation Headers to all the GPU EnginesFernando Sahmkow2019-04-231-0/+6
| |
| * Implement Maxwell3D Data UploadFernando Sahmkow2019-04-231-1/+18
| |
* | Merge pull request #2322 from ReinUsesLisp/wswitchbunnei2019-04-291-2/+3
|\ \ | |/ |/| video_core: Silent -Wswitch warnings
| * video_core: Silent -Wswitch warningsReinUsesLisp2019-04-181-2/+3
| |
* | Move ConstBufferAccessor to Maxwell3d, correct mistakes and clang format.Fernando Sahmkow2019-04-081-0/+2
| |
* | Implement Bindless Handling on SetupTextureFernando Sahmkow2019-04-081-0/+4
|/
* Merge pull request #2317 from FernandoS27/syncbunnei2019-04-061-1/+15
|\ | | | | Implement SyncPoint Register in the GPU.
| * Implement SyncPoint Register in the GPU.Fernando Sahmkow2019-04-061-1/+15
| |
* | video_core/engines: Make memory manager members privateLioncash2019-04-061-1/+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-1/+4
|/ | | | | | 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
* Merge pull request #2163 from ReinUsesLisp/bitset-dirtybunnei2019-02-281-7/+8
|\ | | | | maxwell_3d: Use std::bitset to manage dirty flags
| * maxwell_3d: Use std::bitset to manage dirty flagsReinUsesLisp2019-02-261-7/+8
| |
* | common/math_util: Move contents into the Common namespaceLioncash2019-02-271-1/+1
|/ | | | | These types are within the common library, so they should be within the Common namespace.
* video_core: Remove usages of System::GetInstance() within the enginesLioncash2019-02-161-1/+8
| | | | | Avoids the use of the global accessor in favor of explicitly making the system a dependency within the interface.
* gl_rasterizer_cache: Use dirty flags for the depth bufferReinUsesLisp2019-01-071-0/+2
|
* gl_rasterizer_cache: Use dirty flags for color buffersReinUsesLisp2019-01-071-0/+3
|
* gl_shader_cache: Use dirty flags for shadersReinUsesLisp2019-01-071-0/+3
|
* Fixed uninitialized memory due to missing returns in canaryDavid Marcec2018-12-191-0/+2
| | | | Functions which are suppose to crash on non canary builds usually don't return anything which lead to uninitialized memory being used.
* gl_rasterizer: Enable clip distances when set in register and in shaderReinUsesLisp2018-11-291-0/+1
|
* Merge pull request #1808 from Tinob/masterbunnei2018-11-281-1/+15
|\ | | | | Fix clip distance and viewport
| * Add support for Clip Distance enabled registerRodolfo Bogado2018-11-271-1/+15
| |
* | Merge pull request #1786 from Tinob/DepthClampbunnei2018-11-281-1/+9
|\ \ | | | | | | Add Depth Clamp Support
| * | Implement depth clampRodolfo Bogado2018-11-271-1/+9
| |/
* / gpu: Rewrite GPU command list processing with DmaPusher class.bunnei2018-11-271-1/+1
|/ | | | - More accurate impl., fixes Undertale (among other games).
* Merge pull request #1794 from Tinob/masterbunnei2018-11-271-1/+9
|\ | | | | Add support for viewport_transfom_enable register
| * Add support for viewport_transfom_enable registerRodolfo Bogado2018-11-241-1/+9
| |
* | Merge pull request #1723 from degasus/dirty_flagsbunnei2018-11-271-0/+5
|\ \ | | | | | | 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/+5
| | |
* | | GPU States: Implement Polygon Offset. This is used in SMO all the time. (#1784)Marcos2018-11-271-4/+26
| | | | | | | | | | | | | | | | | | | | | | | | * GPU States: Implement Polygon Offset. This is used in SMO all the time. * Clang Format fixes. * Initialize polygon_offset in the constructor.
* | | gl_shader_decompiler: Implement S2R's Y_DIRECTIONReinUsesLisp2018-11-251-0/+1
| |/ |/|
* | Add support for clear_flags registerRodolfo Bogado2018-11-241-1/+11
| |
* | maxwell_3d: Implement alternate blend equations.bunnei2018-11-221-0/+7
| | | | | | | | - Used by Undertale.
* | small fix for alphaToOne bit locationRodolfo Bogado2018-11-171-2/+2
| |
* | fix for gcc compilationRodolfo Bogado2018-11-171-60/+61
| |
* | add AlphaToCoverage and AlphaToOneRodolfo Bogado2018-11-171-1/+7
| |
* | add support for fragment_color_clampRodolfo Bogado2018-11-171-1/+4
| |
* | fix viewport and scissor behaviorRodolfo Bogado2018-11-171-10/+16
|/
* 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/+8
|
* Merge pull request #1654 from degasus/dirty_flagsbunnei2018-11-111-0/+6
|\ | | | | 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/+6
| |
* | Add support to color mask to avoid issues in blending caused by wrong values in the alpha channel in some render targets.Rodolfo Bogado2018-11-051-3/+20
| |
* | Implement multi-target viewports and blendingRodolfo Bogado2018-11-051-2/+12
|/
* maxwell_3d: Restructure macro upload to use a single macro code memory.bunnei2018-11-011-4/+21
| | | | | - Fixes an issue where macros could be skipped. - Fixes rendering of distant objects in Super Mario Odyssey.
* Implement sRGB Support, including workarounds for nvidia driver issues and QT sRGB supportRodolfo Bogado2018-10-281-1/+6
|
* gl_rasterizer: Implement primitive restart.bunnei2018-10-261-1/+9
|
* maxwell_3d: Add code for initializing register defaults.bunnei2018-10-261-0/+2
|
* Implemented Alpha TestingFernandoS272018-10-221-1/+3
|
* Implement 3D TexturesFernandoS272018-10-181-1/+4
|
* Merge pull request #1458 from FernandoS27/fix-render-target-block-settingsbunnei2018-10-111-2/+22
|\ | | | | Fixed block height settings for RenderTargets and Depth Buffers
| * Add memory Layout to Render Targets and Depth BuffersFernandoS272018-10-101-2/+14
| |
| * Fixed block height settings for RenderTargets and Depth Buffers, and added block width and block depthFernandoS272018-10-101-2/+10
| |
* | Assert Scissor testsFernandoS272018-10-091-1/+16
|/
* gl_rasterizer: Implement quads topologyReinUsesLisp2018-10-041-0/+6
|
* Merge pull request #1411 from ReinUsesLisp/point-sizebunnei2018-09-291-1/+6
|\ | | | | video_core: Implement point_size and add point state sync
| * video_core: Implement point_size and add point state syncReinUsesLisp2018-09-281-1/+6
| |
* | gl_state: Pack sampler bindings into a single ARB_multi_bindReinUsesLisp2018-09-281-0/+1
|/
* video_core: Add asserts for CS, TFB and alpha testingReinUsesLisp2018-09-261-2/+10
| | | | | | 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.
* Port #4182 from Citra: "Prefix all size_t with std::"fearlessTobi2018-09-151-14/+14
|
* gl_rasterizer: Implement multiple color attachments.bunnei2018-09-101-1/+21
|
* gl_rasterizer: Implement a VAO cache.Markus Wick2018-09-051-2/+7
| | | | | | 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.
* maxwell_3d: Update to include additional stencil registers.bunnei2018-08-231-20/+50
|
* GPU: Added registers for the logicop functionality.Subv2018-08-211-1/+28
|
* GLRasterizer: Implemented instanced vertex arrays.Subv2018-08-181-1/+14
| | | | 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.
* Rasterizer: Implemented instanced rendering.Subv2018-08-151-0/+3
| | | | | | 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.
* Merge pull request #1024 from Subv/blend_glbunnei2018-08-121-0/+21
|\ | | | | GPU/Maxwell3D: Implemented an alternative set of blend factors.
| * GPU/Maxwell3D: Implemented an alternative set of blend factors.Subv2018-08-121-0/+21
| | | | | | | | These are used by nouveau and some games like SMO.
* | RasterizerGL: Ignore invalid/unset vertex attributes.Subv2018-08-121-0/+5
|/ | | | This should make the es2gears example not crash anymore.
* maxwell_3d: Use correct const buffer size and check bounds.bunnei2018-08-081-1/+1
| | | | - Fixes mem corruption with Super Mario Odyssey and Pokkén Tournament DX.
* video_core: Eliminate the g_renderer global variableLioncash2018-08-041-1/+7
| | | | | | | | | | | | | | 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.
* maxwell_3d: Add depth buffer enable, width, and height registers.bunnei2018-07-221-2/+14
|
* video_core: Use nested namespaces where applicableLioncash2018-07-211-4/+2
| | | | Compresses a few namespace specifiers to be more compact.
* GPU: Added register definitions for the stencil parameters.Subv2018-07-171-2/+25
|
* gl_rasterizer: Fix check for if a shader stage is enabled.bunnei2018-07-131-3/+8
|
* GPU: Allow using the old NV04 values for the depth test function.Subv2018-07-051-9/+21
| | | | | | These seem to be just a valid as the GL token values. Thanks @ReinUsesLisp This restores graphical output to Disgaea 5
* GPU: Flip the triangle front face winding if the GPU is configured to not flip the triangles.Subv2018-07-041-3/+19
| | | | | | OpenGL's default behavior is already correct when the GPU is configured to flip the triangles. This fixes 1-2 Switch's splash screen.
* Merge pull request #609 from Subv/clear_buffersbunnei2018-07-041-2/+27
|\ | | | | GPU: Implemented the CLEAR_BUFFERS register.
| * GPU: Added registers for the CLEAR_BUFFERS and CLEAR_COLOR methods.Subv2018-07-031-2/+27
| |
* | GPU: Use only the least significant 3 bits when reading the depth test func.Subv2018-07-031-9/+9
|/ | | | Some games set the full GL define value here (including nouveau), but others just seem to set those last 3 bits.
* Merge pull request #608 from Subv/depthbunnei2018-07-031-4/+52
|\ | | | | GPU: Implemented the depth buffer and depth test + culling
| * GPU: Added registers for depth test and cull mode.Subv2018-07-021-3/+51
| |
| * GPU: Implemented the Z24S8 depth format and load the depth framebuffer.Subv2018-07-021-1/+1
| |
* | GPU: Added register definitions for the vertex buffer base element.Subv2018-07-021-1/+6
|/
* maxwell_3d: Add a struct for RenderTargetConfig.bunnei2018-06-271-17/+19
|
* GPU: Added registers for normal and independent blending.Subv2018-06-091-5/+26
|
* GPU: Implement sampling multiple textures in the generated glsl shaders.Subv2018-06-061-0/+3
| | | | | | 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: Calculate the correct viewport dimensions based on the scale and translate registers.Subv2018-06-041-12/+28
| | | | 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?
* GPU: Reduce the number of registers of Maxwell3D to 0xE00.Subv2018-04-251-2/+2
| | | | 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/+13
| | | | It doesn't belong in the PFIFO handler.
* Merge pull request #386 from Subv/gpu_querybunnei2018-04-241-1/+27
|\ | | | | GPU: Added asserts to our code for handling the QUERY_GET GPU command.
| * GPU: Added asserts to our code for handling the QUERY_GET GPU command.Subv2018-04-241-1/+27
| | | | | | | | | | 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: Support multiple enabled vertex arrays.Subv2018-04-231-0/+5
|/ | | | | | 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.
* gl_shader_gen: Support vertical/horizontal viewport flipping. (#347)bunnei2018-04-181-1/+10
| | | | | | * gl_shader_gen: Support vertical/horizontal viewport flipping. * fixup! gl_shader_gen: Support vertical/horizontal viewport flipping.
* renderer_opengl: Implement BlendEquation and BlendFunc.bunnei2018-04-181-1/+47
|
* gl_rasterizer: Implement indexed vertex mode.bunnei2018-04-171-1/+43
|
* GPU: Added a function to determine whether a shader stage is enabled or not.Subv2018-04-151-0/+3
|
* maxwell_3d: Make memory_manager public.bunnei2018-04-141-2/+1
|
* maxwell_3d: Fix shader_config decodings.bunnei2018-04-141-6/+3
|
* GPU: Use the MacroInterpreter class to execute the GPU macros instead of HLEing them.Subv2018-04-011-21/+5
|
* GPU: Implemented a gpu macro interpreter.Subv2018-04-011-0/+3
| | | | | | 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.
* gl_rasterizer: Add a SyncViewport method.bunnei2018-03-271-0/+10
|
* gl_rasterizer: Normalize vertex array data as appropriate.bunnei2018-03-271-0/+4
|
* maxwell_3d: Use names that match envytools for VertexType.bunnei2018-03-271-8/+8
|
* maxwell_3d: Add VertexAttribute struct and cleanup.bunnei2018-03-271-121/+160
|
* gl_rasterizer: Implement AnalyzeVertexArray.bunnei2018-03-271-0/+35
|
* maxwell: Add RenderTargetFormat enum.bunnei2018-03-271-3/+4
|
* GPU: Load the sampler info (TSC) when retrieving active textures.Subv2018-03-261-1/+7
|
* GPU: Added a function to retrieve the active textures for a shader stage.Subv2018-03-241-6/+10
| | | | 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: Added viewport registers to Maxwell3D's reg structure.Subv2018-03-241-1/+18
|
* maxwell_3d: Add some format decodings and string helper functions.bunnei2018-03-231-3/+107
|
* GPU: Added vertex attribute format registers.Subv2018-03-211-1/+14
|
* GPU: Added registers for the number of vertices to render.Subv2018-03-211-2/+13
|
* GPU: Added Z buffer registers to Maxwell3D's reg structure.Subv2018-03-191-1/+17
|
* GPU: Added the render target (RT) registers to Maxwell3D's reg structure.Subv2018-03-191-1/+32
|
* GPU: Added the TSC registers to the Maxwell3D register structure.Subv2018-03-191-1/+15
|
* GPU: Added the TIC registers to the Maxwell3D register structure.Subv2018-03-191-1/+16
|
* GPU: Implement macro 0xE1A BindTextureInfoBuffer in HLE.Subv2018-03-191-1/+11
| | | | 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-1/+15
| | | | | | 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/+3
| | | | | | 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-4/+8
|
* GPU: Macros are specific to the Maxwell3D engine, so handle them internally.Subv2018-03-181-8/+19
|
* GPU: Renamed ShaderType to ShaderStage as that is less confusing.Subv2018-03-181-7/+7
|
* GPU: Store shader constbuffer bindings in the GPU state.Subv2018-03-181-3/+25
|
* GPU: Corrected some register offsets and removed superfluous macro registers.Subv2018-03-181-9/+3
|
* GPU: Make the SetShader macro call do the same as the real macro's code.Subv2018-03-181-2/+25
| | | | | | 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-6/+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.
* Merge pull request #242 from Subv/set_shaderbunnei2018-03-171-2/+16
|\ | | | | GPU: Handle the SetShader method call (0xE24) and store the shader config.
| * GPU: Handle the SetShader method call (0xE24) and store the shader config.Subv2018-03-171-2/+16
| |
* | GPU: Added the vertex array registers.Subv2018-03-171-2/+33
|/
* Merge pull request #241 from Subv/gpu_method_callbunnei2018-03-171-1/+21
|\ | | | | GPU: Process command mode 5 (IncreaseOnce) differently from other commands
| * GPU: Process command mode 5 (IncreaseOnce) differently from other commands.Subv2018-03-171-1/+21
| | | | | | | | | | | | Accumulate all arguments before calling the desired method. Note: Maybe we should do the same for the NonIncreasing mode?
* | GPU: Added Maxwell registers for Shader Program control.Subv2018-03-171-2/+55
|/
* GPU: Intercept writes to the VERTEX_END_GL register.Subv2018-03-051-1/+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.
* maxwell_3d: Make constructor explicitLioncash2018-02-141-1/+1
|
* GPU: Partially implemented the QUERY_* registers in the Maxwell3D engine.Subv2018-02-121-1/+55
| | | | Only QueryMode::Write is supported at the moment.
* Make a GPU class in VideoCore to contain the GPU state.Subv2018-02-121-3/+7
| | | | 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/+18