summaryrefslogtreecommitdiffstats
path: root/src/video_core (unfollow)
Commit message (Collapse)AuthorFilesLines
2019-09-22Maxwell3D: Corrections and refactors to MME instance refactorFernando Sahmkow4-44/+46
2019-09-22Fix clang-formatFearlessTobi2-2/+2
2019-09-22fermi_2d: Lower surface copy log severity to DEBUGFearlessTobi1-1/+1
2019-09-22video_core: Implement RGBX16F PixelFormatFearlessTobi7-22/+37
2019-09-21Shader_IR: ICMP corrections and fixesFernando Sahmkow2-6/+11
2019-09-21Mark DrawArrays as LOG_TRACEDavid Marcec1-1/+1
There's no reason to clog logs with DrawArray.
2019-09-20Rasterizer: Correct introduced bug where a conditional render wouldn't stop a draw call from executingFernando Sahmkow1-10/+16
2019-09-20Shader_IR: Implement ICMP.Fernando Sahmkow2-0/+37
2019-09-19Rasterizer: Refactor and simplify DrawBatch Interface.Fernando Sahmkow4-35/+16
2019-09-19Rasterizer: Address Feedback and conscerns.Fernando Sahmkow1-11/+11
2019-09-19Rasterizer: Refactor draw calls, remove deadcode and clean up.Fernando Sahmkow3-106/+68
2019-09-19VideoCore: Corrections to the MME Inliner and removal of hacky instance management.Fernando Sahmkow6-31/+81
2019-09-19Video Core: initial Implementation of InstanceDraw PackagingFernando Sahmkow7-11/+192
2019-09-17shader_ir/warp: Implement SHFLReinUsesLisp6-9/+182
2019-09-17maxwell_to_gl: Fix mipmap filteringReinUsesLisp1-2/+2
OpenGL texture filters follow GL_<texture_filter>_MIPMAP_<mipmap_filter> but we were using them in the opposite way.
2019-09-17gl_rasterizer: Remove unused code paths from ConfigureFramebuffersReinUsesLisp4-121/+33
2019-09-15maxwell_3d: Update firmware 4 call stub commentaryRodrigo Locatti1-1/+2
2019-09-13vk_device: Add miscellaneous features and minor style changesReinUsesLisp3-111/+258
* Increase minimum Vulkan requirements * Require VK_EXT_vertex_attribute_divisor * Require depthClamp, samplerAnisotropy and largePoints features * Search and expose VK_KHR_uniform_buffer_standard_layout * Search and expose VK_EXT_index_type_uint8 * Search and expose native float16 arithmetics * Track current driver with VK_KHR_driver_properties * Query and expose SSBO alignment * Query more image formats * Improve logging overall * Minor style changes * Minor rephrasing of commentaries
2019-09-13video_core/surface: Add function to detect sRGB surfacesReinUsesLisp2-0/+22
This is required for proper conversion to RGBA8_UNORM or RGBA8_SRGB surfaces when a backend can target both native and converted ASTC.
2019-09-11renderer_opengl: Fix rebase mistakeReinUsesLisp1-1/+1
2019-09-11shader/image: Implement SUATOM and fix SUSTReinUsesLisp7-69/+329
2019-09-11gl_rasterizer: Correct sRGB Fix regressionFernando Sahmkow1-0/+12
2019-09-11renderer_opengl: Fix sRGB blitsReinUsesLisp6-43/+10
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_shader_decompiler: Avoid writing output attribute when unimplementedReinUsesLisp1-10/+14
2019-09-06gl_shader_decompiler: Keep track of written images and mark them as modifiedReinUsesLisp7-62/+92
2019-09-06texture_cache: Minor changesReinUsesLisp4-19/+17
2019-09-06gl_rasterizer: Apply textures and images stateReinUsesLisp1-0/+2
2019-09-06gl_rasterizer: Add samplers to compute dispatchesReinUsesLisp2-3/+36
2019-09-06gl_rasterizer: Minor code changesReinUsesLisp2-20/+31
2019-09-06gl_state: Split textures and samplers into two arraysReinUsesLisp4-91/+39
2019-09-06gl_rasterizer: Implement image bindingsReinUsesLisp5-32/+106
2019-09-06gl_state: Add support for glBindImageTexturesReinUsesLisp2-0/+24
2019-09-06texture_cache: Pass TIC to texture cacheReinUsesLisp4-27/+25
2019-09-06kepler_compute: Implement texture queriesReinUsesLisp5-5/+99
2019-09-06gl_rasterizer: Split SetupTexturesReinUsesLisp2-22/+38
2019-09-05gl_shader_decompiler: Implement shared memoryReinUsesLisp1-0/+23
2019-09-05shader_ir: Implement LD_SReinUsesLisp1-10/+13
Loads from shared memory.
2019-09-05shader_ir: Implement ST_SReinUsesLisp4-11/+45
This instruction writes to a memory buffer shared with threads within the same work group. It is known as "shared" memory in GLSL.
2019-09-04gl_shader_decompiler: Fixup slow pathReinUsesLisp1-1/+1
2019-09-04gl_rasterizer: Fix stencil testingReinUsesLisp1-11/+11
* Fix stencil dirty flags tracking when stencil is disabled * Attach stencil on clears (previously it only attached depth) * Attach stencil on drawing regardless of stencil testing being enabled
2019-09-04Revert "Revert #2466" and stub FirmwareCall 4ReinUsesLisp3-4/+19
2019-09-04shader/shift: Implement SHR wrapped and clamped variantsReinUsesLisp2-6/+17
Nvidia defaults to wrapped shifts, but this is undefined behaviour on OpenGL's spec. Explicitly mask/clamp according to what the guest shader requires.
2019-09-04maxwell_3d: Avoid moving macro_paramsReinUsesLisp4-12/+24
2019-09-04gl_shader_cache: Remove special casing for geometry shadersReinUsesLisp2-80/+9
Now that ProgramVariants holds the primitive topology we no longer need to keep track of individual geometry shaders topologies.
2019-09-04half_set_predicate: Fix predicate assignmentsReinUsesLisp1-10/+9
2019-09-04gl_device: Disable precise in fragment shaders on bugged driversReinUsesLisp3-15/+43
2019-09-04gl_shader_decompiler: Fixup AMD's slow path typeReinUsesLisp1-1/+1
2019-09-04gl_shader_decompiler: Rework GLSL decompiler type systemReinUsesLisp1-416/+505
GLSL decompiler type system was broken. We converted all return values to float except for some cases where returning we couldn't and implicitly broke the rule of returning floats (e.g. for bools or bool pairs). Instead of doing this introduce class Expression that knows what type a return value has and when a consumer wants to use the string it asks for it with a required type, emitting a runtime error if types are incompatible. This has the disadvantage that there's more C++ code, but we can emit better GLSL code that's easier to read.
2019-09-01maxwell_3d: Fix macro binding cursorReinUsesLisp2-10/+4
2019-08-30video_core: Silent miscellaneous warnings (#2820)Rodrigo Locatti23-48/+22
* texture_cache/surface_params: Remove unused local variable * rasterizer_interface: Add missing documentation commentary * maxwell_dma: Remove unused rasterizer reference * video_core/gpu: Sort member declaration order to silent -Wreorder warning * fermi_2d: Remove unused MemoryManager reference * video_core: Silent unused variable warnings * buffer_cache: Silent -Wreorder warnings * kepler_memory: Remove unused MemoryManager reference * gl_texture_cache: Add missing override * buffer_cache: Add missing include * shader/decode: Remove unused variables
2019-08-30gl_buffer_cache: Add missing includeReinUsesLisp1-0/+1
RasterizerInterface was considered an incomplete object by clang.
2019-08-28shader_ir/conversion: Split int and float selector and implement F2F H1ReinUsesLisp2-19/+24
2019-08-28shader_ir/conversion: Implement F2I F16 Ra.H1ReinUsesLisp2-6/+17
2019-08-28float_set_predicate: Add missing negation bit for the second operandReinUsesLisp2-4/+6
2019-08-21shader_ir: Implement VOTEReinUsesLisp11-1/+162
Implement VOTE using Nvidia's intrinsics. Documentation about these can be found here https://developer.nvidia.com/reading-between-threads-shader-intrinsics Instead of using portable ARB instructions I opted to use Nvidia intrinsics because these are the closest we have to how Tegra X1 hardware renders. To stub VOTE on non-Nvidia drivers (including nouveau) this commit simulates a GPU with a warp size of one, returning what is meaningful for the instruction being emulated: * anyThreadNV(value) -> value * allThreadsNV(value) -> value * allThreadsEqualNV(value) -> true ballotARB, also known as "uint64_t(activeThreadsNV())", emits VOTE.ANY Rd, PT, PT; on nouveau's compiler. This doesn't match exactly to Nvidia's code VOTE.ALL Rd, PT, PT; Which is emulated with activeThreadsNV() by this commit. In theory this shouldn't really matter since .ANY, .ALL and .EQ affect the predicates (set to PT on those cases) and not the registers.
2019-08-21Buffer Cache: Adress Feedback.Fernando Sahmkow2-7/+6
2019-08-21Buffer_Cache: Implement flushing.Fernando Sahmkow2-1/+30
2019-08-21Buffer_Cache: Implement barriers.Fernando Sahmkow1-0/+4
2019-08-21Buffer_Cache: Optimize and track written areas.Fernando Sahmkow2-12/+104
2019-08-21BufferCache: Rework mapping caching.Fernando Sahmkow2-49/+76
2019-08-21Buffer_Cache: Fixes and optimizations.Fernando Sahmkow2-68/+38
2019-08-21Video_Core: Implement a new Buffer CacheFernando Sahmkow9-327/+560
2019-08-21renderer_opengl: Implement RGB565 framebuffer formatReinUsesLisp3-3/+9
2019-08-21renderer_opengl: Use block linear swizzling for CPU framebuffersReinUsesLisp3-150/+33
2019-08-21renderer_opengl: Use VideoCore pixel formatReinUsesLisp3-23/+11
2019-08-21gpu: Change optional<reference_wrapper<T>> to T* for FramebufferConfigReinUsesLisp10-31/+21
2019-08-04shader_ir: Implement NOPReinUsesLisp2-0/+13
2019-08-04half_set_predicate: Fix HSETP2_C constant buffer offsetReinUsesLisp1-1/+1
2019-07-26GPU: Flush commands on every dma pusher step.Fernando Sahmkow6-0/+15
This commit ensures that the host gpu is constantly fed with commands to work with, while the guest gpu keeps producing the rest of the commands. This reduces syncing time between host and guest gpu.
2019-07-26decode/half_set_predicate: Fix predicatesReinUsesLisp1-3/+3
2019-07-26MaxwellDMA: Fixes, corrections and relaxations.Fernando Sahmkow3-23/+36
This commit fixes offsets on Linear -> Tiled copies, corrects z pos fortiled->linear copies, corrects bytes_per_pixel calculation in tiled -> linear copies and relaxes some limitations set by latest dma fixes refactors.
2019-07-22shader/decode: Implement S2R TicReinUsesLisp3-0/+15
2019-07-20Shader_Ir: Implement F16 Variants of F2F, F2I, I2F.Fernando Sahmkow5-18/+75
This commit takes care of implementing the F16 Variants of the conversion instructions and makes sure conversions are done.
2019-07-20Maxwell3D: Reorganize and address feedbackFernando Sahmkow3-20/+33
2019-07-20Shader_Ir: Change Debug Asserts for Log WarningsFernando Sahmkow3-10/+17
2019-07-20shader/half_set_predicate: Fix HSETP2 implementationReinUsesLisp4-44/+23
2019-07-20shader/half_set_predicate: Implement missing HSETP2 variantsReinUsesLisp2-19/+49
2019-07-19video_core/control_flow: Provide operator!= for types with operator==Lioncash1-4/+21
Provides operational symmetry for the respective structures.
2019-07-19video_core/control_flow: Prevent sign conversion in TryGetBlock()Lioncash1-1/+1
The return value is a u32, not an s32, so this would result in an implicit signedness conversion.
2019-07-19video_core/control_flow: Remove unnecessary BlockStack copy constructorLioncash1-2/+1
This is the default behavior of the copy constructor, so it doesn't need to be specified. While we're at it we can make the other non-default constructor explicit.
2019-07-19video_core/control_flow: Use std::move where applicableLioncash1-10/+15
Results in less work being done where avoidable.
2019-07-19video_core/control_flow: Use the prefix variant of operator++ for iteratorsLioncash1-2/+2
Same thing, but potentially allows a standard library implementation to pick a more efficient codepath.
2019-07-19video_core/control_flow: Use empty() member function for checking emptinessLioncash1-2/+2
It's what it's there for.
2019-07-19video_core: Resolve -Wreorder warningsLioncash2-4/+3
Ensures that the constructor members are always initialized in the order that they're declared in.
2019-07-19video_core/control_flow: Make program_size for ScanFlow() a std::size_tLioncash2-5/+4
Prevents a truncation warning from occurring with MSVC. Also the internal data structures already treat it as a size_t, so this is just a discrepancy in the interface.
2019-07-19video_core/control_flow: Place all internally linked types/functions within an anonymous namespaceLioncash1-1/+2
Previously, quite a few functions were being linked with external linkage.
2019-07-19video_core/shader/decode: Prevent sign-conversion warningsLioncash1-2/+2
Makes it explicit that the conversions here are intentional.
2019-07-18Shader_Ir: correct clang formatFernando Sahmkow1-2/+2
2019-07-18GPU: Add missing puller methods.Fernando Sahmkow2-14/+15
This adds some missing puller methods. We don't assert them as these are nop operations for us.
2019-07-18MaxwellDMA/KeplerCopy: Downgrade DMA log message to Trace.Fernando Sahmkow1-1/+1
This log was just to know which games used DMA. It's no longer important.
2019-07-18Gl_Texture_Cache: Remove assert on component type in GetFormatTupleFernando Sahmkow1-1/+0
Textures can have different components types in different orders. This assert was completely inprecise and the effectiveness of such is better handled by case and within the texture cache.
2019-07-18Shader_Ir: Downgrade precision and rounding asserts to debug asserts.Fernando Sahmkow5-10/+10
This commit reduces the sevirity of asserts for FP precision and rounding as this are well known and have little to no consequences in gpu's accuracy.
2019-07-18gl_shader_decompiler: Rename bufferImage to imageBufferReinUsesLisp1-1/+1
The online OpenGL documentation is wrong. The type definition is imageBuffer.
2019-07-18gl_shader_cache: Fix newline on buffer preprocessor definitionsReinUsesLisp1-2/+6
2019-07-18textures: Fix texture buffer size calculationReinUsesLisp1-1/+1
2019-07-18gl_texture_cache: Do not set texture parameters to buffersReinUsesLisp1-0/+3
2019-07-18gl_texture_cache: Add missing break in CreateTextureReinUsesLisp1-0/+1
2019-07-17GL_State: Feedback and fixesFernando Sahmkow4-14/+27
2019-07-17Maxwell3D: Address FeedbackFernando Sahmkow5-17/+13
2019-07-17Texture_Cache: Rebase FixesFernando Sahmkow1-6/+0
2019-07-17GL_Rasterizer: Corrections to Clearing.Fernando Sahmkow4-12/+28
2019-07-17Maxwell3D: Correct marking dirtiness on CB uploadFernando Sahmkow1-0/+1
2019-07-17GL_Rasterizer: Rework RenderTarget/DepthBuffer clearingFernando Sahmkow3-7/+63
2019-07-17Maxwell3D: Implement State Dirty Flags.Fernando Sahmkow6-44/+199
2019-07-17Maxwell3D: Rework CBData UploadFernando Sahmkow2-8/+45
2019-07-17Maxwell3D: Rework the dirty system to be more consistant and scaleableFernando Sahmkow10-80/+211
2019-07-17maxwell3d: Implement Conditional RenderingFernando Sahmkow3-2/+100
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.
2019-07-17shader_ir: std::move Node instance where applicableLioncash4-60/+67
These are std::shared_ptr instances underneath the hood, which means copying them isn't as cheap as a regular pointer. Particularly so on weakly-ordered systems. This avoids atomic reference count increments and decrements where they aren't necessary for the core set of operations.
2019-07-17shader_ir: Rename Get/SetTemporal to Get/SetTemporaryLioncash5-36/+36
This is more accurate in terms of describing what the functions are actually doing. Temporal relates to time, not the setting of a temporary itself.
2019-07-17shader_ir: Remove unused includesLioncash1-3/+0
Removes unnecessary header dependencies.
2019-07-16Shader_Ir: Correct tracking to track from right to leftFernando Sahmkow1-2/+2
2019-07-16shader/decode/other: Correct branch indirect argument within BRA handlingLioncash1-1/+1
This appears to have been a copy/paste error introduced within 8a6fc529a968e007f01464abadd32f9b5eb0a26c
2019-07-16gl_shader_cache: Fix clang-format issuesReinUsesLisp2-4/+2
2019-07-15gl_shader_decompiler: Stub local memory sizeReinUsesLisp1-8/+14
2019-07-15gl_shader_cache: Address review commentariesReinUsesLisp4-13/+12
2019-07-15gl_shader_cache: Address CI issuesReinUsesLisp2-3/+3
2019-07-15gl_rasterizer: Implement compute shadersReinUsesLisp15-136/+350
2019-07-15shader: Allow tracking of indirect buffers without variable offsetReinUsesLisp6-35/+36
While changing this code, simplify tracking code to allow returning the base address node, this way callers don't have to manually rebuild it on each invocation.
2019-07-14Texture_Cache: Address FeedbackFernando Sahmkow3-13/+17
2019-07-14Texture_Cache: Remove some unprecise fallback case and clang formatFernando Sahmkow2-13/+5
2019-07-14Texture_Cache: Force Framebuffer reset if an active render target is unregistered.Fernando Sahmkow3-10/+36
2019-07-14GPU: Add a microprofile for macro interpreterFernando Sahmkow2-1/+6
2019-07-14GL_State: Add a microprofile timer to OpenGL state.Fernando Sahmkow1-0/+4
2019-07-14Gl_Texture_Cache: Measure Buffer Copy TimesFernando Sahmkow1-0/+2
2019-07-14Texture_Cache: Correct Linear Structural Match.Fernando Sahmkow1-3/+6
2019-07-11gl_shader_decompiler: Fix gl_PointSize redeclarationReinUsesLisp1-1/+1
2019-07-11gl_shader_decompiler: Fix conditional usage of GL_ARB_shader_viewport_layer_arrayReinUsesLisp1-2/+3
2019-07-09shader_ir: Add comments on missing instruction.Fernando Sahmkow2-2/+9
Also shows Nvidia's address space on comments.
2019-07-09prefer system reference over global accessorMichael Scire3-9/+13
2019-07-09shader_ir: limit explorastion to best known program size.Fernando Sahmkow1-1/+1
2019-07-09control_flow: Correct block breaking algorithm.Fernando Sahmkow1-17/+17
2019-07-09control_flow: Assert shaders bigger than limit.Fernando Sahmkow1-0/+2
2019-07-09control_flow: Address feedback.Fernando Sahmkow1-89/+37
2019-07-09shader_ir: Correct parsing of scheduling instructions and correct sizingFernando Sahmkow2-13/+30
2019-07-09shader_ir: Correct max sizingFernando Sahmkow2-2/+2
2019-07-09shader_ir: Remove unnecessary constructors and use optional for ScanFlow resultFernando Sahmkow3-28/+17
2019-07-09shader_ir: Corrections, documenting and asserting control_flowFernando Sahmkow3-52/+54
2019-07-09shader_ir: Unify blocks in decompiled shaders.Fernando Sahmkow7-58/+85
2019-07-09shader_ir: Decompile Flow StackFernando Sahmkow4-11/+206
2019-07-09shader_ir: propagate shader size to the IRFernando Sahmkow6-17/+28
2019-07-09shader_ir: Implement BRX & BRA.CCFernando Sahmkow6-4/+76
2019-07-09shader_ir: Remove the old scanner.Fernando Sahmkow2-77/+0
2019-07-09shader_ir: Implement a new shader scannerFernando Sahmkow4-16/+473
2019-07-09gl_rasterizer: Amend documentation comment for ConfigureFramebuffers()Lioncash1-7/+9
must_reconfigure isn't a parameter for this function any more, so it can be replaced with current_state. While we're at it, we can make the parameters of the declaration match the same name as the ones in the definition.
2019-07-09Prevent merging of device mapped memory blocks.Michael Scire1-1/+23
This sets the DeviceMapped attribute for GPU-mapped memory blocks, and prevents merging device mapped blocks. This prevents memory mapped from the gpu from having its backing address changed by block coalesce.
2019-07-08gl_shader_decompiler: Implement gl_ViewportIndex and gl_Layer in vertex shadersReinUsesLisp10-40/+136
This commit implements gl_ViewportIndex and gl_Layer in vertex and geometry shaders. In the case it's used in a vertex shader, it requires ARB_shader_viewport_layer_array. This extension is available on AMD and Nvidia devices (mesa and proprietary drivers), but not available on Intel on any platform. At the moment of writing this description I don't know if this is a hardware limitation or a driver limitation. In the case that ARB_shader_viewport_layer_array is not available, writes to these registers on a vertex shader are ignored, with the appropriate logging.
2019-07-07Delete decode_integer_set.cppTobias1-0/+0
2019-07-07shader/texture: Add F16 support for TLDSReinUsesLisp2-2/+9
2019-07-07vk_sampler_cache: Remove unused includesLioncash1-3/+0
These are no longer used within this header, so they can be removed.
2019-07-07video_core: Add missing override specifiersLioncash2-4/+4
2019-07-07vk_scheduler: Drop execution context in favor of viewsReinUsesLisp6-50/+60
Instead of passing by copy an execution context through out the whole Vulkan call hierarchy, use a command buffer view and fence view approach. This internally dereferences the command buffer or fence forcing the user to be unable to use an outdated version of it on normal usage. It is still possible to keep store an outdated if it is casted to VKFence& or vk::CommandBuffer. While changing this file, add an extra parameter for Flush and Finish to allow releasing the fence from this calls.
2019-07-06buffer_cache: Avoid [[nodiscard]] to make clang-format happyReinUsesLisp1-5/+4
2019-07-06buffer_cache: Try to fix MinGW buildReinUsesLisp1-1/+1
2019-07-06gl_rasterizer: Fix nullptr dereference on disabled buffersReinUsesLisp3-5/+5
2019-07-06gl_rasterizer: Minor style changesReinUsesLisp4-32/+22
2019-07-06gl_rasterizer: Fix vertex and index data invalidationsReinUsesLisp4-8/+67
2019-07-06gl_buffer_cache: Implement with generic buffer cacheReinUsesLisp8-291/+92
2019-07-06buffer_cache: Implement a generic buffer cacheReinUsesLisp2-0/+301
Implements a templated class with a similar approach to our current generic texture cache. It is designed to be compatible with Vulkan and OpenGL,
2019-07-06gl_buffer_cache: Remove global system gettersReinUsesLisp3-9/+14
2019-07-06gl_device: Query SSBO alignmentReinUsesLisp2-0/+6
2019-07-06gl_buffer_cache: Implement flushingReinUsesLisp2-2/+11
2019-07-06gl_rasterizer: Drop gl_global_cache in favor of gl_buffer_cacheReinUsesLisp7-206/+35
2019-07-06gl_buffer_cache: Rework to support internalized buffersReinUsesLisp3-65/+174
2019-07-06gl_buffer_cache: Store in CachedBufferEntry the used buffer handleReinUsesLisp2-23/+30
2019-07-06gl_buffer_cache: Return used buffer from Upload functionReinUsesLisp4-36/+35
2019-07-06gl_rasterizer: Add some commentariesReinUsesLisp1-0/+5
2019-07-06gl_rasterizer: Make DrawParameters rasterizer instance constReinUsesLisp1-1/+1
2019-07-06gl_rasterizer: Move index buffer uploading to its own methodReinUsesLisp2-7/+18
2019-07-05NVServices: Styling, define constructors as explicit and correctionsFernando Sahmkow4-24/+24
2019-07-05NVFlinger: Correct GCC compile errorFernando Sahmkow2-6/+6
2019-07-05NVServices: Make NVEvents Automatic according to documentation.Fernando Sahmkow2-3/+6
2019-07-05GPU: Correct Interrupts to interrupt on syncpt/value instead of event, mirroring hardwareFernando Sahmkow5-29/+23
2019-07-05gpu_asynch: Simplify synchronization to a simpler consumer->producer scheme.Fernando Sahmkow2-47/+3
2019-07-05nv_host_ctrl: Make Sync GPU variant always return synced result.Fernando Sahmkow4-5/+11
2019-07-05Async GPU: do invalidate as synced operationFernando Sahmkow1-6/+1
Async GPU: Always invalidate synced.
2019-07-05Gpu: use an std mutex instead of a spin_lock to guard syncpointsFernando Sahmkow2-6/+6
2019-07-05Gpu: Mark areas as protected.Fernando Sahmkow2-0/+13
2019-07-05nv_services: Stub CtrlEventSignalFernando Sahmkow2-1/+14
2019-07-05Gpu: Implement Hardware Interrupt Manager and manage GPU interruptsFernando Sahmkow5-4/+21
2019-07-05video_core: Implement GPU side SyncpointsFernando Sahmkow3-2/+51
2019-07-05texture_cache: Address FeedbackFernando Sahmkow4-12/+13
2019-07-05texture_cache: Correct Texture Buffer UploadingFernando Sahmkow3-2/+18
2019-07-04gl_shader_cache: Make CachedShader constructor privateZach Hilman2-5/+5
Fixes missing review comments introduced.
2019-07-01rasterizer_cache: Protect inherited caches from submission levelFernando Sahmkow3-1/+5
2019-06-30texture_cache: Pack sibling queries inside a methodReinUsesLisp1-6/+8
2019-06-30texture_cache: Use std::vector reservation for sampled_texturesReinUsesLisp1-17/+10
2019-06-30texture_cache: Style changesReinUsesLisp3-17/+13
2019-06-29texture_cache: Use std::array for siblings_tableReinUsesLisp1-10/+13
2019-06-29texture_cache: Address feedbackReinUsesLisp4-30/+13
2019-06-26texture_cache: Correct variable naming.Fernando Sahmkow1-3/+3
2019-06-26gl_texture_cache: Correct assertsFernando Sahmkow2-2/+2
2019-06-26texture_cache: Corrections, documentation and assertsFernando Sahmkow1-42/+42
2019-06-26surface_params: Corrections, asserts and documentation.Fernando Sahmkow2-43/+58
2019-06-25copy_params: use constexpr for constructorFernando Sahmkow1-3/+4
2019-06-25gl_texture_cache: Corrections and fixesFernando Sahmkow2-13/+9
2019-06-25gl_resource_manager: Correct MakeStreamCopyFernando Sahmkow2-3/+2
2019-06-25texture_cache: Query MemoryManager from the systemFernando Sahmkow5-20/+7
2019-06-24texture_cache: Include "core/core.h"ReinUsesLisp1-4/+1
2019-06-24gl_texture_cache: Explicitly add indirect includeReinUsesLisp1-0/+1
2019-06-24texture_cache/surface_view: Address feedbackReinUsesLisp1-1/+0
2019-06-24texture_cache/surface_base: Address feedbackReinUsesLisp2-2/+10
2019-06-24video_core/surface: Address feedbackReinUsesLisp1-2/+2
2019-06-24decode/texture: Address feedbackReinUsesLisp1-0/+1
2019-06-24renderer_opengl/utils: Remove unused includes and unused forward declarationReinUsesLisp1-4/+0
2019-06-24gl_texture_cache: Address some feedbackReinUsesLisp1-2/+4
2019-06-24gl_shader_disk_cache: Address feedbackReinUsesLisp2-4/+8
2019-06-24gl_shader_decompiler: Address feedbackReinUsesLisp1-11/+12
2019-06-24shader_bytecode: Include missing <array>ReinUsesLisp1-0/+1
2019-06-21texture_cache: Style and CorrectionsFernando Sahmkow7-71/+75
2019-06-21shader_cache: Correct versioning and size calculation.Fernando Sahmkow2-2/+7
2019-06-21texture_cache: Eliminate linear textures fallthroughFernando Sahmkow1-4/+0
2019-06-21texture_cache: Correct format R16U as siblingFernando Sahmkow2-1/+2
2019-06-21texture_cache: Implement texception detection and texture barriers.Fernando Sahmkow2-7/+40
2019-06-21texture_cache: Corrections to buffers and shadow formats use.Fernando Sahmkow1-10/+34
2019-06-21texture_cache: Implement Irregular Views in surfacesFernando Sahmkow2-4/+24
2019-06-21surface: Correct format S8Z24Fernando Sahmkow4-9/+5
2019-06-21texture_cache: Initialize all siblings to invalid pixel format.Fernando Sahmkow1-6/+15
2019-06-21gl_texture_cache: Use Stream Buffers instead of Persistant for Buffer Copies.Fernando Sahmkow3-5/+4
2019-06-21gl_texture_cache: Correct Image BlitFernando Sahmkow1-1/+1
2019-06-21decoders: correct block calculationFernando Sahmkow7-29/+41
2019-06-21texture_cache: Use siblings textures on Rebuild and fix possible error on blittingFernando Sahmkow2-11/+24
2019-06-21texture_cache: Remove old rasterizer cacheFernando Sahmkow2-1956/+0
2019-06-21texture_cache: Implement siblings texture formats.Fernando Sahmkow2-12/+31
2019-06-21fermi2d: Correct Origin ModeFernando Sahmkow1-5/+10
2019-06-21texture_cache: correct texture buffer on surface paramsFernando Sahmkow1-4/+11
2019-06-21texture_cache: eliminate accelerated depth->color/color->depth copies due to driver instability.Fernando Sahmkow4-22/+6
2019-06-21texture_cache: correct mutex locksFernando Sahmkow1-4/+4
2019-06-21shader_ir: Fix image copy rebase issuesFernando Sahmkow1-2/+7
2019-06-21texture_cache: Don't Image Copy if component types differFernando Sahmkow1-1/+2
2019-06-21texture_cache: move some large methods to cpp filesFernando Sahmkow4-139/+135
2019-06-21texture_cache: Optimize GetSurface and use references on functions that don't change a surface.Fernando Sahmkow3-12/+12
2019-06-21texture_cache: Implement Buffer Copy and detect Turing GPUs Image CopiesFernando Sahmkow8-12/+148
2019-06-21texture_cache uncompress-compress is untopological.Fernando Sahmkow5-19/+53
This makes conflicts between non compress and compress textures to be auto recycled. It also limits the amount of mipmaps a texture can have if it goes above it's limit.
2019-06-21texture_cache: Correct copying between compressed and uncompressed formatsFernando Sahmkow3-10/+27
2019-06-21texture_cache: Only load on recycle with accurate GPU.Fernando Sahmkow1-2/+3
Testing so far has proven this to be quite safe as texture memory read added a 2-5ms load to the current cache.
2019-06-21Fix rebase errorsFernando Sahmkow3-3/+13
2019-06-21texture_cache: Handle uncontinuous surfaces.Fernando Sahmkow4-21/+82
2019-06-21texture_cache: return null surface on invalid addressFernando Sahmkow1-0/+12
2019-06-21texture_cache: Add checks for texture buffers.Fernando Sahmkow1-2/+16
2019-06-21texture_cache: Fermi2D reform and implement View MirageFernando Sahmkow11-77/+125
This also does some fixes on compressed textures reinterpret and on the Fermi2D engine in general.
2019-06-21gl_shader_decompiler: Implement image binding settingsReinUsesLisp5-24/+52
2019-06-21shader: Implement bindless imagesReinUsesLisp3-2/+40
2019-06-21shader: Decode SUST and implement backing image functionalityReinUsesLisp8-3/+282
2019-06-21gl_rasterizer: Track texture buffer usageReinUsesLisp6-74/+119
2019-06-21video_core: Make ARB_buffer_storage a required extensionReinUsesLisp3-8/+5
2019-06-21gl_rasterizer_cache: Use texture buffers to emulate texture buffersReinUsesLisp5-11/+35
2019-06-21maxwell_3d: Partially implement texture buffers as 1D texturesReinUsesLisp4-10/+24
2019-06-21gl_shader_decompiler: Allow 1D textures to be texture buffersReinUsesLisp1-4/+38
2019-06-21shader: Implement texture buffersReinUsesLisp3-0/+62
2019-06-21texture_cache: loose TryReconstructSurface when accurate GPU is not on.Fernando Sahmkow3-4/+20
Also corrects some asserts.
2019-06-21texture_cache: Document the most important methods.Fernando Sahmkow1-8/+87
2019-06-21texture_cache: Try to Reconstruct Surface on bigger than overlap.Fernando Sahmkow1-4/+11
This fixes clouds in SMO Cap Kingdom and lens on Cloud Kingdom. Also moved accurate_gpu setting check to Pick Strategy
2019-06-21texture_cache: Implement Guard mechanismFernando Sahmkow2-1/+12
2019-06-21texture_cache: General FixesFernando Sahmkow8-47/+170
Fixed ASTC mipmaps loading Fixed alignment on openGL upload/download Fixed Block Height Calculation Removed unalign_height
2019-06-21surface_params: Ensure pitch is always written to avoid surface leaksReinUsesLisp1-0/+2
2019-06-21gl_framebuffer_cache: Use a hashed struct to cache framebuffersReinUsesLisp6-62/+148
2019-06-21texture_cache return invalid buffer on deactivated color_maskFernando Sahmkow2-2/+9
2019-06-21engine_upload: Addapt to new Texture CacheFernando Sahmkow2-5/+5
2019-06-21surface_params: Optimize CreateForTextureReinUsesLisp2-72/+76
Instead of using Common::AlignUp, use Common::AlignBits to align the texture compression factor.
2019-06-21gl_texture_cache: Make main views be proxy textures instead of a full view.Fernando Sahmkow2-11/+25
2019-06-21texture_cache: Add ASync ProtectionsFernando Sahmkow1-0/+10
2019-06-21Remove Framebuffer reconfiguration and restrict rendertarget protectionFernando Sahmkow4-39/+27
2019-06-21texture_cache: Implement GPU Dirty FlagsFernando Sahmkow1-15/+22
2019-06-21texture_cache: Optimize GetMipBlockHeight and GetMipBlockDepthFernando Sahmkow1-13/+6
2019-06-21texture_cache: Implement L1_Inner_cacheFernando Sahmkow1-13/+30
2019-06-21video_core: Use un-shifted block sizes to avoid integer divisionsReinUsesLisp9-60/+73
Instead of storing all block width, height and depths in their shifted form: block_width = 1U << block_shift; Store them like they are provided by the emulated hardware (their block_shift form). This way we can avoid doing the costly Common::AlignUp operation to align texture sizes and drop CPU integer divisions with bitwise logic (defined in Common::AlignBits).
2019-06-21texture_cache: Change internal cache from lists to vectorsReinUsesLisp1-6/+7
2019-06-21Reduce amount of size calculations.Fernando Sahmkow7-88/+86
2019-06-21texture_cache: Correct premature texceptionsFernando Sahmkow4-14/+51
Due to our current infrastructure, it is possible for a mipmap to be set on as a render target before a texception of that mipmap's superset be set afterwards. This is problematic as we rely on texture views to set up texceptions and protecting render targets targets for 3D texture rendering. One simple solution is to configure framebuffers after texture setup but this brings other problems. This solution, forces a reconfiguration of the framebuffers after such event happens.
2019-06-21texture_cache: Implement guest flushingFernando Sahmkow3-10/+29
2019-06-21Fixes to mipmap's process and reconstruct processFernando Sahmkow2-3/+3
2019-06-21surface_base: Add parenthesis to EmplaceOverview's predicateReinUsesLisp1-3/+2
2019-06-21Texture Cache: Implement Blitting and Fermi CopiesFernando Sahmkow7-100/+93
2019-06-21surface_view: Add constructor for ViewParamsReinUsesLisp3-39/+23
2019-06-21surface_base: Split BreakDown into layered and non-layered variantsReinUsesLisp1-45/+48
2019-06-21surface_base: Silence truncation warnings and minor renames and reorderingReinUsesLisp2-32/+37
2019-06-21copy_params: Use constructor instead of C-like initializationReinUsesLisp3-47/+39
2019-06-21Correct Mipmaps View method in Texture CacheFernando Sahmkow3-32/+29
2019-06-21Change texture_cache chaching from GPUAddr to CacheAddrFernando Sahmkow7-101/+60
This also reverses the changes to make invalidation and flushing through the GPU address.
2019-06-21Corrections to Structural MatchingFernando Sahmkow2-24/+53
The texture will now be reconstructed if the width only matches on GoB alignment.
2019-06-21Implement Texture Cache V2Fernando Sahmkow6-381/+568
2019-06-21Correct Surface Base and Views for new Texture CacheFernando Sahmkow7-380/+466
2019-06-21Add OGLTextureViewFernando Sahmkow2-0/+43
2019-06-21Deglobalize Memory Manager on texture cahe and Implement Invalidation and Flushing using GPUVAddrFernando Sahmkow4-1/+20
2019-06-21texture_cache: Remove execution context copies from the texture cacheReinUsesLisp7-168/+59
This is done to simplify the OpenGL implementation, it is needed for Vulkan.
2019-06-21gl_texture_cache: Implement fermi copiesReinUsesLisp5-2/+105
2019-06-21texture_cache: Split texture cache into different filesReinUsesLisp12-876/+965
2019-06-21texture_cache: Move staging buffer into a generic implementationReinUsesLisp4-181/+211
2019-06-21texture_cache: Flush 3D textures in the order they are drawnReinUsesLisp5-19/+44
2019-06-21gl_texture_cache: Minor changesReinUsesLisp5-140/+185
2019-06-21gl_texture_cache: Add copy from multiple overlaps into a single surfaceReinUsesLisp3-6/+84
2019-06-21gl_texture_cache: Attach surface textures instead of viewsReinUsesLisp3-20/+32
2019-06-21gl_texture_cache: Add fast copy pathReinUsesLisp4-7/+60
2019-06-21gl_texture_cache: Initial implementationReinUsesLisp9-47/+809
2019-06-18core: Remove unused CiTrace source filesLioncash1-1/+0
These source files have been unused for the entire lifecycle of the project. They're a hold-over from Citra and only add to the build time of the project, so they can be removed. There's also likely no way this would ever work in yuzu in its current form without revamping quite a bit of it, given how different the GPU on the Switch is compared to the 3DS.
2019-06-12gl_device: Fix TestVariableAoffi testReinUsesLisp1-1/+2
This test is intended to be invalid GLSL, but it was being invalid in two points instead of one. The intention is to use a non-immediate parameter in a textureOffset like function. The problem is that this shader was being compiled as a separable shader object and the text was writting to gl_Position without a redeclaration, being invalid GLSL. Address that issue by using a user-defined output attribute.
2019-06-09GPUVM: Correct GPU VM virtual address spaceFernando Sahmkow1-2/+2
2019-06-08kepler_compute: Use std::array for cbuf infoReinUsesLisp1-2/+3
2019-06-08kepler_compute: Fix block_dim_x encodingReinUsesLisp1-1/+1
2019-06-08gl_shader_cache: Use static constructors for CachedShader initializationReinUsesLisp2-52/+53
2019-06-08gl_rasterizer: Remove unused parameters in descriptor uploadsReinUsesLisp2-8/+6
2019-06-08video_core/engines: Move ConstBufferInfo out of Maxwell3DReinUsesLisp6-49/+64
2019-06-07shader: Split SSY and PBK stackReinUsesLisp4-27/+78
Hardware testing revealed that SSY and PBK push to a different stack, allowing code like this: SSY label1; PBK label2; SYNC; label1: PBK; label2: EXIT;
2019-06-07shader/node: Minor changesReinUsesLisp1-50/+54
Reflect std::shared_ptr nature of Node on initializers and remove constant members in nodes. Add some commentaries.
2019-06-07shader: Move Node declarations out of the shader IR headerReinUsesLisp4-493/+518
Analysis passes do not have a good reason to depend on shader_ir.h to work on top of nodes. This splits node-related declarations to their own file and leaves the IR in shader_ir.h
2019-06-06shader: Use shared_ptr to store nodes and move initialization to fileReinUsesLisp35-248/+296
Instead of having a vector of unique_ptr stored in a vector and returning star pointers to this, use shared_ptr. While changing initialization code, move it to a separate file when possible. This is a first step to allow code analysis and node generation beyond the ShaderIR class.
2019-06-05core/core_timing_util: Use std::chrono types for specifying time unitsLioncash1-1/+1
Makes the interface more type-safe and consistent in terms of return values.
2019-06-04shader_bytecode: Mark EXIT as flow instructionFernando Sahmkow1-1/+1
2019-06-03gl_shader_decompiler: Remove guest "position" varyingReinUsesLisp2-36/+21
"position" was being written but not read anywhere besides geometry shaders, where it had the same value as gl_Position. This commit replaces "position" with gl_Position, reducing the complexity of our code and the emitted GLSL code.
2019-05-30gl_shader_cache: Store a system class and drop global accessorsReinUsesLisp2-7/+9
2019-05-30gl_shader_cache: Add commentaries explaining the intention in shaders creationReinUsesLisp1-0/+2
2019-05-30gl_shader_cache: Flip if condition in GetStageProgram to reduce indentationReinUsesLisp1-25/+26
2019-05-30gl_buffer_cache: Remove unused ReserveMemory methodReinUsesLisp2-13/+0
2019-05-30maxwell_to_gl: Use GL_CLAMP to emulate Clamp wrap modeReinUsesLisp3-7/+4
2019-05-30gl_rasterizer: Move alpha testing to the OpenGL pipelineReinUsesLisp8-71/+33
Removes the alpha testing code from each fragment shader invocation.
2019-05-30gl_rasterizer: Use GL_QUADS to emulate quads renderingReinUsesLisp6-132/+5
2019-05-27gl_device: Add commentary to AOFFI unit test source codeReinUsesLisp1-0/+1
The intention behind this commit is to hint someone inspecting an apitrace dump to ignore this ill-formed GLSL code.
2019-05-27gl_shader_gen: Always declare extensions after the version declarationReinUsesLisp2-7/+5
This addresses a bug on geometry shaders where code was being written before all #extension declarations were done. Ref to #2523
2019-05-26vk_device: Let formats array type be deducedReinUsesLisp1-33/+33
2019-05-26vk_shader_decompiler: Misc fixesReinUsesLisp2-45/+67
Fix missing OpSelectionMerge instruction. This caused devices loses on most hardware, Intel didn't care. Fix [-1;1] -> [0;1] depth conversions. Conditionally use VK_EXT_scalar_block_layout. This allows us to use non-std140 layouts on UBOs. Update external Vulkan headers.
2019-05-26vk_device: Enable features when available and misc changesReinUsesLisp2-43/+151
Keeps track of native ASTC support, VK_EXT_scalar_block_layout availability and SSBO range. Check for independentBlend and vertexPipelineStorageAndAtomics as a required feature. Always enable it. Use vk::to_string format to log Vulkan enums. Style changes.
2019-05-25renderer_opengl/utils: Use a std::string_view with LabelGLObject()Lioncash2-10/+10
Uses a std::string_view instead of a std::string, given the pointed to string isn't modified and is only used in a formatting operation. This is nice because a few usages directly supply a string literal to the function, allowing these usages to otherwise not heap allocate, unlike the std::string overloads. While we're at it, we can combine the address formatting into a single formatting call.
2019-05-24gl_shader_decompiler: Use an if based cbuf indexing for broken driversReinUsesLisp1-3/+20
The following code is broken on AMD's proprietary GLSL compiler: ```glsl uint idx = ...; vec4 values = ...; float some_value = values[idx & 3]; ``` It index the wrong components, to fix this the following pessimized code is emitted when that bug is present: ```glsl uint idx = ...; vec4 values = ...; float some_value; if ((idx & 3) == 0) some_value = values.x; if ((idx & 3) == 1) some_value = values.y; if ((idx & 3) == 2) some_value = values.z; if ((idx & 3) == 3) some_value = values.w; ```
2019-05-24gl_device: Add test to detect broken component indexingReinUsesLisp2-0/+60
Component indexing on AMD's proprietary driver is broken. This commit adds a test to detect when we are on a driver that can't successfully manage component indexing. It dispatches a dummy draw with just one vertex shader that writes to an indexed SSBO from the GPU with data sent through uniforms, it then reads that data from the CPU and compares the expected output.
2019-05-23shader/shader_ir: Make Comment() take a std::string by valueLioncash2-3/+3
This allows for forming comment nodes without making unnecessary copies of the std::string instance. e.g. previously: Comment(fmt::format("Base address is c[0x{:x}][0x{:x}]", cbuf->GetIndex(), cbuf_offset)); Would result in a copy of the string being created, as CommentNode() takes a std::string by value (a const ref passed to a value parameter results in a copy). Now, only one instance of the string is ever moved around. (fmt::format returns a std::string, and since it's returned from a function by value, this is a prvalue (which can be treated like an rvalue), so it's moved into Comment's string parameter), we then move it into the CommentNode constructor, which then moves the string into its member variable).
2019-05-23shader/decode/*: Add missing newline to files lacking themLioncash18-18/+18
Keeps the shader code file endings consistent.
2019-05-23shader/decode/*: Eliminate indirect inclusionsLioncash6-1/+5
Amends cases where we were using things that were indirectly being satisfied through other headers. This way, if those headers change and eliminate dependencies on other headers in the future, we don't have cascading compilation errors.
2019-05-22shader/decode/memory: Remove left in debug pragmaLioncash1-2/+0
2019-05-21renderer_opengl/gl_shader_decompiler: Remove redundant name specification in format stringLioncash1-1/+1
This accidentally slipped through a rebase.
2019-05-21gl_shader_cache: Fix clang strict standard build issuesReinUsesLisp3-9/+13
2019-05-21gl_shader_cache: Use shared contexts to build shaders in parallelReinUsesLisp6-47/+103
2019-05-21shader/memory: Implement ST (generic memory)ReinUsesLisp2-21/+36
2019-05-21shader/memory: Implement LD (generic memory)ReinUsesLisp3-15/+38
2019-05-20shader: Implement S2R Tid{XYZ} and CtaId{XYZ}ReinUsesLisp4-15/+69
2019-05-20gl_shader_decompiler: Make GetSwizzle constexprReinUsesLisp1-7/+7
2019-05-20gl_shader_decompiler: Tidy up minor remaining cases of unnecessary std::string concatenationLioncash1-21/+20
2019-05-20gl_shader_decompiler: Replace individual overloads with the fmt-based oneLioncash1-28/+16
Gets rid of the need to special-case brace handling depending on the overload used, and makes it consistent across the board with how fmt handles them. Strings with compile-time deducible strings are directly forwarded to std::string's constructor, so we don't need to worry about the performance difference here, as it'll be identical.
2019-05-20gl_shader_decompiler: Utilize fmt overload of AddLine() where applicableLioncash1-136/+152
2019-05-19Revert #2466Fernando Sahmkow1-1/+3
This reverts a tested behavior on delay slots not exiting if the exit flag is set. Currently new tests are required in order to ensure this behavior.
2019-05-19gl_shader_decompiler: Add AddLine() overload that forwards to fmtLioncash1-0/+11
In a lot of places throughout the decompiler, string concatenation via operator+ is used quite heavily. This is usually fine, when not heavily used, but when used extensively, can be a problem. operator+ creates an entirely new heap allocated temporary string and given we perform expressions like: std::string thing = a + b + c + d; this ends up with a lot of unnecessary temporary strings being created and discarded, which kind of thrashes the heap more than we need to. Given we utilize fmt in some AddLine calls, we can make this a part of the ShaderWriter's API. We can make an overload that simply acts as a passthrough to fmt. This way, whenever things need to be appended to a string, the operation can be done via a single string formatting operation instead of discarding numerous temporary strings. This also has the benefit of making the strings themselves look nicer and makes it easier to spot errors in them.
2019-05-19Dma_pusher: ASSERT on empty command_listFernando Sahmkow1-0/+7
This is a measure to avoid crashes on command list reading as an empty command_list is considered a NOP.
2019-05-19shader/shader_ir: Remove unnecessary inline specifiersLioncash1-2/+2
constexpr internally links by default, so the inline specifier is unnecessary.
2019-05-19shader/shader_ir: Simplify constructors for OperationNodeLioncash1-15/+6
Many of these constructors don't even need to be templated. The only ones that need to be templated are the ones that actually make use of the parameter pack. Even then, since std::vector accepts an initializer list, we can supply the parameter pack directly to it instead of creating our own copy of the list, then copying it again into the std::vector.
2019-05-19shader/shader_ir: Remove unnecessary template parameter packs from Operation() overloads where applicableLioncash1-2/+0
These overloads don't actually make use of the parameter pack, so they can be turned into regular non-template function overloads.
2019-05-19shader/shader_ir: Mark tracking functions as const member functionsLioncash2-8/+11
These don't actually modify instance state, so they can be marked as const member functions
2019-05-19shader/shader_ir: Place implementations of constructor and destructor in cpp fileLioncash2-5/+9
Given the class contains quite a lot of non-trivial types, place the constructor and destructor within the cpp file to avoid inlining construction and destruction code everywhere the class is used.
2019-05-19gl_shader_gen: std::move objects where applicableLioncash1-7/+7
Avoids performing copies into the pair being returned. Instead, we can just move the resources into the pair, avoiding the need to make copies of both the std::string and ShaderEntries struct.
2019-05-19gl_shader_disk_cache: in-class initialize virtual file offset of ShaderDiskCacheOpenGLLioncash2-5/+3
Given the offset is assigned a fixed value in the constructor, we can just assign it directly and get rid of the need to write the name of the variable again in the constructor initializer list.
2019-05-19gl_shader_disk_cache: Default ShaderDiskCacheOpenGL's destructor in the cpp fileLioncash2-0/+3
Given the disk shader cache contains non-trivial types, we should default it in the cpp file in order to prevent inlining of the complex destruction logic.
2019-05-19gl_shader_disk_cache: Make hash specializations noexceptLioncash1-2/+2
The standard library expects hash specializations that don't throw exceptions. Make this explicit in the type to allow selection of better code paths if possible in implementations.
2019-05-19gl_shader_disk_cache: Remove redundant code string construction in LoadDecompiledEntry()Lioncash1-2/+2
We don't need to load the code into a vector and then construct a string over the data. We can just create a string with the necessary size ahead of time, and read the data directly into it, getting rid of an unnecessary heap allocation.
2019-05-19gl_shader_disk_cache: Make variable non-const in decompiled entry caseLioncash1-1/+1
std::move does nothing when applied to a const variable. Resources can't be moved if the object is immutable. With this change, we don't end up making several unnecessary heap allocations and copies.
2019-05-19gl_shader_disk_cache: Special-case boolean handlingLioncash2-24/+37
Booleans don't have a guaranteed size, but we still want to have them integrate into the disk cache system without needing to actually use a different type. We can do this by supplying non-template overloads for the bool type. Non-template overloads always have precedence during function resolution, so this is safe to provide. This gets rid of the need to smatter ternary conditionals, as well as the need to use u8 types to store the value in.
2019-05-18gl_rasterizer: Limit OpenGL point size to a minimum of 1ReinUsesLisp1-1/+3
2019-05-18maxwell_to_gl: Add TriangleFan primitive topologyReinUsesLisp1-0/+2
2019-05-17gl_rasterizer: Pass the right number of array quad vertices countReinUsesLisp1-2/+2
2019-05-14maxwell_3d: reduce sevirity of different component formats assert.Fernando Sahmkow1-1/+1
This was reduced due to happening on most games and at such constant rate that it affected performance heavily for the end user. In general, we are well aware of the assert and an implementation is already planned.
2019-05-14video_core/engines/engine_upload: Amend constructor initializer list orderLioncash1-1/+1
Silences a -Wreorder warning.
2019-05-14video_core/engines/engine_upload: Default destructor in the cpp fileLioncash2-1/+3
Avoids inlining destruction logic where applicable, and also makes forward declarations not cause unexpected compilation errors depending on where the State class is used.
2019-05-14video_core/engines/engine_upload: Remove unnecessary const on parameters in function declarationsLioncash1-2/+2
These only apply in the definition of the function. They can be omitted from the declaration.
2019-05-14video_core/engines/engine_upload: Remove unnecessary includesLioncash2-2/+2
2019-05-14video_core/engines/maxwell3d: Get rid of three magic values in CallMethod()Lioncash1-3/+3
We can use the named constant instead of using 32 directly.
2019-05-14video_core/engines/maxwell_3d: Simplify for loops into ranged for loops within InitializeRegisterDefaults()Lioncash1-15/+15
Lessens the amount of code that needs to be read, and gets rid of the need to introduce an indexing variable. Instead, we just operate on the objects directly.
2019-05-14video_core/engines/maxwell_3d: Add is_trivially_copyable_v check for RegsLioncash1-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.
2019-05-14yuzu: Remove explicit types from locks where applicableLioncash2-2/+2
With C++17's deduction guides, the type doesn't need to be explicitly specified within locking primitives anymore.
2019-05-14video_core/gpu_thread: Remove redundant copy constructor for CommandDataContainerLioncash1-6/+0
std::move within a copy constructor (on a data member that isn't mutable) will always result in a copy. Because of that, the behavior of this copy constructor is identical to the one that would be generated automatically by the compiler, so we can remove it.
2019-05-12GPU/MMEInterpreter: Ignore the 'exit' flag when it's executed inside a delay slot.Sebastian Valle1-3/+3
It seems instructions marked with the 'exit' flag will not cause an exit when executed within a delay slot. This was hwtested by fincs.
2019-05-10video_core/memory_manager: Mark IsBlockContinuous() as a const member functionLioncash2-4/+4
Corrects the typo in its name and marks the function as a const member function, given it doesn't actually modify memory manager state.
2019-05-10video_core/memory_manager: Mark the constructor as explicitLioncash1-1/+1
Prevents implicit converting constructions of the memory manager.
2019-05-10video_core/memory_manager: Default the destructor within the cpp fileLioncash2-0/+3
Makes the class less surprising when it comes to forward declaring the type, and also prevents inlining the destruction code of the class, given it contains non-trivial types.
2019-05-10video_core/memory_manager: Amend doxygen commentsLioncash1-7/+7
Corrects references to non-existent parameters and corrects typos.
2019-05-10video_core/memory_manager: Remove superfluous const from function declarationsLioncash1-7/+7
These are able to be omitted from the declaration of functions, since they don't do anything at the type system level. The definitions of the functions can retain the use of const though, since they make the variables immutable in the implementation of the function where they're used.
2019-05-10video_core/renderer_opengl/gl_shader_cache: Correct member initialization orderLioncash1-1/+1
Silences a -Wreorder warning.
2019-05-10video_core/shader/decode/texture: Remove unused variable from GetTld4Code()Lioncash1-1/+0
2019-05-10renderer_vulkan/vk_shader_decompiler: Remove unused variable from DeclareInternalFlags()Lioncash1-1/+0
2019-05-10video_core/renderer_opengl/gl_shader_decompiler: Remove unused Composite() functionLioncash1-11/+0
This isn't used at all, so it can be removed.
2019-05-10video_core/renderer_opengl/gl_rasterizer_cache: Remove unused variable in UploadGLMipmapTexture()Lioncash1-1/+0
This variable is unused entirely, so it can be removed.
2019-05-10video_core/gpu_thread: Remove unused local variableLioncash1-1/+1
Instead of retrieving the data from the std::variant instance, we can just check if the variant contains that type of data. This is essentially the same behavior, only it returns a bool indicating whether or not the type in the variant is currently active, instead of actually retrieving the data.
2019-05-10video_core/textures/astc: Remove unused variablesLioncash1-6/+2
Silences a few compilation warnings.
2019-05-07Correct possible error on Rasterizer CachesFernando Sahmkow1-1/+2
There was a weird bug that could happen if the object died directly and the cache address wasn't stored.
2019-05-04shader/decode/texture: Remove unused variableLioncash1-1/+0
This isn't used anywhere, so we can get rid of it.
2019-05-04gl_rasterizer: Silence unused variable warningLioncash1-2/+2
Makes use of src, so it's not considered unused.
2019-05-03shader_ir/other: Implement IPA.IDXReinUsesLisp2-5/+9
2019-05-03gl_shader_decompiler: Skip physical unused attributesReinUsesLisp1-18/+27
2019-05-03shader_ir/memory: Assert on non-32 bits ALD.PHYSReinUsesLisp1-0/+3
2019-05-03shader: Add physical attributes commentariesReinUsesLisp4-4/+8
2019-05-03gl_shader_decompiler: Implement GLSL physical attributesReinUsesLisp2-66/+101
2019-05-03shader_ir/memory: Implement physical input attributesReinUsesLisp4-6/+32
2019-05-03gl_shader_decompiler: Abstract generic attribute operationsReinUsesLisp1-29/+26
2019-05-03gl_shader_decompiler: Declare all possible varyings on physical attribute usageReinUsesLisp4-27/+88
2019-05-03shader: Remove unused AbufNode Ipa modeReinUsesLisp6-35/+14
2019-05-03shader_ir/memory: Emit AL2P IRReinUsesLisp2-0/+22
2019-05-03shader_bytecode: Add AL2P decodingReinUsesLisp1-2/+15
2019-05-01Refactors and name corrections.Fernando Sahmkow6-35/+35
2019-05-01gl_shader_disk_cache: Skip stored shader variants instead of assertingReinUsesLisp1-1/+4
Instead of asserting on already stored shader variants, silently skip them. This shouldn't be happening but when a shader is invalidated and it is not stored in the shader cache, this assert would hit and save that shader anyways when the asserts are disabled.
2019-05-01Fix Layered ASTC TexturesFernando Sahmkow1-1/+3
By adding the missing layer offset in ASTC compression.
2019-04-26shader_ir: Move Sampler index entry in operand< to sort declarationsReinUsesLisp1-2/+2
2019-04-26shader_ir: Add missing entry to Sampler operand< comparisonReinUsesLisp1-2/+3
2019-04-26shader_ir/texture: Fix sampler const buffer key shiftReinUsesLisp1-1/+1
2019-04-23Re added new lines at the end of filesFreddyFunk2-2/+2
2019-04-23gl_shader_disk_cache: Compress precompiled shader cache file with Zstandardunknown1-6/+10
2019-04-23gl_shader_disk_cache: Use VectorVfsFile for the virtual precompiled shader cache fileunknown3-101/+168
2019-04-23gl_shader_disk_cache: Remove per shader compressionunknown2-45/+11
2019-04-23Fixes and Corrections to DMA EngineFernando Sahmkow2-37/+57
2019-04-23Add Swizzle Parameters to the DMA engineFernando Sahmkow2-2/+27
2019-04-23Add Documentation Headers to all the GPU EnginesFernando Sahmkow5-0/+29
2019-04-23Corrections and stylingFernando Sahmkow5-6/+9
2019-04-23Implement Maxwell3D Data UploadFernando Sahmkow2-3/+32
2019-04-23Introduce skeleton of the GPU Compute Engine.Fernando Sahmkow3-8/+202
2019-04-23Revamp Kepler Memory to use a subegine to manage uploadsFernando Sahmkow6-93/+134
2019-04-21Rasterizer Cache: Use a temporal storage for Surfaces loading/flushing.Fernando Sahmkow4-18/+30
This PR should heavily reduce memory usage since temporal buffers are no longer stored per Surface but instead managed by the Rasterizer Cache.
2019-04-21Corrections Half Float operations on const buffers and implement saturation.Fernando Sahmkow2-15/+16
2019-04-20Apply Position Y DirectionFernando Sahmkow1-0/+3
2019-04-20RasterizerCache Redesign: Flush Fernando Sahmkow6-17/+26
flushing is now responsability of children caches instead of the cache object. This change will allow the specific cache to pass extra parameters on flushing and will allow more flexibility.
2019-04-20make ReadBlockunsafe and WriteBlockunsafe, ignore invalid pages.Fernando Sahmkow1-4/+12
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-18video_core: Silent -Wswitch warningsReinUsesLisp10-77/+106
2019-04-17Implement IsBlockContinousFernando Sahmkow2-2/+13
This detects when a GPU Memory Block is not continous within host cpu memory.
2019-04-16Apply Const correctness to SwizzleKepler and replace u32 for size_t on iterators.Fernando Sahmkow2-9/+12
2019-04-16Use ReadBlockUnsafe for fetyching DMA CommandListsFernando Sahmkow2-4/+2
2019-04-16Document unsafe versions and add BlockCopyUnsafeFernando Sahmkow3-16/+45
2019-04-16Use ReadBlockUnsafe for Shader CacheFernando Sahmkow1-5/+7
2019-04-16Use ReadBlockUnsafe on TIC and TSC readingFernando Sahmkow2-2/+4
Use ReadBlockUnsafe on TIC and TSC reading as memory is never flushed from host GPU there.
2019-04-16GPU MemoryManager: Implement ReadBlockUnsafe and WriteBlockUnsafeFernando Sahmkow2-0/+34
2019-04-16Use WriteBlock and ReadBlock.Fernando Sahmkow1-10/+6
2019-04-16Implement Block Linear copies in Kepler Memory.Fernando Sahmkow3-5/+38
2019-04-16vk_shader_decompiler: Add missing operationsReinUsesLisp1-0/+7
2019-04-16shader_ir/decode: Fix half float pre-operations and remove MetaHalfArithmeticReinUsesLisp9-85/+72
Operations done before the main half float operation (like HAdd) were managing a packed value instead of the unpacked one. Adding an unpacked operation allows us to drop the per-operand MetaHalfArithmetic entry, simplifying the code overall.
2019-04-16gl_shader_decompiler: Fix MrgH0 decompilationReinUsesLisp1-2/+2
GLSL decompilation for HMergeH0 was wrong. This addresses that issue.
2019-04-16shader_ir/decode: Implement half float saturationReinUsesLisp5-8/+31
2019-04-16shader_ir/decode: Reduce severity of unimplemented half-float FTZReinUsesLisp3-3/+9
2019-04-16renderer_opengl: Implement half float NaN comparisonsReinUsesLisp3-36/+59
2019-04-16shader_ir: Avoid using static on heap-allocated objectsReinUsesLisp1-5/+4
Using static here might be faster at runtime, but it adds a heap allocation called before main.
2019-04-16Do some corrections in conversion shader instructions.Fernando Sahmkow2-23/+73
Corrects encodings for I2F, F2F, I2I and F2I Implements Immediate variants of all four conversion types. Add assertions to unimplemented stuffs.
2019-04-15Correct Kepler Memory on Linear Pushes.Fernando Sahmkow2-16/+48
2019-04-15Support compressed formats on linear textures.Fernando Sahmkow1-2/+5
2019-04-15Correct Pitch in Fermi2DFernando Sahmkow1-4/+1
2019-04-14gl_shader_decompiler: Use variable AOFFI on supported hardwareReinUsesLisp10-71/+102
2019-04-14shader_ir: Implement STG, keep track of global memory usage and flushReinUsesLisp11-89/+186
2019-04-12video_core/gpu: Create threads separately from initializationLioncash9-14/+47
Like with CPU emulation, we generally don't want to fire off the threads immediately after the relevant classes are initialized, we want to do this after all necessary data is done loading first. This splits the thread creation into its own interface member function to allow controlling when these threads in particular get created.
2019-04-11gl_rasterizer_cache: Relax restrictions on FastCopySurface and FastLayeredCopySurfaceFernando Sahmkow1-4/+10
2019-04-11gl_shader_manager: Move code to source file and minor clean upReinUsesLisp2-34/+61
2019-04-10gl_rasterizer: Apply just the needed state on ClearReinUsesLisp1-4/+4
2019-04-10gl_device: Implement interface and add uniform offset alignmentReinUsesLisp5-13/+70
2019-04-10vk_shader_decompiler: Implement flow primitivesReinUsesLisp1-5/+82
2019-04-10vk_shader_decompiler: Implement most common texture primitivesReinUsesLisp1-8/+65
2019-04-10vk_shader_decompiler: Implement texture decompilation helper functionsReinUsesLisp1-0/+32
2019-04-10vk_shader_decompiler: Implement Assign and LogicalAssignReinUsesLisp1-2/+64
2019-04-10vk_shader_decompiler: Implement non-OperationCode visitsReinUsesLisp1-7/+129
2019-04-10vk_shader_decompiler: Implement OperationCode decompilation interfaceReinUsesLisp1-1/+411
2019-04-10vk_shader_decompiler: Implement VisitReinUsesLisp1-1/+50
2019-04-10vk_shader_decompiler: Implement labels tree and flowReinUsesLisp1-0/+71
2019-04-10vk_shader_decompiler: Implement declarationsReinUsesLisp1-3/+457
2019-04-10vk_shader_decompiler: Declare and stub interface for a SPIR-V decompilerReinUsesLisp3-0/+127
2019-04-10video_core: Add sirit as optional dependency with VulkanReinUsesLisp1-1/+4
sirit is a runtime assembler for SPIR-V
2019-04-10Remove bounding in LD_CFernando Sahmkow1-2/+1
2019-04-09Correct Fermi Copy on Linear Textures.Fernando Sahmkow1-0/+4
2019-04-09Implement Texture Format ZF32_X24S8.Fernando Sahmkow1-0/+2
2019-04-09Correct depth compare with color formats for R32FFernando Sahmkow1-2/+17
2019-04-08gl_backend: Align Pixel StorageFernando Sahmkow2-4/+12
This commit makes sure GL reads on the correct pack size for the respective texture buffer.
2019-04-08Correct LOP_IMN encodingFernando Sahmkow1-1/+1
2019-04-08Correct XMAD mode, psl and high_b on different encodings.Fernando Sahmkow2-9/+33
2019-04-08Adapt Bindless to work with AOFFIFernando Sahmkow1-7/+18
2019-04-08Move ConstBufferAccessor to Maxwell3d, correct mistakes and clang format.Fernando Sahmkow9-44/+25
2019-04-08Fix bad rebaseFernando Sahmkow1-2/+1
2019-04-08Fix TMMLFernando Sahmkow1-5/+7
2019-04-08Simplify ConstBufferAccessorFernando Sahmkow5-53/+22
2019-04-08Refactor GetTextureCode and GetTexCode to use an optional instead of optional parametersFernando Sahmkow2-34/+33
2019-04-08Implement TXQ_BFernando Sahmkow2-2/+10
2019-04-08Implement TMML_BFernando Sahmkow1-5/+10
2019-04-08Corrections to TEX_BFernando Sahmkow2-4/+37
2019-04-08Fixes to Const Buffer Accessor and FormattingFernando Sahmkow3-10/+10
2019-04-08Implement Bindless Handling on SetupTextureFernando Sahmkow4-18/+34
2019-04-08Unify both sampler types.Fernando Sahmkow4-22/+48
2019-04-08Implement Bindless Samplers and TEX_B in the IR.Fernando Sahmkow4-16/+77
2019-04-08Implement Const Buffer AccessorFernando Sahmkow5-2/+65
2019-04-07Permit a Null Shader in case of a bad host_ptr.Fernando Sahmkow1-0/+4
2019-04-06maxwell_3d: Reduce severity of ProcessSyncPointReinUsesLisp1-2/+2
2019-04-06video_core/textures/convert: Replace include with a forward declarationLioncash2-1/+5
Avoids dragging in a direct dependency in a header.
2019-04-06video_core/texures/texture: Remove unnecessary includesLioncash6-2/+5
Nothing in this header relies on common_funcs or the memory manager. This gets rid of reliance on indirect inclusions in the OpenGL caches.
2019-04-06memory_manager: Improved implementation of read/write/copy block.bunnei3-12/+84
- Fixes graphical issues with Chocobo's Mystery Dungeon EVERY BUDDY! - Fixes a crash with Mario Tennis Aces
2019-04-06video_core/macro_interpreter: Remove assertion within FetchParameter()Lioncash1-2/+1
We can just use .at(), which essentially does the same thing, but with less code.
2019-04-06video_core/macro_interpreter: Simplify GetRegister()Lioncash1-11/+6
Given we already ensure nothing can set the zeroth register in SetRegister(), we don't need to check if the index is zero and special case it. We can just access the register normally, since it's already going to be zero. We can also replace the assertion with .at() to perform the equivalent behavior inline as part of the API.
2019-04-06video_core/memory_manager: Make Read() a const qualified member functionLioncash2-6/+6
Given this doesn't actually alter internal state, this can be made a const member function.
2019-04-06video_core/memory_manager: Make ReadBlock() a const qualifier member functionLioncash2-2/+2
Now, since we have a const qualified variant of GetPointer(), we can put it to use in ReadBlock() to retrieve the source pointer that is passed into memcpy. Now block reading may be done from a const context.
2019-04-06video_core/memory_manager: Add a const qualified variant of GetPointer()Lioncash2-2/+17
Allows retrieving read-only pointers from a const context externally.
2019-04-06video_core/memory_manager: Make FindFreeRegion() a const member functionLioncash2-10/+11
This doesn't modify internal state, so it can be made a const member function.
2019-04-06video_core/memory_manager: Make GpuToCpuAddress() a const member functionLioncash2-3/+3
This doesn't modify any internal state, so it can be made a const member function to allow its use in const contexts.
2019-04-06Implement SyncPoint Register in the GPU.Fernando Sahmkow2-1/+27
2019-04-06video_core/gpu_thread: Silence truncation warning in ThreadManager's constructorLioncash1-1/+1
Since c5d41fd812d7eb1a04f36b76c08fe971cee0868c callback parameters were changed to use an s64 to represent late cycles instead of an int, so this was causing a truncation warning to occur here. Changing it to s64 is sufficient to silence the warning.
2019-04-06video_core/engines: Make memory manager members privateLioncash9-13/+14
These aren't used externally by anything, so they can be made private data members.
2019-04-06video_core/engines: Remove unnecessary inclusions where applicableLioncash10-9/+25
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
2019-04-06renderer_opengl/utils: Skip empty bindsReinUsesLisp1-0/+3
2019-04-06gl_rasterizer: Use ARB_multi_bind to update SSBOsReinUsesLisp2-9/+9
2019-04-06gl_rasterizer: Use ARB_multi_bind to update UBOs across stagesReinUsesLisp4-22/+58
2019-04-05gl_shader_decompiler: Rename GenerateTemporal() to GenerateTemporary()Lioncash1-12/+12
Temporal generally indicates a relation to time, but this is just creating a temporary, so this isn't really an accurate name for what the function is actually doing.
2019-04-05gl_shader_decompiler: Fix TXQ typesReinUsesLisp1-2/+3
TXQ returns integer types. Shaders usually do: R0 = TXQ(); // => int R0 = static_cast<float>(R0); If we don't treat it as an integer, it will cast a binary float value as float - resulting in a corrupted number.
2019-04-04video_core/renderer_opengl: Remove unnecessary includesLioncash13-24/+4
Quite a few unused includes have built up over time, particularly on core/memory.h. Removing these includes means the source files including those files will no longer need to be rebuilt if they're changed, making compilation slightly faster in this scenario.
2019-04-04gl_state: Rework to enable individual appliesReinUsesLisp3-339/+324
2019-04-03shader_ir/memory: Reduce severity of LD_L cache management and log itReinUsesLisp2-2/+9
2019-04-03shader_ir/memory: Reduce severity of ST_L cache management and log itReinUsesLisp2-3/+11
2019-04-03gl_shader_decompiler: Return early when an operation is invalidReinUsesLisp1-1/+6
2019-04-02gl_sampler_cache: Port sampler cache to OpenGLReinUsesLisp5-123/+82
2019-04-02video_core: Abstract vk_sampler_cache into a templated classReinUsesLisp5-58/+101
2019-04-02gpu_thread: Improve synchronization by using CoreTiming.bunnei3-51/+65
2019-04-01general: Use deducation guides for std::lock_guard and std::unique_lockLioncash4-17/+17
Since C++17, the introduction of deduction guides for locking facilities means that we no longer need to hardcode the mutex type into the locks themselves, making it easier to switch mutex types, should it ever be necessary in the future.
2019-03-31gl_shader_decompiler: Hide local definitions inside an anonymous namespaceReinUsesLisp1-6/+8
2019-03-31shader_ir/decode: Silent implicit sign conversion warningMat M1-2/+2
Co-Authored-By: ReinUsesLisp <reinuseslisp@airmail.cc>
2019-03-30gl_shader_decompiler: Add AOFFI backing implementationReinUsesLisp1-38/+85
2019-03-30shader_ir/decode: Implement AOFFI for TEX and TLD4ReinUsesLisp2-27/+94
2019-03-30shader_ir: Implement immediate register trackingReinUsesLisp2-1/+19
2019-03-29common/zstd_compression: simplify decompression interfaceunknown1-3/+2
2019-03-29gl_shader_disk_cache: Fixup clang formatunknown1-2/+3
2019-03-29gl_shader_disk_cache: Use Zstandard for compressionunknown1-6/+6
2019-03-29gl_shader_disk_cache: Use LZ4HC with compression level 9 instead of compression level 12 for less compression timeunknown1-3/+3
2019-03-29Addressed feedbackunknown1-6/+6
2019-03-29gl_shader_disk_cache: Use better compression for transferable and precompiled shader disk chache filesunknown1-2/+2
2019-03-29data_compression: Move LZ4 compression from video_core/gl_shader_disk_cache to common/data_compressionunknown2-39/+9
2019-03-29vk_swapchain: Implement a swapchain managerReinUsesLisp3-1/+305
2019-03-28gl_shader_manager: Remove unnecessary gl_shader_manager inclusionLioncash1-2/+0
This isn't used at all in the OpenGL shader cache, so we can remove it's include here, meaning one less file needs to be recompiled if any changes ever occur within that header. core/memory.h is also not used within this file at all, so we can remove it as well.
2019-03-28gl_shader_manager: Move using statement into the cpp fileLioncash2-4/+4
Avoids introducing Maxwell3D into the namespace for everything that includes the header.
2019-03-28gl_shader_manager: Remove reliance on global accessor within MaxwellUniformData::SetFromRegs()Lioncash3-9/+9
We can just pass in the Maxwell3D instance instead of going through the system class to get at it. This also lets us simplify the interface a little bit. Since we pass in the Maxwell3D context now, we only really need to pass the shader stage index value in.
2019-03-27gl_shader_manager: Amend Doxygen string for MaxwellUniformDataLioncash1-3/+3
Previously only one line of the whole comment was in proper Doxygen formatting.
2019-03-27gpu_thread: Remove unused dma_pusher class member variable from ThreadManagerLioncash2-5/+2
The pusher instance is only ever used in the constructor of the ThreadManager for creating the thread that the ThreadManager instance contains. Aside from that, the member is unused, so it can be removed.
2019-03-27gl_rasterizer: Remove unused reference member variable from RasterizerOpenGLLioncash3-9/+5
This member variable is no longer being used, so it can be removed, removing a dependency on EmuWindow from the rasterizer's interface"
2019-03-27video_core: Amend constructor initializer list order where applicableLioncash6-14/+14
Specifies the members in the same order that initialization would take place in. This also silences -Wreorder warnings.
2019-03-27video_core: Add missing override specifiersLioncash3-4/+4
Ensures that the signatures will always match with the base class. Also silences a few compilation warnings.
2019-03-27video_core/gpu: Amend typo in GPU member variable nameLioncash2-7/+8
smaphore -> semaphore
2019-03-22video_core: Implement API agnostic view based texture cacheReinUsesLisp3-0/+974
Implements an API agnostic texture view based texture cache. Classes defined here are intended to be inherited by the API implementation and used in API-specific code. This implementation exposes protected virtual functions to be called from the implementer. Before executing any surface copies methods (defined in API-specific code) it tries to detect if the overlapping surface is a superset and if it is, it creates a view. Views are references of a subset of a surface, it can be a superset view (the same as referencing the whole texture). Current code manages 1D, 1D array, 2D, 2D array, cube maps and cube map arrays with layer and mipmap level views. Texture 3D slices views are not implemented. If the view attempt fails, the fast path is invoked with the overlapping textures (defined in the implementer). If that one fails (returning nullptr) it will flush and reload the texture.
2019-03-22Revert "Devirtualize Register/Unregister and use a wrapper instead."bunnei3-8/+12
- Fixes graphical issues from transitions in Super Mario Odyssey.
2019-03-21memory_manager: Cleanup FindFreeRegion.bunnei2-12/+6
2019-03-21memory_manager: Use Common::AlignUp in public interface as needed.bunnei1-11/+22
2019-03-21memory_manager: Bug fixes and further cleanup.bunnei2-73/+72
2019-03-21maxwell_dma: Check for valid source in destination before copy.bunnei1-0/+10
- Avoid a crash in Octopath Traveler.
2019-03-21memory_manager: Add protections for invalid GPU addresses.bunnei2-22/+43
- Avoid a crash in Xenoblade Chronicles 2.
2019-03-21gl_rasterizer_cache: Check that backing memory is valid before creating a surface.bunnei2-15/+12
- Fixes a crash in Puyo Puyo Tetris.
2019-03-21gpu: Rewrite virtual memory manager using PageTable.bunnei10-201/+472
2019-03-21gpu: Move GPUVAddr definition to common_types.bunnei13-31/+24
2019-03-17gl_rasterizer: Skip zero addr/sized regions on flush/invalidate.bunnei1-0/+6
2019-03-16memory: Simplify rasterizer cache operations.bunnei1-2/+1
2019-03-16video_core: Refactor to use MemoryManager interface for all memory access.bunnei19-186/+194
# 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
2019-03-15gpu: Use host address for caching instead of guest address.bunnei24-288/+384
2019-03-13video_core/morton: Use enum to describe MortonCopyPixels128 modeReinUsesLisp3-7/+10
2019-03-13video_core/morton: Remove unused parameter in MortonSwizzleReinUsesLisp3-8/+7
2019-03-13video_core/morton: Remove clang-format off when it's not neededReinUsesLisp1-133/+129
2019-03-13video_core/morton: Remove unused functionsReinUsesLisp1-39/+0
2019-03-13video_core/texture: Fix up sampler lod biasReinUsesLisp1-1/+1
2019-03-13vk_sampler_cache: Use operator== instead of memcmpMat M1-1/+1
Co-Authored-By: ReinUsesLisp <reinuseslisp@airmail.cc>
2019-03-13vk_sampler_cache: Implement a sampler cacheReinUsesLisp4-1/+140
2019-03-12video_core/texture: Add a raw representation of TSCEntryReinUsesLisp1-24/+29
2019-03-11renderer_opengl/gl_global_cache: Replace indexing for assignment with insert_or_assignLioncash2-3/+3
The previous code had some minor issues with it, really not a big deal, but amending it is basically 'free', so I figured, "why not?". With the standard container maps, when: map[key] = thing; is done, this can cause potentially undesirable behavior in certain scenarios. In particular, if there's no value associated with the key, then the map constructs a default initialized instance of the value type. In this case, since it's a std::shared_ptr (as a type alias) that is the value type, this will construct a std::shared_pointer, and then assign over it (with objects that are quite large, or actively heap allocate this can be extremely undesirable). We also make the function take the region by value, as we can avoid a copy (and by extension with std::shared_ptr, a copy causes an atomic reference count increment), in certain scenarios when ownership isn't a concern (i.e. when ReserveGlobalRegion is called with an rvalue reference, then no copy at all occurs). So, it's more-or-less a "free" gain without many downsides.
2019-03-11renderer_opengl/gl_global_cache: Append missing override specifiersLioncash1-2/+2
Two of the functions here are overridden functions, so we can append these specifiers to make it explicit.
2019-03-11gl_rasterizer: Use system instance passed from argumentReinUsesLisp2-29/+31
2019-03-09gl_rasterizer: Encapsulate sampler queries into methodsReinUsesLisp3-64/+72
2019-03-09gl_rasterizer: Minor logger changesReinUsesLisp1-19/+13
2019-03-08dma_pusher: Store command_list_header by copyReinUsesLisp1-1/+1
Instead of holding a reference that will get invalidated by dma_pushbuffer.pop(), hold it as a copy. This doesn't have any performance cost since CommandListHeader is 8 bytes long.
2019-03-07video_core/gpu_thread: Remove unimplemented WaitForIdle function prototypeLioncash1-3/+0
This function didn't have a definition, so we can remove it to prevent accidentally attempting to use it.
2019-03-07video_core/gpu_thread: Amend constructor initializer list orderLioncash1-2/+2
Moves the data members to satisfy the order they're declared as in the constructor initializer list. Silences a -Wreorder warning.
2019-03-07video_core/gpu: Make GPU's destructor virtualLioncash3-3/+3
Because of the recent separation of GPU functionality into sync/async variants, we need to mark the destructor virtual to provide proper destruction behavior, given we use the base class within the System class. Prior to this, it was undefined behavior whether or not the destructor in the derived classes would ever execute.
2019-03-07gpu_thread: Fix deadlock with threading idle state check.bunnei2-7/+11
2019-03-07gpu_thread: (HACK) Ignore flush on FlushAndInvalidateRegion.bunnei1-3/+1
2019-03-07gpu: Always flush.bunnei2-13/+6
2019-03-07gpu: Refactor a/synchronous implementations into their own classes.bunnei7-63/+155
2019-03-07gpu: Move command processing to another thread.bunnei7-10/+353
2019-03-07gpu: Refactor command and swap buffers interface for asynch.bunnei2-3/+22
2019-03-07gpu: Refactor to take RendererBase instead of RasterizerInterface.bunnei2-17/+22
2019-03-06video_core/engines: Remove unnecessary includesLioncash10-11/+11
Removes a few unnecessary dependencies on core-related machinery, such as the core.h and memory.h, which reduces the amount of rebuilding necessary if those files change. This also uncovered some indirect dependencies within other source files. This also fixes those.
2019-03-05video_core/surface: Remove obsolete TODO in PixelFormatFromRenderTargetFormat()Lioncash1-2/+0
This isn't needed anymore, according to Hexagon
2019-03-04video_core/renderer_opengl: Replace direct usage of global system object accessorsLioncash2-11/+17
We already pass a reference to the system object to the constructor of the renderer, so we can just use that instead of using the global accessor functions.
2019-03-04maxwell_to_vk: Initial implementationReinUsesLisp4-3/+553
2019-03-02vk_buffer_cache: Fix clang-formatReinUsesLisp1-3/+3
2019-03-02fuck git for ruining my day, I will learn but I will not forgivebunnei1-1/+1
2019-03-01vk_buffer_cache: Implement a buffer cacheReinUsesLisp3-0/+205
This buffer cache is just like OpenGL's buffer cache with some minor style changes. It uses VKStreamBuffer.
2019-02-28gl_rasterizer: Remove texture unbinding after dispatching a draw callReinUsesLisp1-12/+0
Unbinding was required when OpenGL delete operations didn't unbind a resource if it was bound. This is no longer needed and can be removed.
2019-02-28gl_state: Fixup multibind bugReinUsesLisp1-2/+2
2019-02-28Devirtualize Register/Unregister and use a wrapper instead.Fernando Sahmkow3-12/+8
2019-02-28Corrections and redesign.Fernando Sahmkow2-51/+51
2019-02-28Fix linux compile error.Fernando Sahmkow1-1/+1
2019-02-28Remove NotifyFrameBuffer as we are doing a texception pass every drawcall.Fernando Sahmkow2-25/+0
2019-02-28Remove certain optimizations that caused texception to fail in certain scenarios.Fernando Sahmkow3-24/+1
2019-02-28Bug fixes and formattingFernando Sahmkow2-3/+4
2019-02-28rasterizer_cache_gl: Implement Texception PassFernando Sahmkow3-0/+51
2019-02-28rasterizer_cache_gl: Implement Partial Reinterpretation of Surfaces.Fernando Sahmkow2-0/+100
2019-02-28rasterizer_cache: mark reinterpreted surfaces and add ability to reload marked surfaces on next use.Fernando Sahmkow2-0/+78
2019-02-28rasterizer_cache_gl: Notify on framebuffer changeFernando Sahmkow2-4/+23
2019-02-28rasterizer_cache: Expose FlushObject to Child classes and allow redefining of Register and UnregisterFernando Sahmkow1-11/+11
2019-02-27gl_rasterizer_cache: Create texture views for array discrepanciesReinUsesLisp3-32/+42
When a texture is sampled in a shader with a different array mode than the cached state, create a texture view and bind that to the shader instead.
2019-02-27vk_memory_manager: Reorder constructor initializer list in terms of member declaration orderLioncash1-1/+1
Reorders members in the order that they would actually be initialized in. Silences a -Wreorder warning.
2019-02-27gl_rasterizer: Reorder constructor initializer list in terms of member declaration orderLioncash1-2/+2
Orders the members in the order they would actually be initialized in. Silences a -Wreorder warning.
2019-02-27gl_shader_disk_cache: Remove #pragma once from cpp fileLioncash1-2/+0
This is only necessary in headers. Silences a warning with clang.
2019-02-27common/math_util: Move contents into the Common namespaceLioncash9-23/+23
These types are within the common library, so they should be within the Common namespace.
2019-02-27gl_rasterizer_cache: Move format conversion to its own fileReinUsesLisp7-136/+175
2019-02-27decoders: Minor style changesReinUsesLisp2-14/+8
2019-02-26renderer_opengl: Update pixel format trackingReinUsesLisp1-0/+1
2019-02-26maxwell_3d: Use std::bitset to manage dirty flagsReinUsesLisp4-52/+51
2019-02-26vk_stream_buffer: Remove copy code pathReinUsesLisp2-53/+18
2019-02-26shader/decode: Remove extras from MetaTextureReinUsesLisp4-40/+65
2019-02-26shader/decode: Split memory and texture instructions decodingReinUsesLisp6-501/+537
2019-02-25shader/track: Resolve variable shadowing warningsLioncash1-5/+5
2019-02-24vk_stream_buffer: Implement a stream bufferReinUsesLisp3-1/+200
This manages two kinds of streaming buffers: one for unified memory models and one for dedicated GPUs. The first one skips the copy from the staging buffer to the real buffer, since it creates an unified buffer. This implementation waits for all fences to finish their operation before "invalidating". This is suboptimal since it should allocate another buffer or start searching from the beginning. There is room for improvement here. This could also handle AMD's "pinned" memory (a heap with 256 MiB) that seems to be designed for buffer streaming.
2019-02-24vk_resource_manager: Minor VKFenceWatch changesReinUsesLisp2-7/+7
2019-02-24vk_memory_manager: Fixup commit interval allocationReinUsesLisp1-2/+1
VKMemoryCommitImpl was using as the end of its interval "begin + end". That ended up wasting memory.
2019-02-24gl_rasterizer_cache: Fixup parameter order in layered swizzleReinUsesLisp1-1/+1
2019-02-22vk_scheduler: Implement a schedulerReinUsesLisp3-1/+132
The scheduler abstracts command buffer and fence management with an interface that's able to do OpenGL-like operations on Vulkan command buffers. It returns by value a command buffer and fence that have to be used for subsequent operations until Flush or Finish is executed, after that the current execution context (the pair of command buffers and fences) gets invalidated a new one must be fetched. Thankfully validation layers will quickly detect if this is skipped throwing an error due to modifications to a sent command buffer.
2019-02-19video_core/dma_pusher: Simplyfy Step() logic.Markus Wick2-81/+77
As fetching command list headers and and the list of command headers is a fixed 1:1 relation now, they can be implemented within a single call. This cleans up the Step() logic quite a bit.
2019-02-19video_core/dma_pusher: The full list of headers at once.Markus Wick2-48/+58
Fetching every u32 from memory leads to a big overhead. So let's fetch all of them as a block if possible. This reduces the Memory::* calls by the dma_pusher by a factor of 10.
2019-02-19vk_memory_manager: Implement memory managerReinUsesLisp3-0/+342
A memory manager object handles the memory allocations for a device. It allocates chunks of Vulkan memory objects and then suballocates.
2019-02-16video_core: Remove usages of System::GetInstance() within the enginesLioncash8-22/+48
Avoids the use of the global accessor in favor of explicitly making the system a dependency within the interface.
2019-02-16core_timing: Convert core timing into a classLioncash3-3/+4
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.
2019-02-15renderer_opengl: respect the sRGB colorspace for the screenshot featurefearlessTobi1-1/+2
Previously, we were completely ignoring for screenshots whether the game uses RGB or sRGB. This resulted in screenshot colors that looked off for some titles.
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-02-14vk_resource_manager: Implement a command buffer pool with VKFencedPoolReinUsesLisp2-1/+59
2019-02-14vk_resource_manager: Add VKFencedPool interfaceReinUsesLisp2-0/+83
Handles a pool of resources protected by fences. Manages resource overflow allocating more resources. This class is intended to be used through inheritance.
2019-02-14vk_resource_manager: Implement VKResourceManager and fence allocatorReinUsesLisp2-0/+85
CommitFence iterates a pool of fences until one is found. If all fences are being used at the same time, allocate more.
2019-02-14vk_resource_manager: Implement VKFenceWatchReinUsesLisp2-0/+68
A fence watch is used to keep track of the usage of a fence and protect a resource or set of resources without having to inherit from their handlers.
2019-02-14vk_resource_manager: Implement VKFenceReinUsesLisp2-0/+131
Fences take ownership of objects, protecting them from GPU-side or driver-side concurrent access. They must be commited from the resource manager. Their usage flow is: commit the fence from the resource manager, protect resources with it and use them, send the fence to an execution queue and Wait for it if needed and then call Release. Used resources will automatically be signaled when they are free to be reused.
2019-02-14vk_resource_manager: Add VKResource interfaceReinUsesLisp3-1/+43
VKResource is an interface that gets signaled by a fence when it is free to be reused.
2019-02-14shader_decompiler: Improve Accuracy of Attribute Interpolation.Fernando Sahmkow6-38/+74
2019-02-13rasterizer_cache_gl: Only do fast layered copy on the same format. AsFernando Sahmkow1-1/+5
glCopyImageSubData does not support different formats.
2019-02-13vk_device: Abstract device handling into a classReinUsesLisp3-1/+351
VKDevice contains all the data required to manage and initialize a physical device. Its intention is to be passed across Vulkan objects to query device-specific data (for example the logical device and the dispatch loader).
2019-02-13renderer_opengl: Remove reference to global system instanceLioncash1-3/+3
We already store a reference to the system instance that the renderer is created with, so we don't need to refer to the system instance via Core::System::GetInstance()
2019-02-12gl_rasterizer_cache: Remove unnecessary newlineLioncash1-2/+0
2019-02-12gl_rasterizer_cache: Get rid of variable shadowingLioncash1-6/+14
Avoids shadowing the members of the struct itself, which results in a -Wshadow warning.
2019-02-12renderer_vulkan: Add declarations fileReinUsesLisp2-0/+52
This file is intended to be included instead of vulkan/vulkan.hpp. It includes declarations of unique handlers using a dynamic dispatcher instead of a static one (which would require linking to a Vulkan library).
2019-02-12gl_shader_decompiler: Re-implement TLDS lodReinUsesLisp2-22/+35
2019-02-12core_timing: Rename CoreTiming namespace to Core::TimingLioncash3-3/+3
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.
2019-02-11Corrected F2I None mode to RoundEven.Fernando Sahmkow2-4/+4
2019-02-11Fix incorrect value for CC bit in IADDFernando Sahmkow1-2/+2
2019-02-10kepler_compute: Fixup assert and rename enginesReinUsesLisp6-52/+59
When I originally added the compute assert I used the wrong documentation. This addresses that. The dispatch register was tested with homebrew against hardware and is triggered by some games (e.g. Super Mario Odyssey). What exactly is missing to get a valid program bound by this engine requires more investigation.
2019-02-09Implement BGRA8 framebuffer formatgreggameplayer3-0/+4
2019-02-09Implement linear textures (#2089)Fernando Sahmkow2-5/+39
2019-02-08gl_rasterizer_cache: Fixup texture view parametersReinUsesLisp1-2/+2
These parameters were declared as constants and passed to glTextureView but then they were removed on a rabase. This addresses that mistake.
2019-02-07shader_ir: Remove F4 prefix to texture operationsReinUsesLisp3-26/+25
This was originally included because texture operations returned a vec4. These operations now return a single float and the F4 prefix doesn't mean anything.
2019-02-07shader_ir: Clean texture management codeReinUsesLisp3-133/+104
Previous code relied on GLSL parameter order (something that's always ill-formed on an IR design). This approach passes spatial coordiantes through operation nodes and array and depth compare values in the the texture metadata. It still contains an "extra" vector containing generic nodes for bias and component index (for example) which is still a bit ill-formed but it should be better than the previous approach.
2019-02-07gl_rasterizer_cache: Mark surface copy destinations as modified.bunnei2-4/+18
2019-02-07gl_rasterizer: Implement a more accurate fermi 2D copy.bunnei7-68/+188
- This is a blit, use the blit registers.
2019-02-07gl_shader_disk_cache: Check LZ4 size limitFrederic L1-0/+4
Co-Authored-By: ReinUsesLisp <reinuseslisp@airmail.cc>
2019-02-07gl_shader_disk_cache: Consider compressed size zero as an errorFrederic L1-2/+2
Co-Authored-By: ReinUsesLisp <reinuseslisp@airmail.cc>
2019-02-07gl_shader_disk_cache: Use unordered containersReinUsesLisp4-56/+64
2019-02-07gl_shader_cache: Fixup GLSL unique identifiersReinUsesLisp2-3/+3
2019-02-07gl_shader_cache: Link loading screen with disk shader cache loadReinUsesLisp5-9/+40
2019-02-07gl_shader_cache: Set GL_PROGRAM_SEPARABLE to dumped shadersReinUsesLisp1-0/+1
i965 (and probably all mesa drivers) require GL_PROGRAM_SEPARABLE when using glProgramBinary. This is probably required by the standard but it's ignored by permisive proprietary drivers.
2019-02-07gl_shader_disk_cache: Pass core system as argument and guard against games without title idsReinUsesLisp10-17/+57
2019-02-07gl_shader_disk_cache: Guard reads and writes against failureReinUsesLisp2-216/+339
2019-02-07gl_shader_disk_cache: Address miscellaneous feedbackReinUsesLisp5-43/+57
2019-02-07gl_shader_disk_cache: Pass return values returning instead of by parametersReinUsesLisp3-39/+37
2019-02-07gl_shader_disk_cache: Compress program binaries using LZ4ReinUsesLisp1-7/+28
2019-02-07gl_shader_disk_cache: Compress GLSL code using LZ4ReinUsesLisp2-6/+57
2019-02-07gl_shader_disk_cache: Save GLSL and entries into the precompiled fileReinUsesLisp9-135/+234
2019-02-07settings: Hide shader cache behind a settingReinUsesLisp1-0/+21
2019-02-07gl_shader_disk_cache: Invalidate shader cache changes with CMake hashReinUsesLisp1-7/+16
2019-02-07gl_shader_cache: Refactor to support disk shader cacheReinUsesLisp2-121/+388
2019-02-07gl_shader_disk_cache: Add transferable cache invalidationReinUsesLisp2-0/+8
2019-02-07gl_shader_disk_cache: Add precompiled loadReinUsesLisp2-0/+45
2019-02-07gl_shader_disk_cache: Add precompiled saveReinUsesLisp2-0/+57
2019-02-07gl_shader_disk_cache: Add transferable loadReinUsesLisp2-0/+56
2019-02-07gl_shader_disk_cache: Add transferable storesReinUsesLisp2-0/+194
2019-02-07gl_shader_disk_cache: Add ShaderDiskCacheOpenGL class and helpersReinUsesLisp2-0/+76
2019-02-07gl_shader_disk_cache: Add file and move BaseBindings declarationReinUsesLisp4-10/+58
2019-02-07gl_shader_decompiler: Remove name entriesReinUsesLisp2-28/+10
2019-02-07gl_shader_util: Add parameter to handle retrievable programsReinUsesLisp3-6/+10
2019-02-07rasterizer_interface: Add disk cache entry for the rasterizerReinUsesLisp5-0/+14
2019-02-07shader_decode: Implement LDG and basic cbuf trackingReinUsesLisp1-0/+33
2019-02-05video_core/texture: Fix BitField size for depth_minus_oneReinUsesLisp1-1/+1
2019-02-04Update src/video_core/engines/shader_bytecode.hMat M1-1/+1
Co-Authored-By: FernandoS27 <fsahmkow27@gmail.com>
2019-02-03Fix TXQ not using the component mask.Fernando Sahmkow2-6/+13
2019-02-03shader_ir/memory: Add ST_L 64 and 128 bits storesReinUsesLisp1-3/+11
2019-02-03shader/track: Search inside of conditional nodesReinUsesLisp1-0/+11
Some games search conditionally use global memory instructions. This allows the heuristic to search inside conditional nodes for the source constant buffer.
2019-02-03shader_ir: Rename BasicBlock to NodeBlockReinUsesLisp30-122/+120
It's not always used as a basic block. Rename it for consistency.
2019-02-03shader_ir: Pass decoded nodes as a whole instead of per basic blocksReinUsesLisp27-57/+62
Some games call LDG at the top of a basic block, making the tracking heuristic to fail. This commit lets the heuristic the decoded nodes as a whole instead of per basic blocks. This may lead to some false positives but allows it the heuristic to track cases it previously couldn't.
2019-02-03video_core: Assert on invalid GPU to CPU address queriesReinUsesLisp8-47/+67
2019-02-03maxwell_3d: Allow sampler handles with TSC id zeroReinUsesLisp1-10/+6
2019-02-03maxwell_3d: Allow texture handles with TIC id zeroReinUsesLisp3-21/+7
Also remove "enabled" field from Tegra::Texture::FullTextureInfo because it would become unused.
2019-02-03memory_manager: Check for reserved page statusReinUsesLisp1-1/+2
2019-02-03shader_ir/memory: Add LD_L 128 bits loadsReinUsesLisp1-7/+19
2019-02-03shader_bytecode: Rename BytesN enums to BitsNReinUsesLisp2-7/+7
2019-02-03shader_ir/memory: Add LD_L 64 bits loadsReinUsesLisp1-6/+17
2019-02-01rasterizer_interface: Remove unused AccelerateFill operationReinUsesLisp3-11/+0
2019-02-01video_core: Remove unused Fill surface typeReinUsesLisp2-6/+1
2019-01-30gl_rasterizer_cache: Fixup test clauseReinUsesLisp1-6/+5
2019-01-30gl_rasterizer_cache: Guard clause swizzle testingMat M1-1/+3
Co-Authored-By: ReinUsesLisp <reinuseslisp@airmail.cc>
2019-01-30gl_state: Remove texture target trackingReinUsesLisp2-5/+0
2019-01-30gl_rasterizer_cache: Move swizzling to textures instead of stateReinUsesLisp6-28/+35
2019-01-30gl_state: Use DSA and multi bind to update texture bindingsReinUsesLisp1-8/+22
2019-01-30gl_rasterizer: Use DSA for texturesReinUsesLisp5-185/+105
2019-01-30video_core/dma_pusher: Silence C4828 warningsLioncash1-1/+1
This was previously causing: warning C4828: The file contains a character starting at offset 0xa33 that is illegal in the current source character set (codepage 65001). warnings on Windows when compiling yuzu.
2019-01-30shader_ir: Unify constant buffer offset valuesReinUsesLisp17-25/+36
Constant buffer values on the shader IR were using different offsets if the access direct or indirect. cbuf34 has a non-multiplied offset while cbuf36 does. On shader decoding this commit multiplies it by four on cbuf34 queries.
2019-01-30gl_shader_cache: Use explicit bindingsReinUsesLisp7-249/+194
2019-01-30gl_rasterizer: Implement global memory managementReinUsesLisp6-4/+140
2019-01-30shader_decode: Implement LDG and basic cbuf trackingReinUsesLisp7-10/+240
2019-01-30video_core/GPU Implemented the GPU PFIFO puller semaphore operations. (#1908)Kevin2-12/+242
* Implemented the puller semaphore operations. * Nit: Fix 2 style issues * Nit: Add Break to default case. * Fix style. * Update for comments. Added ReferenceCount method * Forgot to remove GpuSmaphoreAddress union. * Fix the clang-format issues. * More clang formatting. * two more white spaces for the Clang formatting. * Move puller members into the regs union * Updated to use Memory::WriteBlock instead of Memory::Write* * Fix clang style issues * White space clang error * Removing unused funcitons and other pr comment * Removing unused funcitons and other pr comment * More union magic for setting regs value. * union magic refcnt as well * Remove local var * Set up the regs and regs_assert_positions up properly * Fix clang error
2019-01-30gl_shader_cache: Fix texture view for cubemaps as cubemap arraysReinUsesLisp4-3/+28
Cubemaps are considered layered and to create a texture view the texture mustn't be a layered texture, resulting in cubemaps being bound as cubemap arrays. To fix this issue this commit introduces an extra surface parameter called "is_array" and uses this to query for texture view creation. Now that texture views for cubemaps are actually being created, this also fixes the number of layers created for the texture view (since they have to be 6 to create a texture view of cubemaps).
2019-01-30gl_rasterizer: Workaround invalid zeta clearsReinUsesLisp2-14/+19
Some games (like Xenoblade Chronicles 2) clear both depth and stencil buffers while there's a depth-only texture attached (e.g. D16 Unorm). This commit reads the zeta format of the bound surface on ConfigureFramebuffers and returns if depth and/or stencil attachments were set. This is ignored on DrawArrays but on Clear it's used to just clear those attachments, bypassing an OpenGL error.
2019-01-28shader/shader_ir: Amend three comment typosLioncash1-3/+3
Given we're in the area, these are three trivial typos that can be corrected.
2019-01-28shader/shader_ir: Amend constructor initializer ordering for AbufNodeLioncash1-2/+2
Orders the class members in the same order that they would actually be initialized in. Gets rid of two compiler warnings.
2019-01-28shader/decode: Avoid a pessimizing std::move within DecodeRange()Lioncash1-1/+1
std::moveing a local variable in a return statement has the potential to prevent copy elision from occurring, so this can just be converted into a regular return.
2019-01-26video_core: Silent implicit conversion warningReinUsesLisp1-3/+4
2019-01-24frontend: Refactor ScopeAcquireWindowContext out of renderer_opengl.bunnei3-28/+2
2019-01-22maxwell_3d: Set rt_separate_frag_data to 1 by defaultReinUsesLisp2-4/+6
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).
2019-01-21Rename step 1 and step 2 to be a little more descriptiveJames Rowe1-2/+2
2019-01-20QT: Upgrade the Loading Bar to look much betterJames Rowe1-0/+9
2019-01-18gl_rasterizer: Silent unsafe mix warningReinUsesLisp1-1/+1
2019-01-16shader_ir: Fixup clang buildReinUsesLisp1-4/+6
2019-01-15gl_shader_decompiler: replace std::get<> with std::get_if<> for macOS compatibilityReinUsesLisp1-44/+58
2019-01-15gl_shader_decompiler: Inline textureGather componentReinUsesLisp1-15/+16
2019-01-15shader_decode: Fixup XMADReinUsesLisp1-1/+1
2019-01-15shader_ir: Pass to decoder functions basic block's codeReinUsesLisp27-82/+83
2019-01-15shader_decode: Improve zero flag implementationReinUsesLisp15-75/+79
2019-01-15shader_ir: Remove composite primitives and use temporals insteadReinUsesLisp4-241/+224
2019-01-15gl_shader_decompiler: Fixup AssignCompositeHalfReinUsesLisp1-1/+1
2019-01-15shader_decode: Use proper primitive namesReinUsesLisp4-25/+21
2019-01-15shader_decode: Use BitfieldExtract instead of shift + andReinUsesLisp8-48/+37
2019-01-15shader_ir: Remove Ipa primitiveReinUsesLisp3-13/+2
2019-01-15gl_shader_decompiler: Use rasterizer's UBO size limitReinUsesLisp1-1/+3
2019-01-15gl_shader_gen: Fixup code formattingReinUsesLisp2-18/+22
2019-01-15video_core: Rename glsl_decompiler to gl_shader_decompilerReinUsesLisp7-7/+7
2019-01-15shader_ir: Remove RZ and use Register::ZeroIndex insteadReinUsesLisp3-12/+16
2019-01-15shader_decode: Implement TEXS.F16ReinUsesLisp3-15/+57
2019-01-15shader_decode: Fixup R2PReinUsesLisp1-2/+3
2019-01-15glsl_decompiler: Fixup TLDSReinUsesLisp1-1/+0
2019-01-15glsl_decompiler: Fixup geometry shadersReinUsesLisp2-15/+17
2019-01-15shader_decode: Fixup WriteLogicOperation zero comparisonReinUsesLisp1-1/+1
2019-01-15glsl_decompiler: Fixup permissive member function declarationsReinUsesLisp1-133/+133
2019-01-15shader_decode: Fixup PSETReinUsesLisp1-2/+3
2019-01-15shader_decode: Fixup clang-formatReinUsesLisp2-2/+4
2019-01-15video_core: Implement IR based geometry shadersReinUsesLisp4-10/+102
2019-01-15shader_decode: Implement VMAD and VSETPReinUsesLisp5-2/+129
2019-01-15shader_decode: Implement HSET2ReinUsesLisp3-1/+50
2019-01-15shader_decode: Rework HSETP2ReinUsesLisp4-47/+57
2019-01-15shader_decode: Implement R2PReinUsesLisp1-1/+28
2019-01-15shader_decode: Implement CSETPReinUsesLisp1-14/+37
2019-01-15shader_decode: Implement PSETReinUsesLisp1-1/+16
2019-01-15shader_decode: Implement HFMA2ReinUsesLisp4-5/+60
2019-01-15glsl_decompiler: Remove HNegate inliningReinUsesLisp1-10/+0
2019-01-15shader_decode: Implement POPCReinUsesLisp4-1/+22
2019-01-15shader_decode: Implement TLDS (untested)ReinUsesLisp3-10/+92
2019-01-15shader_decode: Update TLD4 reflecting #1862 changesReinUsesLisp2-52/+52
2019-01-15shader_ir: Fixup TEX and TEXS and partially fix TLD4 decompilingReinUsesLisp3-60/+72
2019-01-15shader_decode: Fixup FSETReinUsesLisp1-2/+2
2019-01-15shader_decode: Implement IADD32IReinUsesLisp1-0/+11
2019-01-15shader_decode: Fixup clang-formatReinUsesLisp1-1/+1
2019-01-15video_core: Return safe values after an assert hitsReinUsesLisp8-8/+19
2019-01-15shader_decode: Implement FFMAReinUsesLisp1-1/+36
2019-01-15video_core: Address feedbackReinUsesLisp4-13/+16
2019-01-15shader_ir: Fixup file inclusions and clang-formatReinUsesLisp3-2/+2
2019-01-15shader_ir: Move comment node stringMat M1-2/+2
Co-Authored-By: ReinUsesLisp <reinuseslisp@airmail.cc>
2019-01-15shader_ir: Address feedback to avoid UB in bit castingReinUsesLisp1-2/+4
2019-01-15shader_decode: Fixup clang-formatReinUsesLisp2-3/+2
2019-01-15shader_decode: Implement LEAReinUsesLisp1-0/+55
2019-01-15shader_decode: Implement IADD3ReinUsesLisp1-0/+61
2019-01-15shader_decode: Implement LOP3ReinUsesLisp2-0/+62
2019-01-15shader_decode: Implement ST_LReinUsesLisp1-0/+17
2019-01-15shader_decode: Implement LD_LReinUsesLisp1-0/+18
2019-01-15shader_decode: Implement HSETP2ReinUsesLisp1-1/+37
2019-01-15shader_decode: Implement HADD2 and HMUL2ReinUsesLisp1-1/+48
2019-01-15shader_decode: Implement HADD2_IMM and HMUL2_IMMReinUsesLisp1-1/+28
2019-01-15shader_decode: Implement MOV_SYSReinUsesLisp1-0/+27
2019-01-15shader_decode: Implement IMNMXReinUsesLisp1-0/+16
2019-01-15shader_decode: Implement F2F_CReinUsesLisp1-2/+10
2019-01-15shader_decode: Implement I2IReinUsesLisp1-0/+26
2019-01-15shader_decode: Implement BRA internal flagReinUsesLisp1-4/+8
2019-01-15shader_decode: Implement ISCADDReinUsesLisp1-0/+15
2019-01-15shader_decode: Implement XMADReinUsesLisp1-1/+85
2019-01-15shader_decode: Implement PBK and BRKReinUsesLisp1-1/+22
2019-01-15shader_decode: Implement LOPReinUsesLisp1-0/+15
2019-01-15shader_decode: Implement SELReinUsesLisp1-0/+8
2019-01-15shader_decode: Implement IADDReinUsesLisp1-1/+28
2019-01-15shader_decode: Implement ISETPReinUsesLisp1-1/+30
2019-01-15shader_decode: Implement BFIReinUsesLisp1-1/+22
2019-01-15shader_decode: Implement ISETReinUsesLisp1-1/+27
2019-01-15shader_decode: Implement LD_CReinUsesLisp1-0/+31
2019-01-15shader_decode: Implement SHLReinUsesLisp1-0/+8
2019-01-15shader_decode: Implement SHRReinUsesLisp1-1/+26
2019-01-15shader_decode: Implement LOP32IReinUsesLisp2-1/+72
2019-01-15shader_decode: Implement BFEReinUsesLisp1-1/+25
2019-01-15shader_decode: Implement FSETReinUsesLisp1-1/+36
2019-01-15shader_decode: Implement F2IReinUsesLisp1-0/+37
2019-01-15shader_decode: Implement I2FReinUsesLisp1-0/+23
2019-01-15shader_decode: Implement F2FReinUsesLisp1-1/+37
2019-01-15shader_decode: Stub DEPBARReinUsesLisp1-0/+4
2019-01-15shader_decode: Implement SSY and SYNCReinUsesLisp1-0/+19
2019-01-15shader_decode: Implement PSETPReinUsesLisp1-1/+21
2019-01-15shader_decode: Implement TMMLReinUsesLisp1-3/+45
2019-01-15shader_decode: Implement TEX and TXQReinUsesLisp2-0/+223
2019-01-15shader_decode: Implement TEXS (F32)ReinUsesLisp2-0/+217
2019-01-15shader_decode: Implement FSETPReinUsesLisp1-1/+33
2019-01-15shader_decode: Partially implement BRAReinUsesLisp1-0/+12
2019-01-15shader_decode: Implement IPAReinUsesLisp1-0/+12
2019-01-15shader_decode: Implement EXITReinUsesLisp1-1/+32
2019-01-15shader_decode: Implement ST_AReinUsesLisp1-0/+30
2019-01-15shader_decode: Implement LD_AReinUsesLisp1-1/+39
2019-01-15shader_decode: Implement FADD32IReinUsesLisp1-0/+12
2019-01-15shader_decode: Implement FMUL32_IMMReinUsesLisp1-0/+10
2019-01-15shader_decode: Implement MOV32_IMMReinUsesLisp1-1/+9
2019-01-15shader_decode: Stub RRO_C, RRO_R and RRO_IMMReinUsesLisp1-0/+9
2019-01-15shader_decode: Implement FMNMX_C, FMNMX_R and FMNMX_IMMReinUsesLisp1-0/+18
2019-01-15shader_decode: Implement MUFUReinUsesLisp1-0/+29
2019-01-15shader_decode: Implement FADD_C, FADD_R and FADD_IMMReinUsesLisp1-0/+15
2019-01-15shader_decode: Implement FMUL_C, FMUL_R and FMUL_IMMReinUsesLisp1-0/+42
2019-01-15shader_decode: Implement MOV_C and MOV_RReinUsesLisp1-1/+23
2019-01-15video_core: Replace gl_shader_decompilerReinUsesLisp8-4185/+57
2019-01-15glsl_decompiler: ImplementationReinUsesLisp3-0/+1483
2019-01-15shader_ir: Add condition code helperReinUsesLisp2-0/+13
2019-01-15shader_ir: Add predicate combiner helperReinUsesLisp2-0/+15
2019-01-15shader_ir: Add comparison helpersReinUsesLisp2-0/+106
2019-01-15shader_ir: Add half float helpersReinUsesLisp2-0/+44
2019-01-15shader_ir: Add integer helpersReinUsesLisp2-0/+40
2019-01-15shader_ir: Add float helpersReinUsesLisp2-0/+24
2019-01-15shader_ir: Add settersReinUsesLisp2-0/+24
2019-01-15shader_ir: Add local memory gettersReinUsesLisp2-0/+7
2019-01-15shader_ir: Add internal flag gettersReinUsesLisp2-0/+10
2019-01-15shader_ir: Add attribute gettersReinUsesLisp2-0/+26
2019-01-15shader_ir: Add constant buffer gettersReinUsesLisp2-0/+25
2019-01-15shader_ir: Add register getterReinUsesLisp2-0/+9
2019-01-15shader_ir: Add immediate node constructorsReinUsesLisp2-1/+34
2019-01-15shader_ir: Initial implementationReinUsesLisp30-0/+1573
2019-01-15shader_bytecode: Fixup encodingReinUsesLisp1-1/+1
2019-01-15shader_header: Make local memory size getter constantReinUsesLisp1-1/+1
2019-01-09gl_rasterizer: Workaround Intel VAO DSA bugReinUsesLisp3-7/+16
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-08gl_global_cache: Add dummy global cache managerReinUsesLisp5-3/+96
2019-01-07gl_rasterizer: Skip framebuffer configuration if rendertargets have not been changedReinUsesLisp2-1/+31
2019-01-07gl_rasterizer_cache: Use dirty flags for the depth bufferReinUsesLisp4-3/+23
2019-01-07gl_rasterizer_cache: Use dirty flags for color buffersReinUsesLisp4-4/+24
2019-01-07gl_shader_cache: Use dirty flags for shadersReinUsesLisp5-2/+23
2019-01-06gl_stream_buffer: Use DSA for buffer managementReinUsesLisp3-17/+14
2019-01-06gl_rasterizer: Use DSA for vertex array objectsReinUsesLisp6-79/+53
2019-01-06gl_state: Drop uniform buffer state trackingReinUsesLisp3-10/+0
2019-01-05gl_rasterizer_cache: Use GL_STREAM_COPY for PBOsReinUsesLisp1-1/+1
Since the data is doing the path CPU -> GPU -> GPU copy is the most approximate hint. Using GL_STREAM_DRAW generated a performance warning on Nvidia's stack. Changing this hint removed the warning.
2018-12-30gl_rasterizer_cache: Texture view if shader samples array but OGL is notReinUsesLisp3-14/+74
When a shader samples a texture array but that texture in OpenGL is created without layers, use a texture view to increase the texture hierarchy. For example, instead of binding a GL_TEXTURE_2D bind a GL_TEXTURE_2D_ARRAY view.
2018-12-28gpu: Remove PixelFormat G8R8U and G8R8S, as they do not seem to exist.bunnei4-79/+46
- Fixes UI rendering issues in The Legend of Zelda: Breath of the Wild.
2018-12-27Add missing uintBitsToFloat to SetRegisterToHalfFloatRodolfo Bogado1-2/+2
2018-12-26renderer_opengl: Correct forward declaration of FramebufferLayoutLioncash1-1/+1
This is actually a struct, not a class, which can lead to compilation warnings.
2018-12-26Apply CC test to the final value to be stored in the registerRodolfo Bogado1-9/+12
2018-12-26Fixed shader linking error due to TLDS (#1934)David1-1/+1
* Fixed shader linking error due to TLDS coord should be coords * Fix remaining coords
2018-12-26shader_bytecode: Fixup TEXS.F16 encodingReinUsesLisp1-1/+1
2018-12-22Includde saturation in the evaluation of the control codeRodolfo Bogado1-3/+4
2018-12-22Handle RZ cases evaluating the expression instead of the register value.Rodolfo Bogado1-14/+22
2018-12-22complete emulation of ZeroFlagRodolfo Bogado1-100/+97
2018-12-19hopefully fix clang format issueDavid Marcec1-0/+1
2018-12-19Fixed uninitialized memory due to missing returns in canaryDavid Marcec10-3/+29
Functions which are suppose to crash on non canary builds usually don't return anything which lead to uninitialized memory being used.
2018-12-18yuzu, video_core: Screenshot functionalityzhupengfei6-4/+95
Allows capturing screenshot at the current internal resolution (native for software renderer), but a setting is available to capture it in other resolutions. The screenshot is saved to a single PNG in the current layout.
2018-12-18Texture format fixes: Flag RGBA16UI as GL_RGBA_INTEGER format, and interpret R16U as Z16 when depth_compare is enabled.heapo1-1/+11
2018-12-18shader_bytecode: Fixup half float's operator B encodingReinUsesLisp1-1/+1
2018-12-17Implement postfactor multiplication/division for fmul instructionsheapo2-5/+21
2018-12-17Fix arrayed shadow sampler array slice/depth comparison ordering, as well as invalid GLSL LOD selection.heapo1-16/+14
2018-12-11gl_shader_cache: Dehardcode constant in CalculateProgramSize()Lioncash1-2/+2
This constant is related to the size of the instruction.
2018-12-11gl_shader_cache: Resolve truncation compiler warningLioncash1-1/+1
The previous code would cause a warning, as it was truncating size_t (64-bit) to a u32 (32-bit) implicitly.
2018-12-10gl_shader_decompiler: IPA FrontFacing: the right value when is the front face is 0xFFFFFFFF.Marcos Vitali1-1/+1
2018-12-09Implemented a shader unique identifier.Fernando Sahmkow4-0/+57
2018-12-09Add more info into textures' object labelsFernandoS272-2/+57
2018-12-07gl_shader_decompiler: TLDS/TLD4/TLD4S Reworked reflecting the source registers, bugs fixed and modularize.Marcos Vitali1-106/+134
2018-12-05gl_shader_decompiler: Implement TEXS.F16ReinUsesLisp2-13/+51
2018-12-05gl_shader_decompiler: Fixup inverted ifReinUsesLisp1-6/+5
2018-12-05Improve msvc codegen for hot-path array LUTsheapo1-275/+277
In some constexpr functions, msvc is building the LUT at runtime (pushing each element onto the stack) out of an abundance of caution. Moving the arrays into be file-scoped constexpr's avoids this and turns the functions into simple look-ups as intended.
2018-12-04Rewrited TEX/TEXS (TEX Scalar). (#1826)Marcos1-259/+177
* Rewrited TEX/TEXS (TEX Scalar). * Style fixes. * Styles issues.
2018-12-04Removed unused file.Subv1-142/+0
This is a leftover from #1792
2018-12-04GPU: Don't try to route PFIFO methods (0-0x40) to the other engines.Subv1-0/+6
2018-12-01Fix debug buildLioncash1-4/+2
A non-existent parameter was left in some formatting calls (the logging macro for which only does anything meaningful on debug builds)
2018-11-30gl_rasterizer_cache: Update AccurateCopySurface to flush complete source surface.bunnei1-1/+4
- Fixes issues with Breath of the Wild with use_accurate_gpu_emulation setting.
2018-11-29gl_rasterizer: Enable clip distances when set in register and in shaderReinUsesLisp5-13/+37
2018-11-29gl_rasterizer: Implement a framebuffer cacheReinUsesLisp2-40/+82
2018-11-29gl_shader_manager: Update pipeline when programs have changedReinUsesLisp1-4/+17
2018-11-29gl_rasterizer_cache: Remove BlitSurface and replace with more accurate copy.bunnei1-144/+1
- BlitSurface with different texture targets is inherently broken. - When target is the same, we can just use FastCopySurface. - Fixes rendering issues with Breath of the Wild.
2018-11-29gl_shader_decompiler: Remove texture temporal in TLD4ReinUsesLisp1-3/+1
2018-11-29gl_shader_decompiler: Flip negated if else statementReinUsesLisp1-3/+3
2018-11-29gl_shader_decompiler: Use GLSL scope on instructions unrelated to texturesReinUsesLisp1-35/+10
2018-11-29gl_shader_decompiler: Move texture code generation into lambdasReinUsesLisp1-97/+78
2018-11-29gl_shader_decompiler: Clean up texture instructionsReinUsesLisp1-87/+56
2018-11-29gl_shader_decompiler: Scope GLSL variables with a scoped objectReinUsesLisp1-32/+72
2018-11-29gl_rasterizer: Signal UNIMPLEMENTED when rt_separate_frag_data is not zeroReinUsesLisp1-1/+1
2018-11-29gl_rasterizer_cache: Use brackets for two-line single-expresion blocksReinUsesLisp1-1/+2
2018-11-29gl_rasterizer: Remove unused struct declarationsReinUsesLisp1-14/+0
2018-11-29gl_rasterizer: Remove extension booleansReinUsesLisp2-16/+0
2018-11-28dma_pushbuffer: Optimize to avoid loop and copy on Push.bunnei2-5/+17
2018-11-28gpu: Move command list profiling to DmaPusher::DispatchCalls.bunnei2-5/+5
2018-11-27gl_shader_decompiler: Fixup clip distance indexReinUsesLisp1-1/+1
2018-11-27gl_rasterizer: Fixup for #1723.Markus Wick1-1/+1
On invalidating the streaming buffer, we need to reupload all vertex buffers. But we don't need to reconfigure the vertex format. This was a (silly) misstake in #1723. Thanks at Rodrigo for discovering the issue. Fun fact, as configuring the vertex format also invalidate the vertex buffer, this misstake had no affect on the behavior.
2018-11-27gpu: Rewrite GPU command list processing with DmaPusher class.bunnei17-105/+343
- More accurate impl., fixes Undertale (among other games).
2018-11-27remove viewport_transform_enabled as it seems to be inactive when valid transforms are used.Rodolfo Bogado1-12/+5
2018-11-27morton: Fixup compiler warningReinUsesLisp1-1/+2
2018-11-27Implement depth clampRodolfo Bogado5-10/+58
2018-11-27Add support for Clip Distance enabled registerRodolfo Bogado3-3/+26
2018-11-27GPU States: Implement Polygon Offset. This is used in SMO all the time. (#1784)Marcos5-5/+107
* GPU States: Implement Polygon Offset. This is used in SMO all the time. * Clang Format fixes. * Initialize polygon_offset in the constructor.
2018-11-26Implemented Tile Width SpacingFernandoS278-36/+55
2018-11-25Limit the amount of viewports tested for state changes only to the usable onesRodolfo Bogado1-2/+10
2018-11-25gl_shader_decompiler: Implement S2R's Y_DIRECTIONReinUsesLisp5-16/+26
2018-11-25morton: Style changesReinUsesLisp1-12/+12
2018-11-25video_core: Move morton functions to their own fileReinUsesLisp6-345/+391
2018-11-24Fix Texture OverlappingFernandoS271-43/+70
2018-11-24Implemented BRA CC conditional and FSET CC SettingFernandoS271-4/+14
2018-11-24Add support for viewport_transfom_enable registerRodolfo Bogado2-6/+22
2018-11-24Add support for clear_flags registerRodolfo Bogado5-28/+95
2018-11-24Fix TEXS Instruction encodingsFernandoS271-22/+48
2018-11-24Fix one encoding in TEX InstructionFernandoS271-3/+3
2018-11-24Corrected inputs indexing in TEX instructionFernandoS271-66/+85
2018-11-23memory_manager: Do not allow 0 to be a valid GPUVAddr.bunnei2-1/+9
- Fixes a bug with Undertale using 0 for a render target.
2018-11-23Added predicate comparison LessEqualWithNan (#1736)Hexagon122-5/+13
* Added predicate comparison LessEqualWithNan * oops * Clang fix
2018-11-23gl_shader_decompiler: Implement clip distancesReinUsesLisp3-21/+58
2018-11-22gl_shader_decompiler: Add a message for unimplemented cc generationReinUsesLisp1-23/+46
2018-11-22macro_interpreter: Implement AddWithCarry and SubtractWithBorrow.bunnei2-8/+25
- Used by Undertale.
2018-11-22maxwell_3d: Implement alternate blend equations.bunnei2-0/+12
- Used by Undertale.
2018-11-22gl_shader_decompiler: Rename internal flag stringsReinUsesLisp1-15/+20
2018-11-22gl_shader_decompiler: Rename control codes to condition codesReinUsesLisp2-67/+50
2018-11-22gl_shader_decompiler: Fix register overwriting on texture callsReinUsesLisp1-60/+78
2018-11-21Properly Implemented TXQ InstructionFernandoS271-2/+12
2018-11-21gl_shader_decompiler: Implement BFI_IMM_RReinUsesLisp2-0/+23
2018-11-21Removed pre 4.3 ARB extensionsFernandoS275-20/+13
2018-11-21Use default values for unknown framebuffer pixel formatFernandoS272-0/+8
2018-11-21gl_shader_decompiler: Implement R2P_IMMReinUsesLisp2-0/+42
2018-11-21gl_shader_decompiler: Remove UNREACHABLE when setting RZReinUsesLisp1-2/+1
2018-11-21gl_shader_decompiler: Use UNIMPLEMENTED instead of LOG+UNREACHABLE when applicableReinUsesLisp1-371/+258
2018-11-21maxwell_3d: Initialize rasterizer color mask registers as enabled.bunnei1-0/+9
- Fixes rendering regression with Sonic Mania.
2018-11-20shader_cache: Only lock covered instructions.Markus Wick4-8/+24
2018-11-20Implemented Fast Layered CopyFernandoS272-2/+30
2018-11-19Eliminated unnessessary memory allocation and copy (#1702)Frederic L3-9/+20
2018-11-19gl_rasterizer: Remove default clip distanceReinUsesLisp1-2/+0
2018-11-18drop support for non separate alpha as it seems to cause issues in some gamesRodolfo Bogado3-61/+35
2018-11-17fix sampler configuration, thanks to Marcos for his investigationRodolfo Bogado3-19/+57
2018-11-17small type fixRodolfo Bogado1-6/+6
2018-11-17small fix for alphaToOne bit locationRodolfo Bogado1-2/+2
2018-11-17fix for gcc compilationRodolfo Bogado1-60/+61
2018-11-17add AlphaToCoverage and AlphaToOneRodolfo Bogado5-1/+39
2018-11-17add support for fragment_color_clampRodolfo Bogado5-1/+24
2018-11-17add missing MirrorOnceBorder support where supportedRodolfo Bogado1-0/+6
2018-11-17set border color not depending on the wrap modeRodolfo Bogado1-9/+9
only enable color mask for the first framebuffer id independent blending is disabled
2018-11-17set default value for point size registerRodolfo Bogado2-5/+4
2018-11-17fix viewport and scissor behaviorRodolfo Bogado6-64/+89
2018-11-17gl_rasterizer: Skip VB upload if the state is clean.Markus Wick9-6/+60
2018-11-17textures/decoders: Replace magic numbersFrederic Laing1-37/+33
2018-11-15textures/decoders: Minor cleanupFrederic Laing1-16/+16
2018-11-15gl_rasterizer_chache: Minor cleanupFrederic Laing1-3/+3
2018-11-13video_core/renderer_base: Remove GL include from the renderer base class filesLioncash1-1/+0
Keeps the base class source files implementation-agnostic.
2018-11-13gl_rasterizer: Minor cleanupFrederic L1-4/+2
Minor code cleanup from unaddressed feedback in #1654
2018-11-13gl_state: Amend compilation warningsLioncash2-3/+4
Makes float -> integral conversions explicit via casts and also silences a sign conversion warning.
2018-11-13Implement ASTC_2D_10X8 & ASTC_2D_10X8_SRGB (#1666)greggameplayer4-71/+101
* Implement ASTC_2D_10X8 & ASTC_2D_10X8_SRGB ( needed by Mario+Rabbids Kingdom Battle ) * Small placement correction
2018-11-11Use core extensions when available to set max anisotropic filtering levelRodolfo Bogado1-2/+7
2018-11-11Improve state management by splitting some of the states id separated function to avoid a full apply overheadRodolfo Bogado6-39/+40
2018-11-11Try to fix problems with stencil test in some games, relax translation to opengl enums to avoid crashing and only generate logs of the errors.Rodolfo Bogado4-37/+61
2018-11-11set sampler max lod, min lod, lod bias and max anisotropyRodolfo Bogado3-13/+33
2018-11-11Improved GPU Caches lookup SpeedFernandoS271-18/+17
2018-11-10gl_shader_decompiler: Guard out of bound geometry shader input readsReinUsesLisp4-15/+24
Geometry shaders follow a pattern that results in out of bound reads. This pattern is: - VSETP to predicate - Use that predicate to conditionally set a register a big number - Use the register to access geometry shaders At the time of writing this commit I don't know what's the intent of this number. Some drivers argue about these out of bound reads. To avoid this issue, input reads are guarded limiting reads to the highest posible vertex input of the current topology (e.g. points to 1 and triangles to 3).
2018-11-08gl_rasterizer_cache: Remove unnecessary memory allocation and copy in CopySurfaceFrederic Laing1-10/+7
2018-11-08gl_rasterizer: Fix compiler warningsFrederic Laing1-2/+2
2018-11-08rasterizer_cache: Remove reliance on the System singletonLioncash9-10/+25
Rather than have a transparent dependency, we can make it explicit in the interface. This also gets rid of the need to put the core include in a header.
2018-11-08rasterizer_cache: Add missing virtual destructor to RasterizerCacheObjectLioncash3-0/+10
Ensures that destruction will always do the right thing in any context.
2018-11-08gl_resource_manager: Amend clang-format discrepanciesLioncash1-4/+2
Fixes the buildbot.
2018-11-08Correct issue where texturelod could not be applied to 2darrayshadowFernandoS271-1/+5
2018-11-07Implement 3 coordinate array in TEXS instructionFernandoS271-6/+6
2018-11-06gl_rasterizer: Skip VAO binding if the state is clean.Markus Wick3-2/+21
2018-11-06gl_rasterizer: Split VAO and VB setup functions.Markus Wick2-5/+16
2018-11-06gl_rasterizer_cache: Add profiles for Copy and Blit.Markus Wick1-2/+6
They were missed, and Copy is very high in profile here. It doesn't block the GPU, but it stalls the driver thread. So with our bad GL instructions, this might block quite a while.
2018-11-06gl_resource_manager: Profile creation and deletion.Markus Wick1-0/+42
2018-11-06gl_stream_buffer: Profile orphaning of stream buffer.Markus Wick1-0/+5
This serialize to the driver thread and so it may block for a while. So if it is in the benchmark, we get noticed if it happens too often.
2018-11-06gl_resource_manager: Split implementations in .cpp file.Markus Wick5-114/+167
Those implementations are quite costly, so there is no need to inline them to the caller. Ressource deletion is often a performance bug, so in this way, we support to add breakpoints to them.
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 Bogado5-25/+79
2018-11-05Implement multi-target viewports and blendingRodolfo Bogado6-128/+259
2018-11-02correct syntaxgreggameplayer1-4/+3
2018-11-02Fix ASTC Decompressor to support depth parameterFernandoS276-62/+128
2018-11-01memory_manager: Do not MapBufferEx over already in use memory.bunnei2-31/+52
- This fixes rendering when changing areas in Super Mario Odyssey.
2018-11-01Fix ASTC formatsFernandoS273-11/+20
2018-11-01Implemented ASTC 5x5FernandoS271-1/+5
2018-11-01Implement Cube ArraysFernandoS274-0/+20
2018-11-01maxwell_3d: Restructure macro upload to use a single macro code memory.bunnei4-27/+55
- Fixes an issue where macros could be skipped. - Fixes rendering of distant objects in Super Mario Odyssey.
2018-10-31Implement SurfaceTarget Texture2DArraygreggameplayer1-0/+1
( needed by Mario+Rabbids Kingdom Battle )
2018-10-31Improve OpenGL state handlingRodolfo Bogado3-105/+158
2018-10-30video_core: Move surface declarations out of gl_rasterizer_cacheReinUsesLisp6-898/+954
2018-10-30Assert Control Codes GenerationFernandoS272-1/+103
2018-10-30global: Use std::optional instead of boost::optional (#1578)Frederic L17-97/+107
* get rid of boost::optional * Remove optional references * Use std::reference_wrapper for optional references * Fix clang format * Fix clang format part 2 * Adressed feedback * Fix clang format and MacOS build
2018-10-29video_core: Move OpenGL specific utils to its rendererReinUsesLisp6-30/+61
2018-10-29renderer_opengl: Correct bpp value for ASTC_2D_8X5_SRGBRodolfo Bogado1-1/+1
2018-10-29Assert Control Flow Instructions using Control CodesFernandoS272-3/+28
2018-10-29Fixed black textures, pixelation and we no longer require to auto-generate mipmapsFernandoS271-14/+2
2018-10-29Fixed mipmap block autosizing algorithmFernandoS273-13/+25
2018-10-29Fixed Invalid Image size and Mipmap calculationFernandoS271-4/+7
2018-10-29Fixed Block Resizing algorithm and Clang FormatFernandoS273-12/+19
2018-10-29Implement Mip FilterFernandoS274-10/+33
2018-10-29Zero out memory region of recreated surface before flushingFernandoS271-0/+2
2018-10-28Implement MipmapsFernandoS272-101/+211
2018-10-28Enable alpha channel for DXT1 texture formatMichael1-2/+2
2018-10-28Correct bpp value for ASTC_2D_8X5Tobias1-1/+1
2018-10-28Refactor precise usage and add FMNMX, MUFU, FMUL32 and FADD332FernandoS272-74/+37
2018-10-28Implement sRGB Support, including workarounds for nvidia driver issues and QT sRGB supportRodolfo Bogado8-40/+197
2018-10-28Improved Shader accuracy on Vertex and Geometry Shaders with FFMA, FMUL and FADDFernandoS272-6/+58
2018-10-27Implement Default Block Height for each formatFernandoS271-0/+62
2018-10-27gl_rasterizer_cache: Fix compiler warningFrederic Laing1-2/+2
2018-10-26gl_rasterizer: Implement primitive restart.bunnei5-1/+40
2018-10-26maxwell_3d: Add code for initializing register defaults.bunnei2-1/+21
2018-10-26gl_rasterizer: Implement depth range.bunnei4-13/+20
2018-10-24Implemented LD_L and ST_LFernandoS273-12/+112
2018-10-24Implement Shader Local MemoryFernandoS271-0/+37
2018-10-24decoders: Remove unused variable within SwizzledData()Lioncash1-1/+0
2018-10-24maxwell_3d: Remove unused variable within ProcessQueryGet()Lioncash1-1/+0
2018-10-23Implement PointSizeFernandoS273-5/+28
2018-10-23Fixed Layered Textures Loading and CubemapsFernandoS273-72/+109
2018-10-23gl_shader_decompiler: Implement VSETPReinUsesLisp2-0/+26
2018-10-23gl_shader_decompiler: Abstract VMAD into a video subsetReinUsesLisp2-75/+82
2018-10-23Added Saturation to FMUL32IFernandoS272-3/+8
2018-10-22Assert that multiple render targets are not set while alpha testingFernandoS273-3/+17
2018-10-22Use standard UBO and fix/stylize the codeFernandoS278-91/+51
2018-10-22Cache uniform locations and restructure the implementationFernandoS273-33/+29
2018-10-22Remove SyncAlphaTest and clang formatFernandoS274-8/+9
2018-10-22Added Alpha FuncFernandoS272-3/+43
2018-10-22Implemented Alpha TestingFernandoS276-3/+59
2018-10-22Fixed FSETP and FSETFernandoS272-30/+12
2018-10-22Fixed VAOs Float types only returning GL_FLOAT in cases that they had to return GL_HALF_FLOATFernandoS271-2/+14
2018-10-20engines/maxwell_*: Use nested namespace specifiers where applicableLioncash3-12/+6
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.
2018-10-20maxwell_dma: Make variables const where applicable within HandleCopy()Lioncash1-3/+3
These are never modified, so we can make that assumption explicit.
2018-10-20maxwell_dma: Make FlushAndInvalidate's size parameter a u64Lioncash1-1/+1
This prevents truncation warnings at the lambda's usage sites.
2018-10-20maxwell_dma: Remove unused variables in HandleCopy()Lioncash1-3/+0
These pointer variables are never used, so we can get rid of them.
2018-10-20gl_shader_decompiler: Allow std::move to function in SetPredicateLioncash1-1/+1
If the variable being moved is const, then std::move will always perform a copy (since it can't actually move the data).
2018-10-20gl_shader_decompiler: Get rid of variable shadowing warningsLioncash1-2/+2
A variable with the same name was previously declared in an outer scope.
2018-10-20gl_shader_decompiler: Fix a few comment typosLioncash1-3/+4
2018-10-20gl_shader_decompiler: Move position varying declaration back to gl_shader_genReinUsesLisp3-13/+9
The intention of declaring them in gl_shader_decompiler was to be able to use blocks to implement geometry shaders. But that wasn't needed in the end and it caused issues when both vertex stages were being used, resulting in a redeclaration of "position".
2018-10-19GPU: Improved implementation of maxwell DMA (Subv).bunnei3-17/+66
2018-10-19decoders: Introduce functions for un/swizzling subrects.bunnei2-0/+49
2018-10-19GPU: Invalidate destination address of kepler_memory writes.bunnei3-3/+17
2018-10-19fermi_2d: Add support for more accurate surface copies.bunnei2-3/+12
2018-10-18gl_shader_decompiler: Implement PBK and BRKReinUsesLisp2-22/+43
2018-10-18Clang format and other fixesFernandoS271-16/+0
2018-10-18Implement Reinterpret Surface, to accurately blit 3D texturesFernandoS271-2/+4
2018-10-18Implement GetInRange in the Rasterizer CacheFernandoS271-0/+16
2018-10-18Implement 3D TexturesFernandoS274-1/+10
2018-10-18gl_rasterizer_cache: Remove unnecessary block_depth=1 on Flush.bunnei1-1/+0
2018-10-18gl_rasterizer_cache: Remove unnecessary temporary buffer with unswizzle.bunnei1-5/+2
2018-10-16gl_rasterizer_cache: Use AccurateCopySurface for use_accurate_gpu_emulation.bunnei2-2/+18
2018-10-16config: Rename use_accurate_framebuffers -> use_accurate_gpu_emulation.bunnei3-6/+6
- This will be used as a catch-all for slow-but-accurate GPU emulation paths.
2018-10-16rasterizer_cache: Refactor to support in-order flushing.bunnei6-63/+116
2018-10-16gl_rasterizer_cache: Refactor to only call GetRegionEnd on surface creation.bunnei2-16/+23
2018-10-16gl_rasterizer_cache: Only flush when use_accurate_framebuffers is enabled.bunnei2-2/+13
2018-10-16gl_rasterizer_cache: Separate guest and host surface size managment.bunnei2-92/+94
2018-10-16gl_rasterizer_cache: Rename GetGLBytesPerPixel to GetBytesPerPixel.bunnei2-17/+18
- This does not really have anything to do with OpenGL.
2018-10-16gl_rasterizer_cache: Remove unused FlushSurface method.bunnei2-7/+0
2018-10-16gl_rasterizer: Implement flushing.bunnei1-1/+25
2018-10-16gl_rasterizer_cache: Remove usage of Memory::Read/Write functions.bunnei1-13/+8
- These cannot be used within the cache, as they change cache state.
2018-10-16gl_rasterizer_cache: Clamp cached surface size to mapped GPU region size.bunnei2-19/+37
2018-10-16memory_manager: Add a method for querying the end of a mapped GPU region.bunnei2-0/+11
2018-10-16rasterizer_cache: Reintroduce method for flushing.bunnei3-0/+23
2018-10-16gl_rasterizer_cache: Reintroduce code for handling swizzle and flush to guest RAM.bunnei2-28/+119
2018-10-15shader_bytecode: Add Control Code enum 0xfReinUsesLisp1-1/+1
Control Code 0xf means to unconditionally execute the instruction. This value is passed to most BRA, EXIT and SYNC instructions (among others) but this may not always be the case.
2018-10-15gl_shader_decompiler: Fixup style inconsistenciesReinUsesLisp1-5/+3
2018-10-15gl_rasterizer: Silence implicit cast warning in glBindBufferRangeReinUsesLisp1-1/+2
2018-10-15gl_shader_decompiler: Implement HSET2_RReinUsesLisp2-0/+62
2018-10-15gl_shader_decompiler: Implement HSETP2_RReinUsesLisp2-0/+65
2018-10-15gl_shader_decompiler: Implement HFMA2 instructionsReinUsesLisp2-0/+85
2018-10-15gl_shader_decompiler: Implement HADD2_IMM and HMUL2_IMMReinUsesLisp2-0/+73
2018-10-15gl_shader_decompiler: Implement non-immediate HADD2 and HMUL2 instructionsReinUsesLisp2-0/+75
2018-10-15gl_shader_decompiler: Setup base for half float unpacking and settingReinUsesLisp2-0/+98
2018-10-14Implement Arrays on Tex InstructionFernandoS271-14/+55
2018-10-14Fix TLDSFernandoS271-1/+5
2018-10-14Shorten the implementation of 3D swizzle to only 3 functionsFernandoS271-70/+27
2018-10-13Fix a Crash on Zelda BotW and Splatoon 2, and simplified LoadGLBufferFernandoS272-19/+2
2018-10-13Propagate depth and depth_block on modules using decodersFernandoS277-52/+64
2018-10-13Remove old Swizzle algorithms and use 3d SwizzleFernandoS271-93/+69
2018-10-13Implement Precise 3D SwizzleFernandoS271-3/+71
2018-10-13Implement Fast 3D SwizzleFernandoS271-2/+74
2018-10-13Added ASTC 5x4; 8x5Hexagon123-6/+32
2018-10-12Implemented helper function to correctly calculate a texture's sizeFernandoS272-0/+22
2018-10-11gl_shader_decompiler: Implement VMADReinUsesLisp2-0/+118
2018-10-10Add memory Layout to Render Targets and Depth BuffersFernandoS273-21/+33
2018-10-10Fixed block height settings for RenderTargets and Depth Buffers, and added block width and block depthFernandoS275-12/+63
2018-10-09gl_shader_decompiler: Remove unused variables in TMML's implementationLioncash1-7/+3
Given "y" isn't always used, but "x" is, we can rearrange this to avoid unused variable warnings by changing the names of op_a and op_b
2018-10-09Implement Scissor TestFernandoS271-4/+9
2018-10-09Assert Scissor testsFernandoS273-1/+31
2018-10-07gl_shader_decompiler: Move position varying location from 15 to 0 and apply an offsetReinUsesLisp1-6/+10
2018-10-07gl_shader_decompiler: Implement geometry shadersReinUsesLisp10-107/+522
2018-10-07video_core: Allow LabelGLObject to use extra info on any objectReinUsesLisp1-10/+14
2018-10-07gl_rasterizer: Fixup undefined behaviour in SetupDrawReinUsesLisp1-0/+1
2018-10-06Implemented Depth Compare and Shadow SamplersFernandoS276-65/+224
2018-10-06fermi_2d: Implement simple copies with AccelerateSurfaceCopy.bunnei3-24/+36
2018-10-06gl_rasterizer: Add rasterizer cache code to handle accerated fermi copies.bunnei5-16/+60
2018-10-06gl_rasterizer_cache: Implement a simpler surface copy using glCopyImageSubData.bunnei1-0/+21
2018-10-04gl_rasterizer: Implement quads topologyReinUsesLisp8-46/+236
2018-10-03Implemented Texture Processing Modes in TEXS and TLDSFernandoS271-5/+42
2018-10-01gl_rasterizer: Fixup unassigned point sizesReinUsesLisp1-1/+4
2018-09-30gl_rasterizer_cache: Fixes to how we do render to cubemap.bunnei2-32/+5
- Fixes issues with Splatoon 2.
2018-09-30gl_rasterizer_cache: Add check for array rendering to cubemap texture.bunnei1-0/+8
2018-09-30gl_rasterizer_cache: Implement render to cubemap.bunnei3-119/+218
2018-09-30gl_shader_decompiler: TEXS: Implement TextureType::TextureCube.bunnei1-0/+8
2018-09-30gl_rasterizer_cache: Add support for SurfaceTarget::TextureCubemap.bunnei2-1/+36
2018-09-30gl_rasterizer_cache: Implement LoadGLBuffer for Texture2DArray.bunnei1-0/+8
2018-09-30gl_rasterizer_cache: Update BlitTextures to support non-Texture2D ColorTexture surfaces.bunnei1-23/+88
2018-09-30gl_rasterizer_cache: Track texture target and depth in the cache.bunnei1-2/+3
2018-09-30gl_rasterizer_cache: Workaround for Texture2D -> Texture2DArray scenario.bunnei3-6/+21
2018-09-30gl_rasterizer_cache: Keep track of surface 2D size separately from total size.bunnei2-32/+46
2018-09-30Fix trailing whitespaceraven021-1/+4
2018-09-28video_core: Implement point_size and add point state syncReinUsesLisp5-1/+27
2018-09-28gl_state: Pack sampler bindings into a single ARB_multi_bindReinUsesLisp5-8/+25
2018-09-26video_core: Add asserts for CS, TFB and alpha testingReinUsesLisp5-3/+92
Add asserts for compute shader dispatching, transform feedback being enabled and alpha testing. These have in common that they'll probably break rendering without logging.
2018-09-23Added glObjectLabels for renderdoc for textures and shader programs (#1384)David4-0/+48
* Added glObjectLabels for renderdoc for textures and shader programs * Changed hardcoded "Texture" name to reflect the texture type instead * Removed string initialize
2018-09-23correct BC6Hgreggameplayer1-2/+2
2018-09-22gl_state: Remove unused type aliasLioncash2-4/+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-21shader_bytecode: Lay out the Ipa-related enums betterLioncash1-2/+12
This is more consistent with the surrounding enums.
2018-09-21shader_bytecode: Make operator== and operator!= of IpaMode const qualifiedLioncash1-6/+7
These don't affect the state of the struct and can be const member functions.
2018-09-21Reverse stride align restriction on FastSwizzle due to lost performanceFernandoS271-3/+2
2018-09-21Join both Swizzle methods within one interface functionFernandoS271-11/+19
2018-09-21Standarized Legacy Swizzle to look alike FastSwizzle and use a Swizzling Table insteadFernandoS271-42/+38
2018-09-21Remove same output bpp restriction on FastSwizzleFernandoS271-4/+5
2018-09-21Improved Legacy Swizzler to be better documented and work betterFernandoS271-15/+21
2018-09-21gl_stream_buffer: Fix use of bitwise OR instead of logical OR in Map()Lioncash1-1/+1
This was very likely intended to be a logical OR based off the conditioning and testing of inversion in one case. Even if this was intentional, this is the kind of non-obvious thing one should be clarifying with a comment.
2018-09-21RasterizerGL: Use the correct framebuffer when clearing via the CLEAR_BUFFERS register.Subv1-1/+1
Previously we were clearing the default backbuffer framebuffer. Found thanks to a Piglit test :)
2018-09-21Improved fast swizzle and removed restrictions to itFernandoS271-7/+12
2018-09-19gl_rasterizer: Fix StartAddress handling with indexed draw calls.Markus Wick1-6/+7
We uploaded the wrong data before. So the offset on the host GPU pointer may work for the first vertices, the last ones run out bounds. Let's just offset the upload instead.
2018-09-18Implemented Internal FlagsFernandoS271-13/+35
2018-09-18gl_shader_decompiler: Avoid truncation warnings within LD_A and ST_A codeLioncash1-4/+4
These are internally stored as u64 values, so using u32 here causes truncation warnings. Instead, we can just use u64 and preserve the bit width.
2018-09-17Implemented I2I.CC on the NEU control code, used by SMOFernandoS272-14/+18
2018-09-17Implemented CSETPFernandoS272-14/+49
2018-09-17Implemented Control CodesFernandoS272-0/+51
2018-09-17Added asserts for texture misc modes to texture instructionsFernandoS271-2/+45
2018-09-17Added texture misc modes to texture instructionsFernandoS271-1/+147
2018-09-17Add 1D sampler for TLDS - TexelFetch (Mario Rabbids)raven021-7/+12
2018-09-16Implement ASTC_2D_8X8 (Bayonetta 2)raven023-6/+20
2018-09-15Implement RenderTargetFormat::BGR5A1_UNORM (Pokken Tournament DX)raven022-0/+4
2018-09-15Shaders: Implemented multiple-word loads and stores to and from attribute memory.Subv2-7/+58
This seems to be an optimization performed by nouveau.
2018-09-15Port #4182 from Citra: "Prefix all size_t with std::"fearlessTobi20-133/+138
2018-09-14Optimized Texture SwizzlingFernandoS271-2/+49
2018-09-14gl_shader_decompiler: Get rid of variable shadowing within LEA instructionsLioncash1-2/+0
These variables are already defined within an outer scope.
2018-09-13Use ARB_multi_bind for uniform buffers (#1287)ReinUsesLisp2-3/+23
* gl_rasterizer: use ARB_multi_bind for uniform buffers * address feedback
2018-09-13gl_rasterizer_cache: B5G6R5U should use GL_RGB8 as an internal format.bunnei1-1/+1
- Fixes a regression with Sonic Mania with ARB_texture_storage.
2018-09-12GPU: Basic implementation of the Kepler Inline Memory engine (p2mf).Subv6-0/+146
This engine writes data from a FIFO register into the configured address.
2018-09-12Implemented Texture Processing ModesFernandoS272-1/+43
2018-09-12gl_rasterizer_cache: Always blit on recreate, regardless of format.bunnei1-6/+10
- Fixes several rendering issues with Super Mario Odyssey.
2018-09-12gl_shader_cache: Remove cache_width/cache_height.bunnei2-12/+2
- This was once an optimization, but we no longer need it with the cache reserve. - This is also inaccurate.
2018-09-11gl_rasterizer: Use ARB_texture_storage.Markus Wick1-11/+8
It allows us to use texture views and it reduces the overhead within the GPU driver. But it disallows us to reallocate the texture, but we don't do so anyways. In the end, it is the new way to allocate textures, so there is no need to use the old way.
2018-09-11Implemented LEA and PSETFernandoS271-0/+91
2018-09-11Implemented encodings for LEA and PSETFernandoS271-0/+64
2018-09-11Replace old FragmentHeader for the new HeaderFernandoS272-31/+18
2018-09-11Implemented (Partialy) Shader HeaderFernandoS273-2/+102
2018-09-11Fixed renderdoc input/output textures not working due to render targetsDavid Marcec2-2/+9
2018-09-10video_core: Refactor command_processor.Markus Wick2-44/+42
Inline the WriteReg helper as it is called ~20k times per frame.
2018-09-10video_core: Move command buffer loop.Markus Wick3-46/+72
This moves the hot loop into video_core. This refactoring shall reduce the CPU overhead of calling ProcessCommandList.
2018-09-10rasterizer: Drop unused handler.Markus Wick4-8/+0
This virtual function is called in a very hot spot, and it does nothing. If this kind of feature is required, please be more specific and add callbacks in the switch statement within Maxwell3D::WriteReg. There is no point in having another switch statement within the rasterizer.
2018-09-10gl_rasterizer_cache: Only use depth for applicable texture formats.bunnei1-6/+22
- Fixes an issue with Octopath Traveler leaving stale data here.
2018-09-10gl_rasterizer: Implement clear for non-zero render targets.bunnei2-50/+66
- Several misc. changes to ConfigureFramebuffers in support of this.
2018-09-10gl_rasterizer_cache: Implement RenderTargetFormat::BGRA8_SRGB.bunnei3-0/+4
- Used by Octopath Traveler (with multiple render targets).
2018-09-10gl_rasterizer: Implement multiple color attachments.bunnei5-132/+95
2018-09-10Implemented TMMLFernandoS272-5/+67
2018-09-09Implemented TXQ dimension query type, used by SMO.FernandoS272-1/+36
2018-09-09video_core: fixed arithmetic overflow warnings & improved code stylePatrick Elsässer5-89/+101
- Fixed all warnings, for renderer_opengl items, which were indicating a possible incorrect behavior from integral promotion rules and types larger than those in which arithmetic is typically performed. - Added const for variables where possible and meaningful. - Added constexpr where possible.
2018-09-09Port Citra #4047 & #4052: add change background color supporttech4me3-0/+8
2018-09-09Change name of TEXQ to TXQ, in order to match NVIDIA's namingFernandoS271-2/+2
2018-09-08GPU/DMA: Partially implemented the 'enable_2d' bit in the DMA engine.Subv1-2/+10
When not set, this tells the GPU to only use the X size when performing a DMA copy. This is only implemented for linear->linear and tiled->tiled copies. Conversion copies still retain the assert. This bit is unset by some games for various purposes, and by nouveau when copying the vertex buffers.
2018-09-08gl_rasterizer: Use baseInstance instead of moving the buffer points.bunnei1-21/+25
This hopefully helps our cache not to redundant upload the vertex buffer. # Conflicts: # src/video_core/renderer_opengl/gl_rasterizer.cpp
2018-09-08video_core: Arithmetic overflow warning fix for gl_rasterizer (#1262)Patrick Elsässer1-12/+14
* video_core: Arithmetic overflow fix for gl_rasterizer - Fixed warnings, which were indicating incorrect behavior from integral promotion rules and types larger than those in which arithmetic is typically performed. - Added const for variables where possible and meaningful. * Changed the casts from C to C++ style Changed the C-style casts to C++ casts as proposed. Took also care about signed / unsigned behaviour.
2018-09-08gl_rasterizer_cache: Improve accuracy of RecreateSurface for non-2D textures.bunnei2-27/+45
2018-09-08maxwell_3d: Remove assert that no longer applies.bunnei1-4/+0
2018-09-08gl_rasterizer_cache: Partially implement several non-2D texture types.bunnei1-30/+111
2018-09-08gl_shader_decompiler: Partially implement several non-2D texture types (Subv).bunnei2-32/+143
2018-09-08gl_rasterizer: Implement texture wrap mode p.bunnei2-2/+8
2018-09-08gl_rasterizer_cache: Track texture depth.bunnei3-4/+15
2018-09-08gl_rasterizer_cache: Remove impl. of FlushGLBuffer.bunnei1-34/+1
- Will not work for non-2d textures, and was not used anyways.
2018-09-08gl_rasterizer_cache: Keep track of texture type per surface.bunnei3-32/+84
2018-09-08gl_rasterizer_cache: Remove unused DownloadGLTexture.bunnei2-51/+0
2018-09-08gl_state: Keep track of texture target.bunnei5-26/+28
2018-09-06gl_rasterizer: Call state.Apply only once on SetupShaders.bunnei1-4/+2
2018-09-06gl_shader_decompiler: Implement saturate mode for IPA.bunnei1-1/+5
2018-09-06gl_buffer_cache: Default initialize member variablesLioncash1-3/+3
Ensures that the cache always has a deterministic initial state.
2018-09-06gl_buffer_cache: Make GetHandle() a const member functionLioncash2-2/+2
GetHandle() internally calls GetHandle() on the stream_buffer instance, which is a const member function, so this can be made const as well.
2018-09-06gl_buffer_cache: Remove unnecessary includesLioncash2-2/+4
2018-09-06gl_buffer_cache: Make constructor explicitLioncash1-1/+1
Implicit conversions during construction isn't desirable here.
2018-09-06video_core/CMakeLists: Add missing gl_buffer_cache.hLioncash1-0/+1
Without this, the header file won't show up by default within IDEs such as Visual Studio.
2018-09-06gl_shader_gen: Initialize position.Markus Wick1-0/+1
IMO the old code is fine, but nvidia raises shader compiler warnings. Trivial fix through...
2018-09-06Implemented IPA ProperlyFernandoS272-47/+98
2018-09-05gl_rasterizer: Skip TODO log.Markus Wick1-1/+1
This is called ~3k times per frame in SMO ingame. My laptop spends ~3ms per frame on allocating and freeing this string. Let's just stop printing this kind of redundant information.
2018-09-05gl_rasterizer: Implement a VAO cache.Markus Wick3-53/+60
This patch caches VAO objects instead of re-emiting all pointers per draw call. Configuring this pointers is known as a fast task, but it yields too many GL calls. So for better performance, just bind the VAO instead of 16 pointers.
2018-09-05renderer_opengl: Implement a buffer cache.Markus Wick5-86/+182
The idea of this cache is to avoid redundant uploads. So we are going to cache the uploaded buffers within the stream_buffer and just reuse the old pointers. The next step is to implement a VBO cache on GPU memory, but for now, I want to check the overhead of the cache management. Fetching the buffer over PCI-E should be quite fast.
2018-09-04gl_shader_cache: Use an u32 for the binding point cache.Markus Wick4-15/+23
The std::string generation with its malloc and free requirement was a noticeable overhead. Also switch to an ordered_map to avoid the std::hash call. As those maps usually have a size of two elements, the lookup time shall not matter.
2018-09-04command_processor: Use std::array for bound_engines.Markus Wick2-4/+4
subchannel is a 3 bit field. So there must not be more than 8 bound engines. And using a hashmap for up to 8 values is a bit overpowered.
2018-09-04Update microprofile scopes.Markus Wick1-3/+11
Blame the subsystems which deserve the blame :) The updated list is not complete, just the ones I've spotted on random sampling the stack trace.
2018-09-02gl_shader_decompiler: Use used_shaders member variable directly within GenerateDeclarations()Lioncash1-1/+1
Using the getter function intended for external code here makes an unnecessary copy of the already-accessible used_shaders vector.
2018-09-01Removed saturate assertDavid Marcec2-2/+0
Unneeded as we already implement it
2018-09-01Removed saturate assertDavid Marcec2-2/+0
Saturate already implemented
2018-09-01Changed tab5980_0 default from 0 -> 1David Marcec1-2/+2
2018-09-01Added FMUL assertsDavid Marcec2-0/+15
2018-09-01Added FFMA assertsDavid Marcec2-0/+11
2018-09-01Added assert for TEXS nodepDavid Marcec2-0/+3
2018-09-01Added better asserts to IPA, Renamed IPA modes to match mesaDavid Marcec2-6/+13
IpaMode is changed to IpaInterpMode IpaMode is suppose to be 2 bits not 3 Added IpaSampleMode Added Saturate Renamed modes based on https://github.com/mesa3d/mesa/blob/d27c7918916cdc8092959124955f887592e37d72/src/gallium/drivers/nouveau/codegen/nv50_ir_emit_gm107.cpp#L2530
2018-09-01maxwell_3d: Use CoreTiming for query timestampZach Hilman1-2/+3
2018-08-31core/core: Replace includes with forward declarations where applicableLioncash3-4/+4
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.
2018-08-31gl_rasterizer_cache: Use accurate framebuffer setting for accurate copies.bunnei2-73/+54
2018-08-31gl_rasterizer_cache: Also use reserve cache for RecreateSurface.bunnei2-24/+18
2018-08-31rasterizer_cache: Use boost::interval_map for a more accurate cache.bunnei1-33/+45
2018-08-31gl_renderer: Cache textures, framebuffers, and shaders based on CPU address.bunnei8-100/+53
2018-08-31gl_rasterizer: Fix issues with the rasterizer cache.bunnei4-46/+57
- Use a single cached page map. - Fix calculation of ending page.
2018-08-31Implement BC6H_UF16 & BC6H_SF16 (#1092)greggameplayer3-31/+55
* Implement BC6H_UF16 & BC6H_SF16 Require by ARMS * correct coding style * correct coding style part 2
2018-08-31core: Make the main System class use the PImpl idiomLioncash1-3/+4
core.h is kind of a massive header in terms what it includes within itself. It includes VFS utilities, kernel headers, file_sys header, ARM-related headers, etc. This means that changing anything in the headers included by core.h essentially requires you to rebuild almost all of core. Instead, we can modify the System class to use the PImpl idiom, which allows us to move all of those headers to the cpp file and forward declare the bulk of the types that would otherwise be included, reducing compile times. This change specifically only performs the PImpl portion.
2018-08-31Report correct shader size.Markus Wick1-1/+1
Seems like this was an oversee in regards to 1fd979f50a9f4c21fa8cafba7268d959e3076924 It changed GLShader::ProgramCode to a std::vector, so sizeof is wrong.
2018-08-31Added predicate comparison GreaterEqualWithNanHexagon122-3/+4
2018-08-31gl_shader_decompiler: Implement POPC (#1203)Laku2-0/+19
* Implement POPC * implement invert
2018-08-29Shaders: Implemented IADD3tech4me2-1/+84
2018-08-29gl_shader_decompiler: Improve IPA for Pass mode with Position attribute.bunnei2-1/+39
2018-08-28gl_shader_cache: Remove unused program_code vector in GetShaderAddress()Lioncash1-2/+1
Given std::vector is a type with a non-trivial destructor, this variable cannot be optimized away by the compiler, even if unused. Because of that, something that was intended to be fairly lightweight, was actually allocating 32KB and deallocating it at the end of the function.
2018-08-28gpu: Make memory_manager privateLioncash4-16/+30
Makes the class interface consistent and provides accessors for obtaining a reference to the memory manager instance. Given we also return references, this makes our more flimsy uses of const apparent, given const doesn't propagate through pointers in the way one would typically expect. This makes our mutable state more apparent in some places.
2018-08-28gl_rasterizer: Remove unused variablesLioncash1-2/+0
2018-08-28renderer_opengl: Implement a new shader cache.bunnei9-285/+250
2018-08-28gl_rasterizer_cache: Update to use RasterizerCache base class.bunnei3-132/+20
2018-08-28video_core: Add RasterizerCache class for common cache management code.bunnei2-0/+117
2018-08-25debug_utils: Remove unused includesLioncash2-23/+0
Quite a bit of these aren't necessary directly within the debug_utils header and can be removed or included where actually necessary.
2018-08-25debug_utils: Make BreakpointObserver class' constructor explicitLioncash1-1/+1
Avoids implicit conversions.
2018-08-25debug_utils: Initialize active_breakpoint member of DebugContextLioncash1-2/+2
Ensures that all class members are initialized.
2018-08-25maxwell3d: Move FinishedPrimitiveBatch event after AcceleratedDrawBatch()Lioncash1-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
2018-08-24fix SEL_IMM bitstringLaku1-1/+1
2018-08-24gl_rasterizer: Correct assertion condition in SyncLogicOpState()Lioncash1-1/+2
Previously the assert would always be hit, since it was the equivalent of: array == nullptr, which is never true.
2018-08-23Shaders: Added decodings for IADD3 instructionstech4me1-0/+6
2018-08-23gl_rasterizer_cache: Blit when possible on RecreateSurface.bunnei1-5/+12
2018-08-23gl_rasterizer_cache: Reserve surfaces that have already been created for later use.bunnei2-3/+61
2018-08-23gl_rasterizer_cache: Remove assert for RecreateSurface type.bunnei1-1/+0
2018-08-23gl_rasterizer_cache: Implement compressed texture copies.bunnei1-8/+18
2018-08-23gl_rasterizer: Implement stencil test.bunnei3-4/+58
- Used by Splatoon 2.
2018-08-23gl_rasterizer: Implement partial color clear and stencil clear.bunnei1-12/+42
2018-08-23maxwell_3d: Update to include additional stencil registers.bunnei1-20/+50
2018-08-23gl_state: Update to handle stencil front/back face separately.bunnei2-33/+38
2018-08-22gl_shader_gen: Make ShaderSetup's constructor explicitLioncash1-1/+1
Prevents implicit conversions.
2018-08-22gl_shader_gen: Use a std::vector to represent program code instead of std::arrayLioncash2-11/+16
While convenient as a std::array, it's also quite a large set of data as well (32KB). It being an array also means data cannot be std::moved. Any situation where the code is being set or relocated means that a full copy of that 32KB data must be done. If we use a std::vector we do need to allocate on the heap, however, it does allow us to std::move the data we have within the std::vector into another std::vector instance, eliminating the need to always copy the program data (as std::move in this case would just transfer the pointers and bare necessities over to the new vector instance).
2018-08-22more fixesLaku1-6/+7
2018-08-22fixesLaku1-6/+12
2018-08-22renderer_opengl: Namespace OpenGL codeLioncash21-23/+70
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-22remove debug loggingLaku1-2/+0
2018-08-22implement lop3Laku2-0/+55
2018-08-22maxwell_to_gl: Implement PrimitiveTopology::LinesOatmealDome1-0/+2
Used by Splatoon 2's debug menu.
2018-08-22Revert "Shader: Use the right sampler type in the TEX, TEXS and TLDS instructions."bunnei2-153/+31
- This reverts commit 3ef4b3d4b445960576f10d1ba6521580d03e3da8. - This commit had broken a lot of games. We really should do a full implementation of this in one change.
2018-08-21shader_bytecode: Parenthesize conditional expression within GetTextureType()Lioncash1-1/+1
Resolves a -Wlogical-op-parentheses warning.
2018-08-21renderer_opengl: Use LOG_DEBUG for GL_DEBUG_SEVERITY_NOTIFICATION and GL_DEBUG_SEVERITY_LOW logsLioncash1-1/+1
LOG_TRACE is only enabled on debug builds which can be quite slow when trying to debug graphics issues. Instead we can log the messages to the debug log, which is available on both release and debug builds.
2018-08-21gl_stream_buffer: Add missing header guardLioncash1-0/+2
Prevents potential compilation errors from occuring due to multiple inclusions
2018-08-21Shaders: Implement depth writing in fragment shaders.Subv1-1/+6
We'll write <last color output reg + 2> to gl_FragDepth.
2018-08-21shader_bytecode: Replace some UNIMPLEMENTED logs.bunnei1-2/+6
2018-08-21gl_shader_decompiler: Implement Texture3D for TEXS.bunnei1-0/+7
2018-08-21gl_shader_decompiler: Implement TextureCube for TEX.bunnei1-0/+8
2018-08-21Shaders: Fixed the coords in TEX with Texture2D.Subv1-1/+1
The X and Y coordinates should be in gpr8 and gpr8+1, respectively. This fixes the cutscene rendering in Sonic Mania.
2018-08-21Shaders: Log and crash when using an unimplemented texture type in a texture sampling instruction.Subv1-5/+14
2018-08-21GPU: Implemented the logic op functionality of the GPU.Subv3-0/+61
This will ASSERT if blending is enabled at the same time as logic ops.
2018-08-21GLState: Allow enabling/disabling GL_COLOR_LOGIC_OP independently from blending.Subv2-6/+19
2018-08-21rasterizer_interface: Remove ScreenInfo from AccelerateDraw()'s signatureLioncash5-17/+14
This is an OpenGL renderer-specific data type. Given that, this type shouldn't be used within the base interface for the rasterizer. Instead, we can pass this information to the rasterizer via reference.
2018-08-21GPU: Added registers for the logicop functionality.Subv1-1/+28
2018-08-21renderer_base: Make creation of the rasterizer, the responsibility of the renderers themselvesLioncash4-14/+12
Given we use a base-class type within the renderer for the rasterizer (RasterizerInterface), we want to allow renderers to perform more complex initialization if they need to do such a thing. This makes it important to reserve type information. Given the OpenGL renderer is quite simple settings-wise, this is just a simple shuffling of the initialization code. For something like Vulkan however this might involve doing something like: // Initialize and call rasterizer-specific function that requires // the full type of the instance created. auto raster = std::make_unique<VulkanRasterizer>(some, params); raster->CallSomeVulkanRasterizerSpecificFunction(); // Assign to base class variable rasterizer = std::move(raster)
2018-08-21Port #3353 from CitrafearlessTobi1-1/+1
2018-08-21Shaders: Write all the enabled color outputs when a fragment shader exits.Subv2-6/+45
We were only writing to the first render target before. Note that this is only the GLSL side of the implementation, supporting multiple render targets requires more changes in the OpenGL renderer. Dual Source blending is not implemented and stuff that uses it might not work at all.
2018-08-20Rasterizer: Reinterpret the raw texture bytes instead of blitting (and thus doing format conversion) to a new texture when a game requests an old texture address with a different format.Subv1-3/+49
2018-08-20Rasterizer: Don't attempt to copy over the old texture's data when doing a format reinterpretation if we're only going to clear the framebuffer.Subv4-13/+21
2018-08-20Implemented RGBA8_UINTDavid Marcec4-45/+58
Needed by kirby
2018-08-20Shaders/TEXS: Fixed the component mask in the TEXS instruction.Subv1-18/+18
Previously we could end up with a TEXS that didn't write any outputs, this was wrong.
2018-08-19Shaders/TEXS: Fixed the component mask in the TEXS instruction.Subv1-6/+11
Previously we could end up with a TEXS that didn't write any outputs, this was wrong.
2018-08-19Shader: Implemented the TLD4 and TLD4S opcodes using GLSL's textureGather.Subv1-0/+51
It is unknown how TLD4S determines the sampler type, more research is needed.
2018-08-19Shader: Use the right sampler type in the TEX, TEXS and TLDS instructions.Subv2-29/+127
Different sampler types have their parameters in different registers.
2018-08-19Shader: Added bitfields for the texture type of the various sampling instructions.Subv1-1/+65
2018-08-19Shaders: Added decodings for TLD4 and TLD4SSubv1-3/+7
2018-08-19Shaders: Added decodings for the LDG and STG instructions.Subv1-0/+4
2018-08-19Shaders: Implemented the gl_FrontFacing input attribute (attr 63).Subv2-0/+7
2018-08-18Shader: Remove an unneeded assert, the negate bit is implemented for conversion instructions.Subv1-2/+0
2018-08-18GLRasterizer: Implemented instanced vertex arrays.Subv2-4/+30
Before each draw call, for every enabled vertex array configured as instanced, we take the current instance id and divide it by its configured divisor, then we multiply that by the corresponding stride and increment the start address by the resulting amount. This way we can simulate the vertex array being incremented once per instance without actually using OpenGL's instancing functions.
2018-08-18Shader: Implemented the predicate and mode arguments of LOP.Subv2-11/+39
The mode can be used to set the predicate to true depending on the result of the logic operation. In some cases, this means discarding the result (writing it to register 0xFF (Zero)). This is used by Super Mario Odyssey.
2018-08-18Added WrapMode MirrorOnceClampToEdgeDavid Marcec1-0/+2
Used by splatoon 2
2018-08-18Shaders: Implemented a stack for the SSY/SYNC instructions.Subv1-3/+36
The SSY instruction pushes an address into the stack, and the SYNC instruction pops it. The current stack depth is 20, we should figure out if this is enough or not.
2018-08-18Shaders: Corrected the 'abs' and 'neg' bit usage in the float arithmetic instructions.Subv2-16/+38
We should definitely audit our shader generator for more errors like this.
2018-08-18Added predcondition GreaterThanWithNanDavid Marcec2-5/+8
2018-08-17gl_rasterizer_cache: Remove asserts for supported blits.bunnei1-2/+0
2018-08-17renderer_opengl: Treat OpenGL errors as critical.bunnei1-1/+1
2018-08-16gl_rasterizer_cache: Treat Depth formats differently from DepthStencil.bunnei2-16/+26
2018-08-15Shader/Conversion: Implemented the negate bit in F2F and I2I instructions.Subv1-4/+12
2018-08-15Shader/I2F: Implemented the negate I2F_C instruction variant.Subv1-7/+23
2018-08-15Shader/F2I: Implemented the negate bit in the I2F instructionSubv1-0/+4
2018-08-15Shader/F2I: Implemented the F2I_C instruction variant.Subv1-2/+10
2018-08-15Shader/F2I: Implemented the negate bit in the F2I instruction.Subv1-0/+4
2018-08-15gl_rasterizer_cache: Cleanup some PixelFormat names and logging.bunnei2-41/+71
2018-08-15Rasterizer: Implemented instanced rendering.Subv7-5/+28
We keep track of the current instance and update an uniform in the shaders to let them know which instance they are. Instanced vertex arrays are not yet implemented.
2018-08-15gl_rasterizer_cache: Add RGBA16U to PixelFormatFromTextureFormat.bunnei1-1/+9
- Used by Breath of the Wild.
2018-08-15Implement Z16_UNORM in PixelFormatFromTextureFormat functiongreggameplayer1-0/+2
Require by Zelda Breath Of The Wild
2018-08-15gl_shader_decompiler: Several fixes for indirect constant buffer loads.bunnei1-13/+22
2018-08-15gl_rasterizer: Fix upload size for constant buffers.bunnei1-3/+3
2018-08-15maxwell_to_gl: Properly handle UnsignedInt/SignedInt sizes.bunnei1-5/+20
2018-08-15gl_rasterizer_cache: Implement G8R8S format.bunnei2-34/+49
- Used by Super Mario Odyssey.
2018-08-14Fix BC7Ugreggameplayer1-1/+1
2018-08-14renderer_opengl: Implement RenderTargetFormat::RGBA16_UNORM.bunnei4-37/+48
- Used by Breath of the Wild.
2018-08-13Implement RG32UI and R32UIDavid Marcec4-7/+45
Needed for xenoblade
2018-08-13maxwell_to_gl: Implement VertexAttribute::Size::Size_8.bunnei1-0/+1
- Used by Breath of the Wild.
2018-08-13renderer_opengl: Implement RenderTargetFormat::RGBA16_UINT.bunnei4-34/+45
- Used by Breath of the Wild.
2018-08-13maxwell_to_gl: Implement PrimitiveTopology::LineStrip.bunnei1-0/+2
- Used by Breath of the Wild.
2018-08-13renderer_opengl: Implement RenderTargetFormat::RG8_UNORM.bunnei4-26/+61
- Used by Breath of the Wild.
2018-08-13gl_shader_decompiler: Implement XMAD instruction.bunnei2-4/+120
2018-08-12gl_rasterizer: Use a shared helper to upload from CPU memory.Markus Wick2-28/+33
2018-08-12gl_state: Don't track constant buffer mappings.Markus Wick3-41/+3
2018-08-12gl_rasterizer: Use the stream buffer for constant buffers.Markus Wick4-29/+32
2018-08-12gl_rasterizer: Use the streaming buffer itself for the constant buffer.Markus Wick2-33/+15
Don't emut copies, especially not for data, which is used once. They just end in a huge GPU overhead.
2018-08-12gl_rasterizer: Use a helper for aligning the buffer.Markus Wick2-15/+22
2018-08-12Update the stream_buffer helper from Citra.Markus Wick4-184/+98
Please see https://github.com/citra-emu/citra/pull/3666 for more details.
2018-08-12gl_shader_decompiler: Fix SetOutputAttributeToRegister empty check.bunnei1-2/+2
2018-08-12gl_shader_decompiler: Fix GLSL compiler error with KIL instruction.bunnei1-0/+8
2018-08-12GPU/Maxwell3D: Implemented an alternative set of blend factors.Subv2-0/+40
These are used by nouveau and some games like SMO.
2018-08-12Implement R8_UINT RenderTargetFormat & PixelFormat (#1014)greggameplayer4-55/+74
- Used by Go Vacation
2018-08-12RasterizerGL: Ignore invalid/unset vertex attributes.Subv2-1/+11
This should make the es2gears example not crash anymore.
2018-08-12gl_rasterizer: Silence implicit truncation warning in SetupShaders()Lioncash1-1/+1
Previously this would warn of truncating a std::size_t to a u32. This is safe because we'll obviously never have more than UINT32_MAX amount of uniform buffers.
2018-08-12core: Namespace EmuWindowLioncash8-15/+26
Gets the class out of the global namespace.
2018-08-12gl_shader_decompiler: Improve handling of unknown input/output attributes.bunnei2-10/+11
2018-08-12gl_rasterizer: Implement render target format RG8_SNORM.bunnei4-8/+18
- Used by Super Mario Odyssey.
2018-08-12gl_rasterizer: Implement render target format RGBA8_SNORM.bunnei4-64/+83
- Used by Super Mario Odyssey.
2018-08-11GPU/Shader: Don't predicate instructions that don't have a predicate field (SSY).Subv2-2/+13
2018-08-11GPU/Shaders: Implemented SSY and SYNC as a way to modify control flow during shader execution.Subv1-6/+25
SSY sets the target label to jump to when the SYNC instruction is executed.
2018-08-11Implement R16S & R16UI & R16I RenderTargetFormats & PixelFormats and more (R16_UNORM needed by Fate Extella) (#848)greggameplayer4-19/+92
* Implement R16S & R16UI & R16I RenderTargetFormats & PixelFormats Do a separate function in order to get Bytes Per Pixel of DepthFormat Apply the new function in gpu.h delete unneeded white space * correct merging error
2018-08-11video_core; Get rid of global g_toggle_framelimit_enabled variableLioncash6-25/+42
Instead, we make a struct for renderer settings and allow the renderer to update all of these settings, getting rid of the need for global-scoped variables. This also uncovered a few indirect inclusions for certain headers, which this commit also fixes.
2018-08-11renderer_base: Remove unused kFramebuffer enumerationLioncash1-3/+0
This is entirely unused and can be removed.
2018-08-11video_core: Remove unused Renderer enumerationLioncash1-2/+0
Currently we only have an OpenGL renderer, so this is unused in code (and occupies the Renderer identifier in the VideoCore namespace).
2018-08-10maxwell_to_gl: Implement VertexAttribute::Size::Size_8_8.bunnei1-0/+1
- Used by Super Mario Odyssey.
2018-08-10maxwell_to_gl: Implement VertexAttribute::Size::Size_32_32_32.bunnei1-0/+2
- Used by Super Mario Odyssey.
2018-08-10Revert "gl_state: Temporarily disable culling and depth test."bunnei1-3/+1
2018-08-10gl_rasterizer_cache: Remove unused viewport parameter of GetFramebufferSurfaces()Lioncash3-8/+6
2018-08-10video_core: Use variable template variants of type_traits interfaces where applicableLioncash2-4/+2
2018-08-10textures: Refactor out for Texture/Depth FormatFromPixelFormat.bunnei4-179/+27
2018-08-10gl_rasterizer_cache: Add bounds checking for gl_buffer copies.bunnei1-10/+12
2018-08-10Implement SNORM for BC5/DXN2 (#998)Khangaroo2-38/+55
* Implement BC5/DXN2 (#996) - Used by Kirby Star Allies. * Implement BC5/DXN2 SNORM UNORM for Kirby Star Allies SNORM for Super Mario Odyssey
2018-08-09gl_shader_decompiler: Reserve element memory beforehand in BuildRegisterList()Lioncash1-0/+2
Avoids potentially perfoming multiple reallocations when we know the total amount of memory we need beforehand.
2018-08-09gl_rasterizer_cache: Avoid iterator invalidation issues within InvalidateRegion()Lioncash1-2/+4
A range-based for loop can't be used when the container being iterated is also being erased from.
2018-08-09Implement BC5/DXN2 (#996)Khangaroo3-33/+45
- Used by Kirby Star Allies.
2018-08-09gl_rasterizer_cache: Invert conditional in LoadGLBuffer()Lioncash1-5/+5
It's generally easier to follow code using conditionals that operate in terms of the true case followed by the false case (no chance of overlooking the exclamation mark).
2018-08-09gl_rasterizer_cache: Use std::vector::assign in LoadGLBuffer() for the non-tiled caseLioncash1-4/+6
resize() causes the vector to expand and zero out the added members to the vector, however we can avoid this zeroing by using assign(). Given we have the pointer to the data we want to copy, we can calculate the end pointer and directly copy the range of data without the need to perform the resize() beforehand.
2018-08-09maxwell_to_gl: Implement VertexAttribute::Size::Size_16_16_16_16.bunnei1-0/+1
- Used by Super Mario Odyssey (in game).
2018-08-09maxwell_to_gl: Implement PrimitiveTopology::Points.bunnei1-0/+2
- Used by Super Mario Odyssey (in game).
2018-08-09gl_shader_decompiler: Declare predicates on use.bunnei1-4/+5
- Used by Super Mario Odyssey (when going in game).
2018-08-09maxwell_3d: Ignore macros that have not been uploaded yet.bunnei1-4/+9
- Used by Super Mario Odyssey (in game).
2018-08-09gl_rasterizer_cache: Make pointer const in LoadGLBuffer()Lioncash1-1/+1
This is only ever read from, so we can make the data it's pointing to const.
2018-08-09gl_rasterizer: Do not render when no render target is configured.bunnei1-0/+5
- Used by Super Mario Odyssey.
2018-08-08gpu: Add R11G11B10_FLOAT to RenderTargetBytesPerPixel.bunnei1-0/+1
- Used by Super Mario Odyssey.
2018-08-08gl_shader_decompiler: Stub input attribute Unknown_63.bunnei2-0/+9
2018-08-08maxwell_3d: Use correct const buffer size and check bounds.bunnei4-3/+12
- Fixes mem corruption with Super Mario Odyssey and Pokkén Tournament DX.
2018-08-08renderer_opengl: Use trace log in a few places.bunnei2-2/+2
2018-08-08maxwell_to_gl: Implement VertexAttribute::Size::Size_8_8.bunnei1-0/+1
2018-08-08gl_rasterizer_cached: Implement RenderTargetFormat::B5G6R5_UNORM.bunnei2-0/+4
- Used by Super Mario Odyssey.
2018-08-08gl_shader_decompiler: Let OpenGL interpret floats.bunnei2-11/+6
- Accuracy is lost in translation to string, e.g. with NaN. - Needed for Super Mario Odyssey.
2018-08-08Fixed the sRGB pixel format (#963)Hexagon121-1/+2
* Changed the sRGB pixel format return * Add a message about SRGBA -> RGBA conversion
2018-08-07Lowered down the logging for methodsHexagon121-4/+4
2018-08-06maxwell_3d: Remove outdated assert.bunnei1-2/+0
2018-08-06gl_rasterizer_cache: Avoid superfluous surface copies.bunnei2-4/+21
2018-08-05gl_shader_decompiler: Fix TEXS mask and dest.bunnei1-2/+5
2018-08-05added braces for conditionsDavid Marcec1-2/+3
2018-08-05fix the attrib format for intsDavid Marcec1-2/+7
2018-08-04gl_shader_manager: Invert conditional in SetShaderUniformBlockBinding()Lioncash1-7/+9
This lets us indent the majority of the code and places the error case first.
2018-08-04gl_shader_manager: Amend sign differences in an assertion comparison in SetShaderUniformBlockBinding()Lioncash1-3/+2
Ensures both operands have the same sign in the comparison. While we're at it, we can get rid of the redundant casting of ub_size to an int. This type will always be trivial and alias a built-in type (not doing so would break backwards compatibility at a standard level).
2018-08-04renderer_base: Make Rasterizer() return the rasterizer by referenceLioncash2-4/+8
All calling code assumes that the rasterizer will be in a valid state, which is a totally fine assumption. The only way the rasterizer wouldn't be is if initialization is done incorrectly or fails, which is checked against in System::Init().
2018-08-04video_core: Eliminate the g_renderer global variableLioncash10-47/+43
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.
2018-08-03video_core: Remove unimplemented Start() function prototypeLioncash1-3/+0
Given this has no definition, we can just remove it entirely.
2018-08-03gl_shader_decompiler: Remove unused variable in GenerateDeclarations()Lioncash1-2/+0
This variable was being incremented, but we were never actually using it.
2018-08-03gl_shader_manager: Make ProgramManager's GetCurrentProgramStage() a const member functionLioncash1-1/+1
This function doesn't modify class state, so it can be made const.
2018-08-02Implement RGB32F PixelFormat (#886) (used by Go Vacation)greggameplayer3-9/+23
2018-08-02gl_state: Make texture_units a std::arrayLioncash1-2/+3
Gets rid of the use of a raw C array.
2018-08-02gl_shader_manager: Take ShaderSetup instances by const reference in UseProgrammableVertexShader() and UseProgrammableFragmentShader()Lioncash1-2/+2
Avoids performing unnecessary copies of 65560 byte sized ShaderSetup instances, considering it's only used as part of lookup and not modified. Given the parameters were already const, it's likely taking these parameters by reference was intended but the ampersand was forgotten.
2018-08-02video_core: Make global EmuWindow instance part of the base renderer classLioncash8-51/+41
Makes the global a member of the RendererBase class. We also change this to be a reference. Passing any form of null pointer to these functions is incorrect entirely, especially given the code itself assumes that the pointer would always be in a valid state. This also makes it easier to follow the lifecycle of instances being used, as we explicitly interact the renderer with the rasterizer, rather than it just operating on a global pointer.
2018-08-01Implement R32_FLOAT RenderTargetFormatUnknown3-0/+5
2018-07-31MacroInterpreter: Avoid left shifting negative values.Subv2-2/+6
The branch target is signed, so multiply by 4 instead of left shifting by 2
2018-07-26GPU: Allow using R16F as a render target format.Subv2-1/+4
2018-07-26Implement R16_G16Unknown4-19/+100
correct trailing white spaces Delete tabs correct placement Add RG16F & RG16UI & RG16I & RG16S PixelFormats Return correct data according to changes done previously correct PixelFormat declaration correct coding style error correct coding style error part 2 correct RG16S Declaration error correct alignment
2018-07-25GPU: Use the right texture format for sRGBA framebuffers.Subv2-9/+17
2018-07-25GPU: Allow the use of Z24S8 as a texture format.Subv1-0/+4
2018-07-25GPU: Implemented the Z32_S8_X24 depth buffer format.Subv4-1/+16
2018-07-25GPU: Allow using Z32 as a texture format.Subv1-0/+4
2018-07-25GPU: Allow the usage of R8 as a render target format.Subv2-0/+4
2018-07-24GPU: Remove the assert that required the CODE_ADDRESS to be 0.Subv1-8/+0
Games usually just leave it at 0 but nouveau sets it to something else. This already works fine, the assert is useless.
2018-07-24GPU: Implemented the R16 and R16F texture formats.Subv3-5/+32
2018-07-24gl_rasterizer: Replace magic number with GL_INVALID_INDEX in SetupConstBuffers()Lioncash1-3/+5
This is just the named constant that OpenGL provides, so we can use that instead of using a literal -1
2018-07-24gl_rasterizer: Use std::string_view instead of std::string when checking for extensionsLioncash1-1/+3
We can avoid heap allocations here by just using a std::string_view instead of performing unnecessary copying of the string data.
2018-07-24gl_rasterizer: Use in-class member initializers where applicableLioncash2-12/+5
We can just assign to the members directly in these cases.
2018-07-24video_core/memory_manager: Replace a loop with std::array's fill() function in PageSlot()Lioncash1-3/+1
We already have a function that does what this code was doing, so let's use that instead.
2018-07-24video_core/memory_manager: Avoid repeated unnecessary page slot lookupsLioncash1-11/+21
We don't need to keep calling the same function over and over again in a loop, especially when the behavior is slightly non-trivial. We can just keep a reference to the looked up location and do all the checking and assignments based off it instead.
2018-07-24gl_rasterizer: Implement texture border color.bunnei3-11/+11
2018-07-24maxwell_to_gl: Implement Texture::WrapMode::Border.bunnei1-0/+2
2018-07-24GPU: Implement texture format R32F.Subv3-6/+19
2018-07-24maxwell_to_gl: Implement VertexAttribute::Type::UnsignedInt.bunnei1-0/+3
2018-07-24gl_shader_decompiler: Correct return value of WriteTexsInstruction()Lioncash1-2/+2
This should be returning void, not a std::string
2018-07-24gl_shader_decompiler: Implement shader instruction TLDS.bunnei1-29/+43
2018-07-24gl_rasterizer_cache: Implement RenderTargetFormat RG32_FLOAT.bunnei5-7/+25
2018-07-24gl_rasterizer_cache: Implement RenderTargetFormat RGBA32_FLOAT.bunnei2-10/+34
2018-07-24gl_rasterizer_cache: Implement RenderTargetFormat BGRA8_UNORM.bunnei4-8/+22
2018-07-24gl_rasterizer_cache: Add missing log statements.bunnei1-0/+2
2018-07-24gl_shader_decompiler: Print instruction value in shader comments.bunnei1-1/+2
2018-07-24gl_shader_decompiler: Check if SetRegister result is ZeroIndex.bunnei1-0/+6
2018-07-23gl_shader_decompiler: Simplify GetCommonDeclarations()Lioncash1-5/+5
2018-07-22gl_shader_decompiler: Remove redundant Subroutine construction in AddSubroutine()Lioncash1-4/+8
We don't need to toss away the Subroutine instance after the find() call and reconstruct another instance with the same data right after it. Particularly give Subroutine contains a std::set.
2018-07-22shader_bytecode: Implement other TEXS masks.bunnei1-5/+9
2018-07-22gl_shader_decompiler: Remove unused state tracking and minor cleanup.bunnei1-78/+15
2018-07-22gl_shader_decompiler: Implement SEL instruction.bunnei2-0/+20
2018-07-22gl_rasterizer_cache: Blit surfaces on recreation instead of flush and load.bunnei2-2/+86
2018-07-22gl_rasterizer_cache: Use GPUVAddr as cache key, not parameter set.bunnei3-57/+46
2018-07-22gl_rasterizer_cache: Use zeta_width and zeta_height registers for depth buffer.bunnei2-11/+11
2018-07-22gl_rasterizer: Use zeta_enable register to enable depth buffer.bunnei1-2/+2
2018-07-22maxwell_3d: Add depth buffer enable, width, and height registers.bunnei1-2/+14
2018-07-21gl_shader_manager: Replace unimplemented function prototypeLioncash2-3/+3
This was just a linker error waiting to happen.
2018-07-21gpu: Rename Get3DEngine() to Maxwell3D()Lioncash3-11/+14
This makes it match its const qualified equivalent.
2018-07-21video_core: Use nested namespaces where applicableLioncash11-48/+24
Compresses a few namespace specifiers to be more compact.
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-07-20maxwell_3d: Remove unused variable within GetStageTextures()Lioncash1-2/+0
2018-07-20gl_shader_decompiler: Eliminate variable and declaration shadowingLioncash1-6/+4
Ensures that no identifiers are being hidden, which also reduces compiler warnings.
2018-07-20gl_shader_decompiler: Remove unnecessary const from return valuesLioncash1-2/+2
This adds nothing from a behavioral point of view, and can inhibit the move constructor/RVO
2018-07-19gl_state: Temporarily disable culling and depth test.bunnei1-1/+3
2018-07-19decoders: Fix calc of swizzle image_width_in_gobs.bunnei1-1/+4
2018-07-19core: Don't construct instance of Core::System, just to access its live instanceLioncash3-15/+15
This would result in a lot of allocations and related object construction, just to toss it all away immediately after the call. These are definitely not intentional, and it was intended that all of these should have been accessing the static function GetInstance() through the name itself, not constructed instances.
2018-07-18astc: Initialize vector size directly in DecompressLioncash1-2/+1
There's no need to perform a separate resize.
2018-07-18astc: Mark functions as internally linked where applicableLioncash1-17/+20
2018-07-18astc: const-correctness changes where applicableLioncash1-14/+13
A few member functions didn't actually modify class state, so these can be amended as necessary.
2018-07-18astc: Delete Bits' copy contstructor and assignment operatorLioncash1-8/+6
This also potentially avoids warnings, considering the copy assignment operator is supposed to have a return value.
2018-07-18astc: In-class initialize member variables where appropriateLioncash1-39/+22
2018-07-18vi: Partially implement buffer crop parameters.bunnei3-4/+20
2018-07-17GPU: Added register definitions for the stencil parameters.Subv1-2/+25
2018-07-15gl_rasterizer_cache: Implement texture format G8R8.bunnei3-9/+40
2018-07-15gl_rasterizer_cache: Fix incorrect offset in ConvertS8Z24ToZ24S8.bunnei1-1/+2
2018-07-15gl_rasterizer_cache: Implement depth format Z16_UNORM.bunnei3-1/+15
2018-07-14OpenGL: Use MakeCurrent/DoneCurrent for multithreaded rendering.bunnei3-1/+27
2018-07-14GPU: Always enable the depth write when clearing the depth buffer.Subv1-3/+8
The GPU ignores that register when clearing, but OpenGL obeys the glDepthMask parameter, so we set the depth mask to GL_TRUE when clearing the depth buffer. It will be restored to the correct value automatically on the next draw call.
2018-07-13gl_rasterizer: Fix check for if a shader stage is enabled.bunnei3-35/+11
2018-07-13gl_shader_gen: Implement dual vertex shader mode.bunnei5-55/+139
- When VertexA shader stage is enabled, we combine with VertexB program to make a single Vertex Shader stage.
2018-07-13gl_shader_decompiler: Implement PredCondition::LessThanWithNan.bunnei2-5/+7
2018-07-13gl_shader_decompiler: Use FlowCondition field in EXIT instruction.bunnei2-8/+34
2018-07-12GPU: Implement the FADD32I shader instruction.Subv2-0/+32
2018-07-12GPU: Corrected the decoding of FFMA for immediate operands.Subv1-1/+1
2018-07-08gl_rasterizer: Flip triangles when regs.viewport_transform[0].scale_y is negative.bunnei1-1/+4
- Fixes a regression with Binding of Isaac.
2018-07-07GPU: Implemented the BC7U texture format.Subv3-7/+21
Note: Our version of glad exports GL_COMPRESSED_RGBA_BPTC_UNORM as GL_COMPRESSED_RGBA_BPTC_UNORM_ARB, maybe it's time we update it.
2018-07-05GPU: Allow using the old NV04 values for the depth test function.Subv2-9/+29
These seem to be just a valid as the GL token values. Thanks @ReinUsesLisp This restores graphical output to Disgaea 5
2018-07-04GPU: Implemented the IMNMX shader instruction.Subv2-3/+31
It's similar to the FMNMX instruction but it works on integers.
2018-07-04GPU: Implemented the F2F 'round' rounding mode.Subv1-0/+3
It's implemented via the GLSL 'roundEven()' function.
2018-07-04GPU: Stub the shader SYNC and DEPBAR instructions.Subv2-0/+12
It is unknown at this moment if we actually need to do something with these instructions or if the GLSL compiler takes care of that for us.
2018-07-04GPU: Implement the Size_16_16 and Size_10_10_10_2 vertex attribute types.Subv1-0/+8
Both signed and unsigned variants.
2018-07-04GPU: Ignore textures that the GLSL compiler deemed unused when binding textures to the shaders.Subv1-1/+4
2018-07-04GPU: Corrected the decoding for the TEX shader instruction.Subv1-1/+1
2018-07-04GPU: Implemented the PSETP shader instruction.Subv2-0/+43
It's similar to the isetp and fsetp instructions but it works on predicates instead.
2018-07-04GPU: Implemented the 32 bit float depth buffer format.Subv3-2/+15
2018-07-04GPU: Flip the triangle front face winding if the GPU is configured to not flip the triangles.Subv2-3/+29
OpenGL's default behavior is already correct when the GPU is configured to flip the triangles. This fixes 1-2 Switch's splash screen.
2018-07-04GPU: Only configure the used framebuffers during clear.Subv4-17/+48
Don't try to configure the color buffer if it is not being cleared, it may not be completely valid at this point.
2018-07-03GPU: Factor out the framebuffer configuration code for both Clear and Draw commands.Subv2-72/+39
2018-07-03GPU: Support clears that don't clear the color buffer.Subv2-6/+17
2018-07-03GPU: Bind and clear the render target when the CLEAR_BUFFERS register is written to.Subv4-0/+86
2018-07-03GPU: Added registers for the CLEAR_BUFFERS and CLEAR_COLOR methods.Subv1-2/+27
2018-07-03gl_rasterizer_cache: Implement PixelFormat S8Z24.bunnei3-11/+83
2018-07-03gl_rasterizer: Only set cull mode and front face if enabled.bunnei1-2/+5
2018-07-03GPU: Use only the least significant 3 bits when reading the depth test func.Subv1-9/+9
Some games set the full GL define value here (including nouveau), but others just seem to set those last 3 bits.
2018-07-03GPU: Don't try to parse the depth test function if the depth test is disabled.Subv1-0/+4
2018-07-03Update clang formatJames Rowe7-21/+20
2018-07-03Rename logging macro back to LOG_*James Rowe13-70/+70
2018-07-03GPU: Set up the culling configuration on each draw.Subv1-6/+8
2018-07-03GPU: Implemented MUFU suboperation 8, sqrt.Subv2-0/+5
2018-07-02GPU: Set up the depth test state on every draw.Subv2-0/+14
2018-07-02MaxwellToGL: Added conversion functions for depth test and cull mode.Subv1-0/+50
2018-07-02GPU: Added registers for depth test and cull mode.Subv1-3/+51
2018-07-02GPU: Implemented the Z24S8 depth format and load the depth framebuffer.Subv7-24/+124
2018-07-02GPU: Implement offsetted rendering when using non-indexed drawing.Subv1-1/+1
2018-07-02GPU: Fixed the index offset rendering, and implemented the base vertex functionality.Subv1-6/+8
This fixes Stardew Valley.
2018-07-02GPU: Added register definitions for the vertex buffer base element.Subv1-1/+6
2018-07-02GPU: Directly copy the pixels when performing a same-layout DMA.Subv1-1/+5
2018-07-02GPU: Ignore disabled textures and textures with an invalid address.Subv2-1/+10
2018-07-02GPU: Allow GpuToCpuAddress to return boost::none for unmapped addresses.Subv1-2/+2
2018-06-30GPU: Corrected the size of the MUFU subop field, and removed incorrect "min" operation.Subv2-6/+1
2018-06-30GPU: Implemented the RGBA32_UINT rendertarget format.Subv4-9/+28
2018-06-30GLCache: Specify the component type along the texture type in the format tuple.Subv1-17/+21
2018-06-30gl_shader_decompiler: Implement predicate NotEqualWithNan.bunnei2-17/+24
2018-06-29gl_rasterizer_cache: Only dereference color_surface/depth_surface if valid.bunnei1-2/+6
2018-06-27gl_shader_decompiler: Add a return path for unknown instructions.bunnei1-0/+1
2018-06-27gl_rasterizer_cache: Implement caching for texture and framebuffer surfaces.bunnei3-16/+168
gl_rasterizer_cache: Improved cache management based on Citra's implementation. gl_surface_cache: Add some docstrings.
2018-06-27gl_rasterizer_cache: Various fixes for ASTC handling.bunnei2-35/+39
2018-06-27gl_rasterizer_cache: Use SurfaceParams as a key for surface caching.bunnei2-43/+72
2018-06-27maxwell_3d: Add a struct for RenderTargetConfig.bunnei1-17/+19
2018-06-27gl_rasterizer: Implement AccelerateDisplay to forward textures to framebuffers.bunnei6-8/+62
2018-06-27gl_rasterizer_cache: Cache size_in_bytes as a const per surface.bunnei2-9/+13
2018-06-27gl_rasterizer_cache: Refactor to make SurfaceParams members const.bunnei2-52/+37
2018-06-27gl_rasterizer_cache: Remove Citra's rasterizer cache, always load/flush surfaces.bunnei4-1494/+210
2018-06-27gl_rasterizer: Workaround for when exceeding max UBO size.bunnei2-1/+7
2018-06-26gl_state: Fix state management for texture swizzle.bunnei5-12/+20
2018-06-26gl_state: Remove unused state management from 3DS.bunnei2-94/+0
2018-06-26gl_rasterizer_cache: Fix inverted B5G6R5 format.bunnei1-1/+1
2018-06-25Fix crash at exitmailwl1-2/+4
2018-06-20Build: Fixed some MSVC warnings in various parts of the code.Subv7-12/+13
2018-06-19GPU: Perform negation after absolute value in the float shader instructions.Subv1-7/+14
2018-06-19GPU: Don't mark uniform buffers and registers as used for instructions which don't have them.Subv2-14/+18
Like the MOV32I and FMUL32I instructions. This fixes a potential crash when using these instructions.
2018-06-18gl_rasterizer: Get loose on independent blending.Jules Blok1-1/+1
2018-06-18gl_rasterizer: Implement texture format ASTC_2D_4X4.bunnei6-1/+1709
2018-06-18gl_rasterizer_cache: Loosen things up a bit.bunnei1-26/+8
2018-06-17gl_shader_decompiler: Implement LOP instructions.bunnei2-6/+42
2018-06-17gl_shader_decompiler: Refactor LOP32I instruction a bit in support of LOP.bunnei2-57/+42
2018-06-16gl_shader_decompiler: Implement integer size conversions for I2I/I2F/F2I.bunnei2-14/+43
2018-06-16gl_shader_gen: Set position.w to 1.bunnei1-0/+4
2018-06-16gl_shader_decompiler: Implement LOP32I LogicOperation PassB.bunnei1-6/+12
2018-06-12GPU: Implemented the iadd32i shader instruction.Subv2-2/+31
2018-06-12GPU: Partially implemented the Maxwell DMA engine.Subv7-1/+237
Only tiled->linear and linear->tiled copies that aren't offsetted are supported for now. Queries are not supported. Swizzled copies are not supported.
2018-06-12gl_shader_decompiler: Implement saturate for float instructions.bunnei2-39/+32
2018-06-10GPU: Convert the gl_InstanceId and gl_VertexID variables to floats when reading from them.Subv1-1/+1
This corrects the invalid position values in some games when doing attribute-less rendering.
2018-06-10Rasterizer: Use UBOs instead of SSBOs for uploading const buffers.Subv4-18/+39
This should help a bit with GPU performance once we're GPU-bound.
2018-06-09GPU: Implement the iset family of shader instructions.Subv2-2/+46
2018-06-09GPU: Added decodings for the ISET family of instructions.Subv1-0/+7
2018-06-09gl_shader_decompiler: Implement SHR instruction.bunnei2-0/+17
2018-06-09GPU: Stub the SSY shader instruction.Subv2-0/+7
This instruction tells the GPU where the flow reconverges in a non-uniform control flow scenario, we can ignore this when generating GLSL code.
2018-06-09gl_shader_decompiler: Implement IADD instruction.bunnei2-11/+37
2018-06-09gl_shader_decompiler: Add missing asserts for saturate_a instructions.bunnei2-8/+18
2018-06-09GPU: Synchronize the blend state on every draw call.Subv2-16/+20
Only independent blending on render target 0 is implemented for now. This fixes the elongated squids in Splatoon 2's boot screen.
2018-06-09GPU: Added registers for normal and independent blending.Subv2-31/+27
2018-06-08GLCache: Align compressed texture sizes to their compression ratio, and then align that compressed size to the block height for tiled textures.Subv1-2/+7
This fixes issues with retrieving non-block-aligned tiled compressed textures from the cache.
2018-06-08Rasterizer: Flush the written region when writing shader uniform data before copying it to the uniform buffers.Subv1-0/+3
This fixes the flip_viewport uniform having invalid values when drawing.
2018-06-07GLRenderer: Write the shader stage configuration UBO data *before* copying it to the GPU.Subv1-3/+4
This should fix the bug with the vs_config UBO being uninitialized during shader execution.
2018-06-07gl_shader_decompiler: Implement BFE_IMM instruction.bunnei2-7/+44
2018-06-07GLCache: Use the full uncompressed size when blitting from one texture to another.Subv1-3/+6
This avoids the problem of only copying a tiny piece of the textures when they are compressed.
2018-06-07GLCache: Simplify the logic to copy from one texture to another in BlitTextures.Subv1-53/+3
We now use glCopyImageSubData, this should avoid errors with trying to attach a compressed texture as a framebuffer's color attachment and then blitting to it. Maybe in the future we can change this to glCopyTextureSubImage which only requires GL_ARB_direct_state_access.
2018-06-07gl_shader_decompiler: F2F: Implement rounding modes.bunnei2-10/+35
2018-06-07gl_shader_decompiler: Remove some attribute stuff that has nothing to do with TEX/TEXS.bunnei1-8/+4
2018-06-07shader_bytecode: Add instruction decodings for BFE, IMNMX, and XMAD.bunnei1-0/+20
2018-06-07gl_shader_decompiler: Implement ISETP_IMM instruction.bunnei1-8/+9
2018-06-07GPU: Support changing the texture swizzles for Maxwell textures.Subv3-0/+45
2018-06-07GLState: Support changing the GL_TEXTURE_SWIZZLE parameter of each texture unit.Subv3-0/+20
2018-06-07gl_shader_decompiler: Implement LD_C instruction.bunnei2-0/+43
2018-06-07gl_shader_gen: Add uniform handling for indirect const buffer access.bunnei3-4/+40
2018-06-06gl_shader_decompiler: Refactor uniform handling to allow different decodings.bunnei2-26/+29
2018-06-06GPU: Implement sampling multiple textures in the generated glsl shaders.Subv9-69/+172
All tested games that use a single texture show no regression. Only Texture2D textures are supported right now, each shader gets its own "tex_fs/vs/gs" sampler array to maintain independent textures between shader stages, the textures themselves are reused if possible.
2018-06-06gl_shader_decompiler: Fix un/signed mismatch with SHL.bunnei1-1/+1
2018-06-06maxwell_to_gl: Implement WrapMode Mirror.bunnei1-0/+2
2018-06-06GPU: Allow the usage of RGBA16_FLOAT in the texture copy engine.Subv1-0/+2
2018-06-06GPU: Implemented the R11FG11FB10F texture and rendertarget formats.Subv4-11/+30
2018-06-06GPU: Fixed the compression factor for RGBA16F textures.Subv1-1/+1
They're not compressed.
2018-06-06GPU: Allow the usage of RGBA32_FLOAT in the texture copy engine.Subv2-0/+3
2018-06-05GPU: Corrected the branch targets for the shader bra instruction.Subv1-4/+5
2018-06-05GPU: Implemented the F2I_R shader instruction.Subv2-7/+64
2018-06-05gl_shader_decompiler: Fix typo with ISCADD instruction.bunnei1-1/+1
2018-06-05gl_shader_decompiler: Implement SHL instruction.bunnei2-14/+47
2018-06-05gl_shader_decompiler: Implement PredCondition::NotEqual.bunnei1-3/+3
2018-06-05GPU: Implement the ISCADD shader instructions.Subv2-0/+40
2018-06-05GPU: Added decodings for the ISCADD instructions.Subv1-0/+7
2018-06-05GPU: Implement predicated exit instructions in the shader programs.Subv1-4/+6
2018-06-05GPU: Take into account predicated exits when performing shader control flow analysis.Subv1-1/+10
2018-06-04GPU: Use the bf bit in FSET to determine whether to write 0xFFFFFFFF or 1.0f.Subv2-2/+7
2018-06-04GPU: Corrected the I2F_R implementation.Subv1-2/+12
2018-06-04GPU: Calculate the correct viewport dimensions based on the scale and translate registers.Subv2-14/+30
This is how nouveau calculates the viewport width and height. For some reason some games set 0xFFFF in the VIEWPORT_HORIZ and VIEWPORT_VERT registers, maybe those are a misnomer and actually refer to something else?
2018-06-04GPU: Implemented the LOP32I instruction.Subv2-1/+58
2018-06-04GLCache: Corrected a mismatch between storing compressed sizes and verifying the uncompressed alignment in GetSurface.Subv1-1/+2
2018-06-04GPU: Use explicit types when retrieving the uniform values for fsetp/fset and isetp instead of the type of an invalid output register.Subv1-9/+18
2018-06-04GPU: Implemented the ISETP_R and ISETP_C shader instructions.Subv2-0/+48
2018-06-04GPU: Partially implemented the shader BRA instruction.Subv2-1/+43
2018-06-04GPU: Added decoding for the BRA instruction.Subv1-0/+2
2018-06-04GPU: Partial implementation of long GPU queries.Subv1-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.
2018-06-03gl_shader_decompiler: Implement TEXS component mask.bunnei2-9/+26
2018-06-03gl_shader_decompiler: Implement RRO as a register move.bunnei2-9/+18
2018-06-02GPU: Implemented the DXN1 (BC4) texture format.Subv3-3/+16
2018-06-01gl_shader_decompiler: Implement TEX instruction.bunnei2-1/+36
2018-06-01gl_shader_decompiler: Support multi-destination for TEXS.bunnei2-2/+23
2018-05-31gl_rasterizer_cache: Assert that component type is UNorm or format is RGBA16F.bunnei1-1/+2
2018-05-31gl_rasterizer_cache: Implement PixelFormat RGBA16F.bunnei3-6/+22
2018-05-30Shaders: Implemented reading the gl_InstanceID and gl_VertexID variables in the vertex shader.Subv2-1/+11
2018-05-30gl_shader_decompiler: F2F_R instruction: Implement abs.bunnei1-1/+7
2018-05-30gl_shader_decompiler: Partially implement F2F_R instruction.bunnei2-4/+9
2018-05-30GPU: Implemented the R8 texture format (0x1D)Subv3-5/+18
2018-05-30gl_rasterize_cache: Invert order of tex format RGB565.bunnei1-1/+1
2018-05-29add all the known TextureFormat (#474)greggameplayer1-2/+71
2018-05-27GPU: Implemented the A1B5G5R5 texture format (0x14)Subv4-5/+21
2018-05-26gl_shader_decompiler: Implement GetPredicateComparison GreaterEqual.bunnei1-4/+3
2018-05-26shader_bytecode: Implement other variants of FMNMX.bunnei2-4/+10
2018-05-25Shader: Implemented compound predicates in fset.Subv1-28/+12
You can specify a predicate in the fset instruction: Result = ((Value1 Comp Value2) OP P0) ? 1.0 : 0.0;
2018-05-25GPU: Allow command lists to rebind a channel to another engine in the middle of the command list.Subv1-1/+0
2018-05-25Shader: Implemented compound predicates in fsetp.Subv1-19/+55
You can specify three predicates in an fsetp instruction: P1 = (Value1 Comp Value2) OP P0; P2 = !(Value1 Comp Value2) OP P0;
2018-05-21Shaders: Implemented the FMNMX shader instruction.Subv2-6/+26
2018-05-20GPU: Implemented nvhost-as-gpu's UnmapBuffer ioctl.Subv2-0/+20
It removes a mapping previously created with the MapBufferEx ioctl.
2018-05-19ShadersDecompiler: Added decoding for the PSETP instruction.Subv1-0/+3
2018-05-19GLRenderer: Remove unused hw_vao_enabled_attributes variable.Subv2-4/+0
2018-05-19GLRenderer: Remove unused vertex buffer and increase the size of the stream buffer to 128 MB.Subv2-9/+3
The stream buffer is where all the vertex data is copied, some games require this to be much bigger than the 4 MB we used to have.
2018-05-19GLRenderer: Log the shader source code when program linking fails.Subv1-0/+27
2018-05-02general: Make formatting of logged hex values more straightforwardLioncash1-1/+1
This makes the formatting expectations more obvious (e.g. any zero padding specified is padding that's entirely dedicated to the value being printed, not any pretty-printing that also gets tacked on).
2018-04-29maxwell_3d: Reset vertex counts after drawing.bunnei1-0/+10
2018-04-29gl_shader_decompiler: Implement MOV_R.bunnei1-1/+2
2018-04-29maxwell_to_gl: Implement type SignedNorm, Size_8_8_8_8.bunnei1-0/+12
2018-04-29shader_bytecode: Add decoding for FMNMX instruction.bunnei1-0/+2
2018-04-29Shaders: Implemented predicate condition 3 (LessEqual) in the fset and fsetp instructions.Subv1-0/+7
2018-04-29gl_shader_decompiler: Implement MOV_C.bunnei1-0/+5
2018-04-29fermi_2d: Fix surface copy block height.bunnei2-2/+7
2018-04-29gl_shader_decompiler: Partially implement I2I_R, and I2F_R.bunnei2-8/+34
2018-04-29gl_shader_decompiler: More cleanups, etc. with how we handle register types.bunnei1-44/+120
2018-04-29GLSLRegister: Simplify register declarations, etc.bunnei1-63/+31
2018-04-29shader_bytecode: Add decodings for i2i instructions.bunnei1-3/+20
2018-04-29gl_shader_decompiler: Implement MOV32_IMM instruction.bunnei2-2/+7
2018-04-27renderer_opengl: Replace usages of LOG_GENERIC with fmt-capable equivalentsLioncash1-6/+7
2018-04-27gl_shader_decompiler: Add GLSLRegisterManager class to track register state.bunnei1-154/+262
2018-04-27general: Convert assertion macros over to be fmt-compatibleLioncash4-7/+7
2018-04-26gl_shader_decompiler: Boilerplate for handling integer instructions.bunnei2-6/+111
2018-04-26gl_shader_decompiler: Move color output to EXIT instruction.bunnei1-6/+12
2018-04-25GPU: Partially implemented the Fermi2D surface copy operation.Subv2-0/+59
The hardware allows for some rather complicated operations to be performed on the data during the copy, this is not implemented. Only same-format same-size raw copies are implemented for now.
2018-04-25Shaders: Added bit decodings for the I2I instruction.Subv1-0/+6
2018-04-25Shaders: Implemented the FSET instruction.Subv1-0/+53
This instruction is similar to the FSETP instruction, but it doesn't set a predicate, it sets the destination register to 1.0 if the condition holds, and 0 otherwise.
2018-04-25GPU: Make the Textures::CopySwizzledData function accessible from the outside of the file.Subv2-3/+6
2018-04-25GPU: Added a function to retrieve the bytes per pixel of the render target formats.Subv2-0/+15
2018-04-25GPU: Added surface copy registers to Fermi2DSubv1-1/+57
2018-04-25GPU: Added boilerplate code for the Fermi2D engineSubv3-3/+34
2018-04-25GPU: Reduce the number of registers of Maxwell3D to 0xE00.Subv2-5/+5
The rest are just macro shim registers.
2018-04-25GPU: Move the Maxwell3D macro uploading code to the inside of the Maxwell3D processor.Subv4-40/+23
It doesn't belong in the PFIFO handler.
2018-04-25GPU: Corrected the upper bound of the PFIFO method ids in the command processor.Subv1-1/+1
2018-04-25video-core: Move logging macros over to new fmt-capable onesLioncash5-18/+20
2018-04-25Shaders: Added decodings for the FSET instructions.Subv2-9/+30
2018-04-25renderer_opengl: Use correct byte order for framebuffer pixel format ABGR8.bunnei1-2/+1
2018-04-25gl_rasterizer_cache: Use CHAR_BIT for bpp conversions instead of 8.bunnei2-4/+4
2018-04-25gl_rasterizer_cache: Use GPU PAGE_BITS/SIZE, not CPU.bunnei1-5/+5
2018-04-25gl_rasterizer_cache: Use new logger.bunnei1-4/+4
2018-04-25gl_rasterizer_cache: Add a function for finding framebuffer GPU address.bunnei3-0/+31
2018-04-25gl_rasterizer_cache: Handle compressed texture sizes.bunnei2-24/+65
2018-04-25gl_rasterizer_cache: Update to be based on GPU addresses, not CPU addresses.bunnei8-50/+72
2018-04-24memory_manager: Add implement CpuToGpuAddress.bunnei2-0/+27
2018-04-24memory_manager: Make GpuToCpuAddress return an optional.bunnei6-24/+33
2018-04-24memory_manager: Use GPUVAdddr, not PAddr, for GPU addresses.bunnei6-58/+55
2018-04-24renderer_opengl: Silence a -Wdangling-else warning in DrawScreenTriangles()Lioncash1-1/+2
2018-04-24GPU: Added asserts to our code for handling the QUERY_GET GPU command.Subv2-2/+53
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.
2018-04-23GPU: Support multiple enabled vertex arrays.Subv3-43/+89
The vertex arrays will be copied to the stream buffer one after the other, and the attributes will be set using the ARB_vertex_attrib_binding extension. yuzu now thus requires OpenGL 4.3 or the ARB_vertex_attrib_binding extension.
2018-04-23GPU: Make the GPU virtual memory manager use 16 page bits and 10 page table bits.Subv2-34/+25
Also removed some dead code and added memory map consistency asserts.
2018-04-23GPU: Implement the RGB10_A2 RenderTarget format, it will use the same format as the A2BGR10 texture format.Subv1-0/+2
2018-04-22GPU: Implement the A2BGR10 texture format.Subv4-6/+18
2018-04-21gl_shader_decompiler: Skip RRO instruction.bunnei1-0/+4
2018-04-21gl_shader_decompiler: Cleanup error logging.bunnei1-14/+6
2018-04-21shader_bytecode: Add several more instruction decodings.bunnei1-5/+52
2018-04-21shader_bytecode: Decode instructions based on bit strings.bunnei2-205/+201
2018-04-21ShaderGen: Implemented the KIL instruction, which is equivalent to 'discard'.Subv1-1/+7
2018-04-21ShaderGen: Implemented predicated instruction execution.Subv2-1/+40
Each predicated instruction will be wrapped in an `if (predicate) { instruction_body; }` in the GLSL, where `predicate` is one of the predicate boolean variables previously set by fsetp.
2018-04-21ShaderGen: Implemented the fsetp instruction.Subv2-3/+112
Predicate variables are now added to the generated shader code in the form of 'pX' where X is the predicate id. These predicate variables are initialized to false on shader startup and are set via the fsetp instructions. TODO: * Not all the comparison types are implemented. * Only the single-predicate version is implemented.
2018-04-21opengl: Remove unnecessary header inclusionsLioncash4-11/+0
2018-04-21gl_resource_manager: Add missing noexcept specifiers to move constructors and assignment operatorsLioncash1-20/+19
Standard library containers may use std::move_if_noexcept to perform move operations. If a move cannot be performed under these circumstances, then a copy is attempted. Given we only intend for these types to be move-only this can be somewhat problematic. By defining these to be noexcept we prevent cases where copies may be attempted.
2018-04-21gl_rasterizer_cache: Make MatchFlags an enum classLioncash1-4/+9
Prevents implicit conversions and scope pollution.
2018-04-20ShaderGen: Register id 255 is special and is hardcoded to return 0 (SR_ZERO).Subv2-0/+5
2018-04-20ShaderGen: Ignore the 'sched' instruction when generating shaders.Subv1-0/+16
The 'sched' instruction has a very convoluted encoding, but fortunately it seems to only appear on a fixed interval (once every 4 instructions).
2018-04-20math_util: Remove the Clamp() functionLioncash2-16/+17
C++17 adds clamp() to the standard library, so we can remove ours in favor of it.
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-20renderer_opengl: Add missing header guardsLioncash2-0/+4
2018-04-20glsl_shader_decompiler: Use std::string_view instead of std::string for AddLine()Lioncash1-1/+2
This function doesn't need to take ownership of the string data being given to it, considering all we do is append the characters to the internal string instance. Instead, use a string view to simply reference the string data without any potential heap allocation. Now anything that is a raw const char* won't need to be converted to a std::string before appending.
2018-04-20glsl_shader_decompiler: Add AddNewLine() function to ShaderWriterLioncash1-6/+12
Avoids constructing a std::string just to append a newline character
2018-04-20glsl_shader_decompiler: Add char overload for ShaderWriter's AddLine()Lioncash1-4/+11
Avoids constructing a std::string just to append a character.
2018-04-20glsl_shader_decompiler: Append indentation without constructing a separate std::stringLioncash1-1/+5
The interface of std::string already lets us append N copies of a character to an existing string.
2018-04-19ShaderGen: Implemented the fmul32i shader instruction.Subv2-9/+30
2018-04-19ShaderGen: Fixed a case where the TEXS instruction would use the same registers for the input and the output.Subv1-2/+9
It will now save the coords before writing the outputs in a subscope.
2018-04-19GPU: Add support for the DXT23 and DXT45 compressed texture formats.Subv3-28/+35
2018-04-19GPU: Implemented the B5G6R5 format.Subv4-8/+28
2018-04-18gl_shader_gen: Support vertical/horizontal viewport flipping. (#347)bunnei4-5/+29
* gl_shader_gen: Support vertical/horizontal viewport flipping. * fixup! gl_shader_gen: Support vertical/horizontal viewport flipping.
2018-04-18GLCache: Added boilerplate code to make supporting configurable texture component types.Subv3-9/+69
For now only the UNORM type is supported.
2018-04-18GLCache: Unify texture and framebuffer formats when converting to OpenGL.Subv2-26/+13
2018-04-18GPU: Texture format 8 and framebuffer format 0xD5 are actually ABGR8.Subv2-10/+10
2018-04-18GPU: Pitch textures are now supported, don't assert when encountering them.Subv1-2/+3
2018-04-18GLCache: Take into account the texture's block height when caching and unswizzling.Subv3-43/+43
2018-04-18GLCache: Added a function to convert cached PixelFormats back to texture formats.Subv1-0/+12
TODO: The way we handle cached formats must change, framebuffer and texture formats are too different to keep them in the same place.
2018-04-18GPU: Allow using a configurable block height when unswizzling textures.Subv4-7/+23
2018-04-18GPU/TIC: Added the pitch and block height fields to the TIC structure.Subv1-1/+16
2018-04-18gl_rasterizer_cache: Add missing LOG statements.bunnei1-0/+3
2018-04-18texture: Add missing formats.bunnei1-1/+3
2018-04-18gpu: Add several framebuffer formats to RenderTargetFormat.bunnei1-0/+3
2018-04-18maxwell3d: Allow Texture2DNoMipmap as Texture2D.bunnei1-1/+2
2018-04-18shader_bytecode: Make ctor's constexpr and explicit.bunnei1-7/+7
2018-04-18renderer_opengl: Implement BlendEquation and BlendFunc.bunnei6-7/+140
2018-04-17gl_shader_decompiler: Fix warnings with MarkAsUsed.bunnei1-1/+2
2018-04-17gl_shader_decompiler: Cleanup logging, updating to NGLOG_*.bunnei1-24/+22
2018-04-17gl_shader_decompiler: Implement several MUFU subops and abs_d.bunnei1-7/+21
2018-04-17gl_shader_decompiler: Fix swizzle in GetRegister.bunnei1-1/+1
2018-04-17gl_shader_decompiler: Implement FMUL/FADD/FFMA immediate instructions.bunnei2-12/+53
2018-04-17gl_shader_decompiler: Allow vertex position to be used in fragment shader.bunnei2-16/+18
2018-04-17gl_shader_decompiler: Implement IPA instruction.bunnei1-0/+11
2018-04-17gl_shader_decompiler: Add support for TEXS instruction.bunnei2-12/+43
2018-04-17gl_shader_decompiler: Use fragment output color for GPR 0-3.bunnei1-0/+5
2018-04-17gl_shader_decompiler: Partially implement MUFU.bunnei1-2/+11
2018-04-17MaxwellToGL: Implemented tex wrap mode 1 (Wrap, GL_REPEAT).Subv1-0/+2
2018-04-17MaxwellToGL: Added a TODO and partial implementation of maxwell wrap mode 4 (Clamp, GL_CLAMP).Subv1-0/+5
This clamp mode was removed from OpenGL as of 3.1, we can emulate it by using GL_CLAMP_TO_BORDER to get the border color of the texture, and then manually sampling the edge to mix them in the fragment shader.
2018-04-17gl_rendering: Use NGLOG* for changed code.bunnei2-10/+11
2018-04-17gl_rasterizer: Implement indexed vertex mode.bunnei5-23/+92
2018-04-15GPU: Use the same buffer names in the generated GLSL and the buffer uploading code.Subv4-17/+24
2018-04-15GPU: Don't use explicit binding points when uploading the constbuffers to opengl.Subv3-7/+47
The bindpoints will now be dynamically calculated based on the number of buffers used by the previous shader stage.
2018-04-15GPU: Don't use GetPointer when uploading the constbuffer data to the GPU.Subv1-3/+4
2018-04-15GPU: Use the buffer hints from the shader decompiler to upload only the necessary const buffers for each shader stage.Subv3-31/+41
2018-04-15shaders: Expose hints about used const buffers.bunnei5-31/+146
2018-04-15GPU: Upload the entirety of each constbuffer for each shader stage as SSBOs.Subv4-14/+48
We're going to need the shader generator to give us a mapping of the actual used const buffers to properly bind them to the shader.
2018-04-15GPU: Allow configuring ssbos in the opengl state manager.Subv4-0/+30
2018-04-15GPU: Added a function to determine whether a shader stage is enabled or not.Subv3-3/+27
2018-04-15shaders: Add NumTextureSamplers const, remove unused #pragma.bunnei4-4/+5
2018-04-14shaders: Address PR review feedback.bunnei2-7/+9
2018-04-14gl_shader_decompiler: Cleanup log statements.bunnei1-15/+15
2018-04-14shaders: Fix GCC and clang build issues.bunnei3-5/+5
2018-04-14gl_shader_decompiler: Implement negate, abs, etc. and lots of cleanup.bunnei2-40/+96
2018-04-14shader_bytecode: Add FSETP and KIL to GetInfo.bunnei1-0/+3
2018-04-14shader_bytecode: Add SubOp decoding.bunnei1-0/+10
2018-04-14gl_shader_decompiler: Add shader stage hint.bunnei2-5/+12
2018-04-14renderer_opengl: Fix Morton copy byteswap, etc.bunnei2-6/+6
2018-04-14gl_shader_manager: Implement SetShaderSamplerBindings.bunnei1-0/+8
2018-04-14gl_rasterizer: Generate shaders and upload uniforms.bunnei2-32/+77
2018-04-14gl_shader_decompiler: Basic impl. for very simple vertex shaders.bunnei2-16/+311
- Tested with Puyo Puyo Tetris and Cave Story+
2018-04-14gl_shader_manager: Cleanup and consolidate uniform handling.bunnei2-26/+24
2018-04-14maxwell_3d: Make memory_manager public.bunnei1-2/+1
2018-04-14maxwell_3d: Fix shader_config decodings.bunnei1-6/+3
2018-04-14gl_rasterizer: Use shader program manager, remove test shader.bunnei2-196/+31
2018-04-14renderer_opengl: Add gl_shader_manager class.bunnei3-0/+209
2018-04-14maxwell_to_gl: Add a few types, etc.bunnei1-0/+10
2018-04-14gl_shader_gen: Add hashable setup/config structs.bunnei2-29/+50
2018-04-14gl_shader_util: Add missing includes.bunnei1-0/+2
2018-04-14renderer_opengl: Use OGLProgram instead of OGLShader.bunnei6-6/+6
2018-04-14gl_shader_util: Grab latest upstream.bunnei2-149/+74
2018-04-14gl_resource_manager: Grab latest upstream.bunnei1-30/+86
2018-04-14gl_shader_decompiler: Add skeleton code from Citra for shader analysis.bunnei2-44/+142
2018-04-14shader_bytecode: Add initial module for shader decoding.bunnei2-0/+298
2018-04-07Fix clang format issuesJames Rowe1-1/+1
2018-04-07GPU: Assert when finding a texture with a format type other than UNORM.Subv2-4/+16
2018-04-07GL: Set up the textures used for each draw call.Subv2-2/+39
Each Maxwell shader stage can have an arbitrary number of textures, but we're limited to a certain number in OpenGL. We try to only use the minimum amount of host textures by not keeping a 1:1 relation between guest texture ids and host texture ids, ie, guest texture id 8 can be host texture id 0 if it's the only texture used in the guest shader program. This mapping will have to be passed to the shader decompiler so it can rewrite the texture accesses.
2018-04-07GL: Bind the textures to the shaders used for drawing.Subv1-2/+11
2018-04-07GLCache: Specialize the MortonCopy function for the DXT1 texture format.Subv1-1/+15
It will now use the UnswizzleTexture function instead of the MortonCopyPixels128, which doesn't seem to work for textures.
2018-04-07GLCache: Implemented GetTextureSurface.Subv1-3/+28
2018-04-07GLCache: Support uploading compressed textures to the GPU.Subv1-5/+17
Compressed texture formats like DXT1, DXT2, DXT3, etc will use this to ease the load on the CPU.
2018-04-07GL: Remove remaining references to 3DS-specific pixel formatsSubv1-83/+22
2018-04-07RasterizerCache: Remove 3DS-specific pixel formats.Subv2-71/+32
We're only left with RGB8 and DXT1 for now. More will be added as they are needed.
2018-04-07GL: Create the sampler objects when starting up the GL rasterizer.Subv1-0/+6
2018-04-07GL: Ported the SamplerInfo struct from citra.Subv2-1/+59
2018-04-07GL: Rename PicaTexture to MaxwellTexture.Subv2-2/+2
2018-04-07GL: Added functions to convert Maxwell tex filters and wrap modes to OpenGL.Subv1-0/+23
2018-04-07Textures: Added a helper function to know if a texture is blocklinear or pitch.Subv1-0/+5
2018-04-04rasterizer_interface.h: Update from citra to yuzuN00byKing1-3/+3
2018-04-04gl_rasterizer_cache.cpp: Update from citra to yuzuN00byKing1-1/+1
2018-04-04gl_rasterizer_cache.h: Update from citra to yuzuN00byKing1-3/+3
2018-04-04renderer_opengl.h: Update from citra to yuzuN00byKing1-2/+2
2018-04-01GPU: Use the MacroInterpreter class to execute the GPU macros instead of HLEing them.Subv2-121/+13
2018-04-01GPU: Implemented a gpu macro interpreter.Subv5-0/+431
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.
2018-03-27renderer_opengl: Use better naming for DrawScreens and DrawSingleScreen.bunnei2-8/+8
2018-03-27gl_rasterizer: Move code to bind framebuffer surfaces before draw to its own function.bunnei2-22/+31
2018-03-27gl_rasterizer: Add a SyncViewport method.bunnei3-18/+30
2018-03-27gl_rasterizer: Move PrimitiveTopology check to MaxwellToGL.bunnei2-11/+12
2018-03-27graphics_surface: Fix merge conflicts.bunnei1-0/+1
2018-03-27gl_rasterizer: Use ReadBlock instead of GetPointer for SetupVertexArray.bunnei1-1/+1
2018-03-27gl_rasterizer: Normalize vertex array data as appropriate.bunnei2-1/+5
2018-03-27maxwel_to_gl: Fix string formatting in log statements.bunnei1-2/+2
2018-03-27rasterizer: Rename DrawTriangles to DrawArrays.bunnei3-5/+5
2018-03-27gl_rasterizer: Use passthrough shader for SetupVertexShader.bunnei1-1/+2
2018-03-27renderer_opengl: Logging, etc. cleanup.bunnei6-33/+34
2018-03-27renderer_opengl: Remove framebuffer RasterizerFlushVirtualRegion hack.bunnei1-5/+0
2018-03-27gl_rasterizer_cache: Implement UpdatePagesCachedCount.bunnei2-8/+37
2018-03-27gl_rasterizer: Implement SetupVertexArray.bunnei1-20/+38
2018-03-27gl_rasterizer_cache: Fix an ASSERT_MSG.bunnei1-1/+1
2018-03-27maxwell_to_gl: Add module and function for decoding VertexType.bunnei2-0/+41
2018-03-27maxwell_3d: Use names that match envytools for VertexType.bunnei1-8/+8
2018-03-27maxwell_3d: Add VertexAttribute struct and cleanup.bunnei1-121/+160
2018-03-27gl_rasterizer: Use 32 texture units instead of 3.bunnei3-2/+3
2018-03-27gl_rasterizer: Implement DrawTriangles.bunnei1-1/+194
2018-03-27Maxwell3D: Call AccelerateDrawBatch on DrawArrays.bunnei1-1/+8
2018-03-27gl_rasterizer: Implement AnalyzeVertexArray.bunnei2-1/+56
2018-03-27gl_rasterizer_cache: MortonCopy Switch-style.bunnei1-72/+32
2018-03-27gl_rasterizer_cache: Implement GetFramebufferSurfaces.bunnei2-4/+104
2018-03-27maxwell: Add RenderTargetFormat enum.bunnei2-4/+5
2018-03-27renderer_opengl: Only draw the screen if a framebuffer is specified.bunnei1-6/+7
2018-03-26GPU: Load the sampler info (TSC) when retrieving active textures.Subv2-21/+67
2018-03-26GPU: Added the TSC structure. It contains information about the sampler.Subv1-0/+50
2018-03-26GPU: Added more fields to the TIC structure.Subv1-4/+30
2018-03-25GPU: Make the debug_context variable a member of the frontend instead of a global.Subv3-15/+13
2018-03-24GPU: Added a function to retrieve the active textures for a shader stage.Subv2-50/+59
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.
2018-03-24Frontend: Updated the surface view debug widget to work with Maxwell surfaces.Subv2-0/+15
2018-03-24GPU: Implement the Incoming/FinishedPrimitiveBatch debug breakpoints.Subv1-0/+7
2018-03-24GPU: Implement the MaxwellCommandLoaded/Processed debug breakpoints.Subv1-0/+10
2018-03-24Frontend: Ported the GPU breakpoints and surface viewer widgets from citra.Subv5-0/+242
2018-03-24GPU: Added a method to unswizzle a texture without decoding it.Subv4-5/+95
Allow unswizzling of DXT1 textures.
2018-03-24GPU: Preliminary work for texture decoding.Subv5-0/+139
2018-03-24GPU: Added viewport registers to Maxwell3D's reg structure.Subv1-1/+18
2018-03-24gl_rasterizer: Fake render in green, because it's cooler.bunnei1-1/+1
2018-03-24gl_rasterizer: Log warning instead of sync'ing unimplemented funcs.bunnei1-7/+1
2018-03-23gl_rasterizer_cache: Add missing include for vm_manager.bunnei1-0/+1
2018-03-23renderer_opengl: Only invalidate the framebuffer region, not flush.bunnei1-4/+3
2018-03-23renderer_opengl: Fixes for properly flushing & rendering the framebuffer.bunnei1-6/+12
2018-03-23RasterizerCacheOpenGL: FlushAll should flush full memory region.bunnei1-1/+1
2018-03-23rasterizer: Flush and invalidate regions should be 64-bit.bunnei3-9/+9
2018-03-23renderer_opengl: Add framebuffer_transform_flags member variable.bunnei1-2/+2
2018-03-23renderer_opengl: Better handling of framebuffer transform flags.bunnei2-3/+20
2018-03-23renderer_opengl: Use accelerated framebuffer load with LoadFBToScreenInfo.bunnei1-31/+25
2018-03-23gl_rasterizer: Implement AccelerateDisplay method from Citra.bunnei2-2/+44
2018-03-23LoadGLBuffer: Use bytes_per_pixel, not bits.bunnei1-1/+2
2018-03-23gl_rasterizer_cache: LoadGLBuffer should do a morton copy.bunnei1-16/+5
2018-03-23video_core: Move MortonCopyPixels128 to utils header.bunnei2-111/+113
2018-03-23video_core: Remove usage of PAddr and replace with VAddr.bunnei5-39/+39
2018-03-23video_core: Move FramebufferInfo to FramebufferConfig in GPU.bunnei7-66/+74
2018-03-23gl_rasterizer: Replace a bunch of UNIMPLEMENTED with ASSERT.bunnei2-20/+20
2018-03-23gl_rasterizer: Add a simple passthrough shader in lieu of shader generation.bunnei2-5/+68
2018-03-23gpu: Expose Maxwell3D engine.bunnei1-0/+4
2018-03-23maxwell_3d: Add some format decodings and string helper functions.bunnei1-3/+107
2018-03-23renderer: Create rasterizer and cleanup.bunnei4-4/+16
2018-03-21GPU: Added vertex attribute format registers.Subv1-1/+14
2018-03-21GPU: Added registers for the number of vertices to render.Subv1-2/+13
2018-03-20renderer_gl: Port boilerplate rasterizer code over from Citra.bunnei5-1/+495
2018-03-20gl_shader_util: Sync latest version with Citra.bunnei3-46/+116
2018-03-20renderer_gl: Port over gl_shader_gen module from Citra.bunnei3-0/+88
2018-03-20renderer_gl: Port over gl_shader_decompiler module from Citra.bunnei3-0/+87
2018-03-20renderer_gl: Port over gl_rasterizer_cache module from Citra.bunnei3-0/+1714
2018-03-20gl_resource_manager: Sync latest version with Citra.bunnei1-8/+77
2018-03-20renderer_gl: Port over gl_stream_buffer module from Citra.bunnei3-0/+218
2018-03-20gl_state: Sync latest version with Citra.bunnei2-47/+111
2018-03-19GPU: Added Z buffer registers to Maxwell3D's reg structure.Subv1-1/+17
2018-03-19GPU: Added the render target (RT) registers to Maxwell3D's reg structure.Subv1-1/+32
2018-03-19Clang FixesN00byKing1-1/+2
2018-03-19Clean Warnings (?)N00byKing1-1/+1
2018-03-19GPU: Added the TSC registers to the Maxwell3D register structure.Subv1-1/+15
2018-03-19GPU: Added the TIC registers to the Maxwell3D register structure.Subv1-1/+16
2018-03-19GPU: Implement macro 0xE1A BindTextureInfoBuffer in HLE.Subv2-1/+29
This macro simply sets the current CB_ADDRESS to the texture buffer address for the input shader stage.
2018-03-18GPU: Implement the BindStorageBuffer macro method in HLE.Subv2-1/+36
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.
2018-03-18GPU: Handle writes to the CB_DATA method.Subv2-0/+39
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.
2018-03-18GPU: Move the GPU's class constructor and destructors to a cpp file.Subv3-10/+30
This should reduce recompile times when editing the Maxwell3D register structure.
2018-03-18GPU: Store uploaded GPU macros and keep track of the number of method parameters.Subv4-27/+74
2018-03-18GPU: Macros are specific to the Maxwell3D engine, so handle them internally.Subv8-63/+55
2018-03-18GPU: Renamed ShaderType to ShaderStage as that is less confusing.Subv2-19/+19
2018-03-18GPU: Store shader constbuffer bindings in the GPU state.Subv2-5/+61
2018-03-18GPU: Corrected some register offsets and removed superfluous macro registers.Subv1-9/+3
2018-03-18GPU: Make the SetShader macro call do the same as the real macro's code.Subv2-3/+44
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[]).
2018-03-17GPU: Corrected the parameter documentation for the SetShader macro call.Subv2-11/+12
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.
2018-03-17GPU: Handle the SetShader method call (0xE24) and store the shader config.Subv2-4/+38
2018-03-17GPU: Added the vertex array registers.Subv1-2/+33
2018-03-17GPU: Process command mode 5 (IncreaseOnce) differently from other commands.Subv9-8/+97
Accumulate all arguments before calling the desired method. Note: Maybe we should do the same for the NonIncreasing mode?
2018-03-17GPU: Assert that we get a 0 CODE_ADDRESS register in the 3D engine.Subv1-0/+8
Shader address calculation depends on this value to some extent, we do not currently know what it being 0 entails.
2018-03-17GPU: Added Maxwell registers for Shader Program control.Subv1-2/+55
2018-03-05GPU: Intercept writes to the VERTEX_END_GL register.Subv2-1/+18
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.
2018-02-14maxwell_3d: Make constructor explicitLioncash1-1/+1
2018-02-12GPU: Partially implemented the QUERY_* registers in the Maxwell3D engine.Subv3-3/+95
Only QueryMode::Write is supported at the moment.
2018-02-12Make a GPU class in VideoCore to contain the GPU state.Subv12-44/+252
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.Subv9-0/+280
2018-02-12renderer_opengl: Support framebuffer flip vertical.bunnei3-5/+13
2018-01-27memory: Replace all memory hooking with Special regionsMerryMage1-1/+1
2018-01-21Format: Run the new clang format on everythingJames Rowe4-4/+4
2018-01-18CMakeLists: Derive the source directory grouping from targets themselvesLioncash1-19/+15
Removes the need to store to separate SRC and HEADER variables, and then construct the target in most cases.
2018-01-16clang-formatMerryMage1-1/+2
2018-01-15renderer_gl: Clear screen to black before rendering framebuffer.bunnei2-5/+8
2018-01-15renderer: Render previous frame when no new one is available.bunnei3-16/+18
2018-01-13Fix build on macOS and linuxMerryMage1-0/+1
2018-01-13Remove gpu debugger and get yuzu qt to compileJames Rowe2-5/+0
2018-01-13Remove references to PICA and rasterizers in video_coreJames Rowe64-14952/+3
2018-01-12renderer_opengl: Fix LOG_TRACE in LoadFBToScreenInfo.bunnei1-1/+1
2018-01-11renderer_opengl: Support rendering Switch framebuffer.bunnei3-138/+83
2018-01-11render_base: Add a struct describing framebuffer metadata.bunnei1-0/+26
2018-01-11renderer_opengl: Add MortonCopyPixels function for Switch framebuffer.bunnei1-0/+111
2018-01-11renderer_opengl: Update DrawScreens for Switch.bunnei2-23/+11
2018-01-01core/video_core: Fix a bunch of u64 -> u32 warnings.bunnei4-8/+8
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-30Fixed type conversion ambiguityHuw Pascoe2-3/+3
2017-09-27Disable unary operator- on Math::Vec2/Vec3/Vec4 for unsigned types.Subv1-1/+1
It is unlikely we will ever use this without first doing a Cast to a signed type. Fixes 9 "unary minus operator applied to unsigned type, result still unsigned" warnings on MSVC2017.3
2017-09-25Optimized Float<M,E> multiplicationHuw Pascoe1-11/+7
Before: ucomiss xmm1, xmm1 jp .L9 pxor xmm2, xmm2 mov edx, 1 ucomiss xmm0, xmm2 setp al cmovne eax, edx test al, al jne .L9 .L3: movaps xmm0, xmm2 ret .L9: ucomiss xmm0, xmm0 jp .L10 pxor xmm2, xmm2 mov edx, 1 ucomiss xmm1, xmm2 setp al cmovne eax, edx test al, al je .L3 After: movaps xmm2, xmm1 mulss xmm2, xmm0 ucomiss xmm2, xmm2 jnp .L3 ucomiss xmm1, xmm0 jnp .L11 .L3: movaps xmm0, xmm2 ret .L11: pxor xmm2, xmm2 jmp .L3
2017-09-24Optimized MortonHuw Pascoe1-10/+4
2017-09-23Remove pipeline.gpu_mode and fix minor issuesJames Rowe1-12/+2
2017-09-17Improved performance of FromAttributeBufferHuw Pascoe1-1/+2
Ternary operator is optimized by the compiler whereas std::min() is meant to return a value. I've noticed a 5%-10% emulation speed increase.
2017-09-17Fixed framebuffer warningHuw Pascoe1-7/+18
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-09-03pica/lighting: only apply Fresnel factor for the last lightwwylele2-7/+9
2017-08-31video_core: report telemetry for gas modewwylele1-0/+6
2017-08-26Warnings: Fixed a few missing-return warnings in video_core.Subv3-6/+10
2017-08-25SwRasterizer/Clipper: flip the sign convention to match PICA and OpenGLwwylele1-9/+9
2017-08-25gl_rasterizer: implement custom clip planewwylele3-34/+83
2017-08-24SwRasterizer: implement custom clip planewwylele2-4/+25
2017-08-22gl_rasterizer/lighting: more accurate CP formulawwylele1-2/+2
2017-08-22SwRasterizer/Lighting: implement LUT input CPwwylele1-0/+11
2017-08-22SwRasterizer/Lighting: implement bump mappingwwylele3-8/+27
2017-08-21swrasterizer: remove invalid TODOwwylele1-4/+2
This function is called in clipping, before the pespective divide, and is not used in later rasterization. Thus it doesn't need perspective correction.
2017-08-21swrasterizer/clipper: remove tested TODOwwylele1-4/+0
hwtested. Current implementation is the correct behavior
2017-08-21gl_shader_gen: simplify and clarify the depth transformation between vertex shader and fragment shaderwwylele1-2/+5
2017-08-21gl_rasterizer: add clipping plane z<=0 defined in PICAwwylele4-0/+21
2017-08-19pica/command_processor: build geometry pipeline and run geometry shaderwwylele6-28/+383
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-19pica/shader/jit: implement SETEMIT and EMITwwylele2-2/+49
2017-08-19pica/primitive_assembly: Handle winding for GS primitivewwylele2-3/+19
hwtest shows that, although GS always emit a group of three vertices as one primitive, it still respects to the topology type, as if the three vertices are input into the primitive assembler independently and sequentially. It is also shown that the winding flag in SETEMIT only takes effect for Shader topology type, which is believed to be the actual difference between List and Shader (hence removed the TODO). However, only Shader topology type is observed in official games when GS is in use, so the other mode seems to be just unintended usage.
2017-08-19correct constnesswwylele2-2/+4
2017-08-19pica/shader/interpreter: implement SETEMIT and EMITwwylele1-0/+16
2017-08-19pica/shader: extend UnitState for GSwwylele2-0/+84
Among four shader units in pica, a special unit can be configured to run both VS and GS program. GSUnitState represents this unit, which extends UnitState (which represents the other three normal units) with extra state for primitive emitting. It uses lots of raw pointers to represent internal structure in order to keep it standard layout type for JIT to access. This unit doesn't handle triangle winding (inverting) itself; instead, it calls a WindingSetter handler. This will be explained in the following commits
2017-08-11gl_shader_gen: don't call SampleTexture when bump map is not usedwwylele1-4/+5
2017-08-11SwRasterizer/Lighting: implement spot lightwwylele1-3/+19
2017-08-11SwRasterizer/Lighting: implement geometric factorwwylele1-4/+16
2017-08-10SwRasterizer/Lighting: use make_tuple instead of constructorwwylele1-1/+1
implicit tuple constructor is a c++17 thing, which is not supported by some not-so-old libraries. Play safe for now
2017-08-10pica/regs: layout geometry shader configuration regswwylele2-2/+39
All the register meanings are derived from ctrulib (3dbrew is outdated for most of them)
2017-08-07pica: upload shared shader code to both unitwwylele2-26/+45
2017-08-03SwRasterizer/Lighting: shorten file namewwylele4-4/+4
2017-08-02SwRasterizer/Lighting: move to its own filewwylele4-240/+271
2017-08-02SwRasterizer/Lighting: reduce confusionwwylele1-1/+1
2017-08-02SwRasterizer/Lighting: move quaternion normalization to the callerwwylele1-3/+3
2017-07-27pica/shader_interpreter: fix off-by-one in LOOPwwylele1-1/+1
2017-07-18telemetry: Log performance, configuration, and system data.bunnei2-6/+16
2017-07-11SwRasterizer/Lighting: dist atten lut input need to be clampwwylele1-1/+1
2017-07-11SwRasterizer/Lighting: unify float suffixwwylele1-11/+13
2017-07-11SwRasterizer/Lighting: get rid of nested returnwwylele1-10/+11
2017-07-11SwRasterizer/Lighting: refactor GetLutValue into a function.wwylele1-83/+27
merging similar pattern. Also makes the code more similar to the gl one
2017-07-11SwRasterizer: only interpolate quat and view when lighting is enabledwwylele1-14/+14
2017-07-11SwRasterizer/Lighting: pass lighting state as parameterwwylele1-13/+13
2017-07-11SwRasterizer/Lighting: Move the clamp highlight calculation to the end of the per-light loop body.Subv1-17/+17
2017-07-11SwRasterizer/Lighting: Move the lighting enable check outside the ComputeFragmentsColors function.Subv1-7/+6
2017-07-11SwRasterizer/Lighting: Do not use global registers state in ComputeFragmentsColors.Subv1-3/+3
2017-07-11SwRasterizer/Lighting: Do not use global state in LookupLightingLut.Subv2-13/+22
2017-07-11SwRasterizer/Lighting: Fixed a bug where the distance attenuation bias was being set to the dist atten scale.Subv1-3/+2
2017-07-11SwRasterizer: Fixed a few conversion warnings and moved per-light values into the per-light loop.Subv1-5/+6
2017-07-11SwRasterizer: Run clang-formatSubv1-45/+83
2017-07-11SwRasterizer: Flip the vertex quaternions before clipping (if necessary).Subv2-20/+15
2017-07-11SwRasterizer: Corrected the light LUT lookups.Subv1-6/+7
2017-07-11SwRasterizer: Corrected the light LUT lookups.Subv1-33/+43
2017-07-11SwRasterizer: Fixed the lighting lut lookup function.Subv1-2/+4
2017-07-11SwRasterizer: Calculate fresnel for fragment lighting.Subv1-1/+25
2017-07-11SwRasterizer: Calculate specular_1 for fragment lighting.Subv1-3/+59
2017-07-11SwRasterizer: Calculate specular_0 for fragment lighting.Subv1-13/+94
2017-07-11SwRasterizer: Implement primary fragment color.Subv1-4/+113
2017-07-01gl_rasterizer: use texture buffer for proctex LUTwwylele5-70/+80
2017-06-22gl_rasterizer: use texture buffer for fog LUTwwylele7-29/+32
2017-06-22gl_rasterizer: create the texture before applying the statewwylele1-2/+2
this is a rebasing error from #2792. It doesn't affect much though, because the later more Apply() call fixes/hides it
2017-06-21gl_state: reset 1d textureswwylele1-0/+14
2017-06-21gl_rasterizer: fix glGetUniformLocation typewwylele1-8/+8
2017-06-21gl_rasterizer: manage texture ids in one placewwylele3-31/+55
2017-06-21gl_rasterizer/lighting: fix LUT interpolationwwylele7-116/+102
2017-06-18gl_rasterizer/lighting: use the formula from the paper for germetic factorwwylele1-8/+8
2017-06-17Stop using reserved operator names (and/or/xor) with XbyakYuri Kunde Schlesner1-13/+13
Also has the Dynarmic upgrade with the same change
2017-06-15gl_rasterizer/lighting: implement geometric factorwwylele3-1/+20
2017-06-11gl_rasterizer/lighting: Implement tangent mappingwwylele1-7/+12
2017-06-11gl_rasterizer/lighting: implement lut input 5 (CP)wwylele2-3/+26
2017-06-10gl_rasterizer_cache: depth write is disabled if allow_depth_stencil_write is falsewwylele1-4/+5
2017-06-10OpenGL: Update comment on AreQuaternionsOpposite with new informationYuri Kunde Schlesner1-8/+11
While debugging the software renderer implementation, it was noticed that this is actually exactly what the hardware does, upgrading the status of this "hack" to being a proper implementation. And there was much rejoicing.
2017-06-04pica/rasterizer: implement/stub texture wrap mode 4-7wwylele4-12/+48
2017-05-30gl_rasterizer: implement spot lightwwylele1-6/+24
2017-05-30gl_rasterizer: sync spot light statuswwylele4-2/+61
2017-05-30pica: prepare registers for spotlightwwylele1-20/+43
2017-05-29swrasterizer: implement TextureCubewwylele1-2/+51
2017-05-29pica: add registers for texture cubewwylele1-1/+26
2017-05-28CMake: Create INTERFACE targets for microprofile and nihstroYuri Kunde Schlesner1-1/+1
2017-05-28CMake: Use IMPORTED target for libpngYuri Kunde Schlesner1-3/+2
2017-05-28CMake: Correct inter-module dependencies and library visibilityYuri Kunde Schlesner1-5/+7
Modules didn't correctly define their dependencies before, which relied on the frontends implicitly including every module for linking to succeed. Also changed every target_link_libraries call to specify visibility of dependencies to avoid leaking definitions to dependents when not necessary.
2017-05-28Move screen size constants from video_core to coreYuri Kunde Schlesner2-27/+8
video_core didn't even properly use them, and they were the source of many otherwise-unnecessary dependencies from core to video_core.
2017-05-28OpenGL: Remove unused RendererOpenGL fieldsYuri Kunde Schlesner2-11/+2
2017-05-27OpenGL: Improve accuracy of quaternion interpolationYuri Kunde Schlesner1-3/+5
Current order of operations (rotate then normalize) seems to produce a lot more distortion than normalizing and then rotating. This makes Citra results match pretty closesly with hardware, and indicates that hardware may also be using lerp instead of slerp to interpolate the quaternions.
2017-05-27gl_shader: refactor texture sampler into its own functionwwylele1-40/+39
2017-05-21swrasterizer: add missing tc0_w and fragment lighting attribute processingwwylele2-5/+8
2017-05-20gl_rasterizer: implement procedural texturewwylele6-7/+600
2017-05-20pica/swrasterizer: implement procedural texturewwylele8-4/+438
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-16pica: correct bit field length for some registerswwylele4-17/+25
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-05-11Pica: Set program code / swizzle data limit to 4096Jannik Vogel5-13/+16
One of the later commits will enable writing to GS regs. It turns out that on startup, most games will write 4096 GS program words. The current limit of 1024 would hence result in 3072 (4096 - 1024) error messages: ``` HW.GPU <Error> video_core/shader/shader.cpp:WriteProgramCode:229: Invalid GS program offset 1024 ``` New constants have been introduced to represent these limits. The swizzle data size has also been raised. This matches the given field sizes of [GPUREG_SH_OPDESCS_INDEX](https://3dbrew.org/wiki/GPU/Internal_Registers#GPUREG_SH_OPDESCS_INDEX) and [GPUREG_SH_CODETRANSFER_INDEX](https://www.3dbrew.org/wiki/GPU/Internal_Registers#GPUREG_SH_CODETRANSFER_INDEX) (12 bit = [0; 4095]).
2017-05-05pica: shader_dirty if texture2 coord changedwwylele5-7/+12
2017-05-03pica: use correct coordinates for texture 2wwylele4-5/+22
2017-04-20gl_shader_gen: remove TODO about Lerp behaviour verification. The implementation is verified against hardwarewwylele1-2/+0
2017-04-19rasterizer: implement combiner operation 7 (Dot3_RGBA)wwylele4-20/+39
2017-04-17OpenGL: Pass Pica regs via parameterYuri Kunde Schlesner3-7/+5
2017-04-17OpenGL: Move PicaShaderConfig to gl_shader_gen.hYuri Kunde Schlesner4-202/+206
Also move the implementation of CurrentConfig to the cpp file.
2017-04-17OpenGL: Move Attributes enum to a more appropriate fileYuri Kunde Schlesner3-12/+11
2017-04-08Pica/Regs: Correct bit width for blend-equationsJannik Vogel1-2/+2
2017-03-01Input: remove unused stuff & clean upwwylele1-0/+1
1. removed zl, zr and c-stick from HID::PadState. They are handled by IR, not HID 2. removed button handling in EmuWindow 3. removed key_map 4. cleanup #include
2017-02-27Doxygen: Amend minor issues (#2593)Mat M3-3/+5
Corrects a few issues with regards to Doxygen documentation, for example: - Incorrect parameter referencing. - Missing @param tags. - Typos in @param tags. and a few minor other issues.
2017-02-27Core: Re-write frame limiterYuri Kunde Schlesner1-3/+3
Now based on std::chrono, and also works in terms of emulated time instead of frames, so we can in the future frame-limit even when the display is disabled, etc. The frame limiter can also be enabled along with v-sync now, which should be useful for those with displays running at more than 60 Hz.
2017-02-27Core: Make PerfStats internally lockedYuri Kunde Schlesner1-8/+2
More ergonomic to use and will be required for upcoming changes.
2017-02-27Remove built-in (non-Microprofile) profilerYuri Kunde Schlesner1-8/+0
2017-02-27Add performance statistics to status barYuri Kunde Schlesner1-0/+9
2017-02-18OpenGL: Check if uniform block exists before updating it (#2581)Jannik Vogel1-29/+30
2017-02-15video_core: remove #pragma once in cpp file (#2570)Weiyi Wang2-4/+0
2017-02-13SWRasterizer: Move more framebuffer functions to fileYuri Kunde Schlesner3-100/+105
2017-02-13SWRasterizer: Move texturing functions to their own fileYuri Kunde Schlesner4-210/+259
2017-02-13SWRasterizer: Convert large no-capture lambdas to standalone functionsYuri Kunde Schlesner1-315/+310
2017-02-13SWRasterizer: Move framebuffer operation functions to their own fileYuri Kunde Schlesner4-236/+285
2017-02-13VideoCore: Move software rasterizer files to sub-directoryYuri Kunde Schlesner8-12/+12
2017-02-12video_core/shader: Document sanitized MUL operationYuri Kunde Schlesner1-0/+8
2017-02-11video_core: Fix benign out-of-bounds indexing of array (#2553)Yuri Kunde Schlesner1-2/+1
The resulting pointer wasn't written to unless the index was verified as valid, but that's still UB and triggered debug checks in MSVC. Reported by garrettboast on IRC
2017-02-09VideoCore: Split u64 Pica reg unions into 2 separate u32 unionsYuri Kunde Schlesner1-36/+42
This eliminates UB when aliasing it with the array of u32 regs, and is compatible with non-LE architectures.
2017-02-09VideoCore: Force enum sizes to u32 in LightingRegsYuri Kunde Schlesner1-4/+4
All enums that are used with BitField must have their type forced to u32 to ensure correctness.
2017-02-09OpenGL: Remove unused duplicate of IsPassThroughTevStageYuri Kunde Schlesner1-12/+0
This copy was left behind when the shader generation code was moved to a separate file.
2017-02-09VideoCore: Split regs.h inclusionsYuri Kunde Schlesner13-24/+45
2017-02-09Pica/Regs: Use binary search to look up reg namesYuri Kunde Schlesner2-15/+10
This gets rid of the static unordered_map. Also changes the return type const char*, avoiding unnecessary allocations (the result was only used by calling .c_str() on it.)
2017-02-09VideoCore: Use union to index into Regs structYuri Kunde Schlesner2-46/+28
Also remove some unused members.
2017-02-05Use std::array<u8,2> instead of u8[2] to fix MSVC buildLectem1-1/+1
2017-02-04VideoCore: Move Regs to its own fileYuri Kunde Schlesner22-658/+679
2017-02-04VideoCore: Split shader regs from Regs structYuri Kunde Schlesner9-102/+116
2017-02-04VideoCore: Split geometry pipeline regs from Regs structYuri Kunde Schlesner9-264/+292
2017-02-04VideoCore: Split lighting regs from Regs structYuri Kunde Schlesner6-312/+341
2017-02-04VideoCore: Split framebuffer regs from Regs structYuri Kunde Schlesner10-445/+491
2017-02-04VideoCore: Split texturing regs from Regs structYuri Kunde Schlesner15-494/+532
2017-02-04VideoCore: Split rasterizer regs from Regs structYuri Kunde Schlesner13-187/+218
2017-02-04Pica/Texture: Move part of ETC1 decoding to new file and cleanupsYuri Kunde Schlesner4-110/+159
2017-02-04Pica/Texture: Simplify/cleanup texture tile addressingYuri Kunde Schlesner4-37/+111
2017-02-04VideoCore: Move LookupTexture out of debug_utils.hYuri Kunde Schlesner7-301/+340
2017-02-03ShaderJIT: add 16 dummy bytes at the bottom of the stackwwylele1-2/+5
2017-01-31Common/x64: remove legacy emitter and abi (#2504)Weiyi Wang1-1/+0
These are not used any more since we moved shader JIT to xbyak.
2017-01-31shader_jit_x64_compiler: esi and edi should be persistent (#2500)Merry1-0/+2
2017-01-30VideoCore: Make PrimitiveAssembler const-correctYuri Kunde Schlesner2-3/+4
2017-01-30VideoCore: Extract swrast-specific data from OutputVertexYuri Kunde Schlesner5-58/+64
2017-01-30VideoCore/Shader: Clean up OutputVertex::FromAttributeBufferYuri Kunde Schlesner2-10/+16
This also fixes a long-standing but neverthless harmless memory corruption bug, whech the padding of the OutputVertex struct would get corrupted by unused attributes.
2017-01-30VideoCore: Split shader output writing from semantic loadingYuri Kunde Schlesner3-24/+24
2017-01-30VideoCore: Consistently use shader configuration to load attributesYuri Kunde Schlesner6-44/+23
2017-01-30VideoCore: Use correct register for immediate mode attribute countYuri Kunde Schlesner2-7/+13
2017-01-30VideoCore: Rename some types to more accurate namesYuri Kunde Schlesner8-18/+18
2017-01-30VideoCore: Change misleading register namesYuri Kunde Schlesner4-8/+9
A few registers had names such as "count" or "number" when they actually contained the maximum (that is, count - 1). This can easily lead to hard to notice off by one errors.
2017-01-30video_core: gl_rasterizer_cache.cpp removed unused type aliasKloen1-1/+0
2017-01-30video_core: gl_rasterizer.cpp removed unused type aliasKloen1-2/+0
2017-01-29video_core: silence unused-local-typedef boost related warning on GCCKloen1-0/+7
2017-01-26VideoCore/Shader: Move entry_point to SetupBatchYuri Kunde Schlesner6-26/+27
2017-01-26VideoCore/Shader: Move per-batch ShaderEngine state into ShaderSetupYuri Kunde Schlesner6-44/+40
2017-01-26Shader: Remove OutputRegisters structYuri Kunde Schlesner4-22/+17
2017-01-26Shader: Initialize conditional_code in interpreterYuri Kunde Schlesner2-3/+3
This doesn't belong in LoadInputVertex because it also happens for non-VS invocations. Since it's not used by the JIT it seems adequate to initialize it in the interpreter which is the only thing that cares about them.
2017-01-26Shader: Don't read ShaderSetup from global stateYuri Kunde Schlesner1-3/+3
2017-01-26shader_jit_x64: Don't read program from global stateYuri Kunde Schlesner3-22/+22
2017-01-26VideoCore/Shader: Move ProduceDebugInfo to InterpreterEngineYuri Kunde Schlesner4-19/+10
2017-01-26VideoCore/Shader: Split interpreter and JIT into separate ShaderEnginesYuri Kunde Schlesner8-97/+153
2017-01-26VideoCore/Shader: Rename shader_jit_x64{ => _compiler}.{cpp,h}Yuri Kunde Schlesner4-4/+4
2017-01-26VideoCore/Shader: Split shader uniform state and shader engineYuri Kunde Schlesner4-21/+54
Currently there's only a single dummy implementation, which will be split in a following commit.
2017-01-26VideoCore/Shader: Add constness to methodsYuri Kunde Schlesner2-4/+4
2017-01-26VideoCore/Shader: Use only entry_point as ShaderSetup paramYuri Kunde Schlesner3-11/+13
This removes all implicit dependency of ShaderState on global PICA state.
2017-01-26VideoCore/Shader: Use self instead of g_state.vs in ShaderSetupYuri Kunde Schlesner2-11/+8
2017-01-26VideoCore/Shader: Extract input vertex loading code into functionYuri Kunde Schlesner3-22/+26
2017-01-23video_core: fix shader.cpp signed / unsigned warningKloen1-2/+2
2017-01-23video_core: gl_rasterizer float to int warningKloen1-1/+2
2017-01-23video_core: fix gl_rasterizer warning on MSVCKloen1-1/+1
2017-01-07config: Add option for specifying screen resolution scale factor.bunnei3-5/+10
2017-01-04Fix some warnings (#2399)Jonathan Hao1-2/+0
2016-12-25Minor cleanup in GLSL codeJannik Vogel1-3/+2
2016-12-25Offset lighting LUT samples correctlyJannik Vogel1-7/+7
2016-12-23core: Move emu_window and key_map into coreMerryMage2-2/+2
* Removes circular dependences (common should not depend on core)
2016-12-19Use GL_TRUE when setting color_maskAlbin Bernhardsson1-4/+4
2016-12-16VideoCore/Shader: Extract DebugData out from UnitStateYuri Kunde Schlesner8-103/+99
2016-12-16Remove unnecessary castYuri Kunde Schlesner1-3/+1
2016-12-16VideoCore/Shader: Extract evaluate_condition lambda to function scopeYuri Kunde Schlesner1-26/+24
2016-12-16VideoCore/Shader: Extract call lambda up a scope and remove unused paramYuri Kunde Schlesner1-21/+17
2016-12-16VideoCore/Shader: Remove dynamic control flow in (Get)UniformOffsetYuri Kunde Schlesner2-18/+11
2016-12-16VideoCore/Shader: Move DebugData to a separate fileYuri Kunde Schlesner4-172/+189
2016-12-15shader_jit_x64: Use LOOPCOUNT_REG as a 64-bit reg when indexingYuri Kunde Schlesner1-1/+1
2016-12-15VideoCore: Make profiling scope more representativeYuri Kunde Schlesner2-0/+15
2016-12-15VideoCore: Inline IsPicaTracingYuri Kunde Schlesner3-16/+15
Speeds up ALBW main menu slightly (~3%)
2016-12-15VideoCore: Eliminate an unnecessary copy in the drawcall loopYuri Kunde Schlesner3-5/+3
2016-12-15shader_jit_x64: Use Reg32 for LOOP* registers, eliminating castsYuri Kunde Schlesner1-16/+16
2016-12-15VideoCore: Convert x64 shader JIT to use Xbyak for assemblyYuri Kunde Schlesner3-223/+228
2016-12-11Add all services to the Service namespaceLioncash2-6/+7
Previously there was a split where some of the services were in the Service namespace and others were not.
2016-12-07OpenGL: Drop framebuffer completeness check.Markus Wick5-47/+8
This OpenGL call synchronize the worker thread of the nvidia blob. It can be verified on linux with the __GL_THREADED_OPTIMIZATIONS=1 environment variable. Those errors should not happen on tested drivers. It was used as a workaround for https://bugs.freedesktop.org/show_bug.cgi?id=94148
2016-12-06Implement Frame rate limiter (#2223)emmauss2-0/+2
* implement frame limiter * fixes
2016-12-05ASSERT that shader was linked successfullyJannik Vogel1-0/+2
2016-12-05Report shader uniform block size in case of mismatchJannik Vogel1-1/+3
2016-12-05Print broken shader code to logJannik Vogel1-3/+9
2016-12-04OpenGL: Non-zero stride only makes sense for linear buffersYuri Kunde Schlesner3-7/+11
2016-12-04OpenGL: Ensure framebuffer binding is restored if completion check failsYuri Kunde Schlesner1-10/+7
2016-12-04OpenGL: Fix DisplayTransfer accel when input width != output widthYuri Kunde Schlesner1-1/+10
Fixes #2246, #2261
2016-12-04shader_jit: Fix non-SSE4.1 path where FLR would not truncateJannik Vogel1-1/+1
2016-12-03clang-format: Fix coding styleYuri Kunde Schlesner1-1/+1
2016-12-02shader_jit: Load LOOPCOUNT_REG and LOOPINC 4 bit left-shiftedJannik Vogel1-6/+9
2016-11-30ClangFormat: Fixed the clang-format errorsSubv2-6/+10
2016-11-29Build: Fixed a few warnings.Subv2-7/+7
2016-11-27GPU: Remove the broken frame_skip option.Emmanuel Gil Peyrot1-4/+0
Fixes #1960.
2016-11-27RasterizerGL: Use GL_TRUE and 0xFF in the stencil and depth masks instead of simply true and -1Subv2-4/+4
2016-11-27Rasterizer/Memfill: Set the correct stencil write mask when clearing the stencil buffer.Subv1-1/+1
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-11-19Minor formatting changeJames Rowe1-1/+1
2016-11-05Add default hotkey to swap primary screens.James Rowe1-3/+2
Also minor style changes
2016-11-05Support additional screen layouts.James Rowe1-6/+12
Allows users to choose a single screen layout or a large screen layout. Adds a configuration option to change the prominent screen.
2016-10-20Fix typosRicardo de Almeida Gonzaga1-1/+1
2016-09-30VideoCore: Shader interpreter cleanupsYuri Kunde Schlesner1-32/+42
2016-09-30VideoCore: Fix out-of-bounds read in ShaderSetup::ProduceDebugInfoYuri Kunde Schlesner1-3/+1
As far as I can tell, memset was replaced by a fill without correcting the parameter type, causing an out-of-bounds array read in the Vec4 constructor.
2016-09-30OpenGL: Take cached viewport sub-rect into account for scissorYuri Kunde Schlesner3-29/+25
Fixes #1938
2016-09-29rasterizer: separate TextureCopy from DisplayTransferwwylele3-6/+12
2016-09-21Remove special rules for Windows.h and library includesYuri Kunde Schlesner1-1/+1
2016-09-21Use negative priorities to avoid special-casing the self-includeYuri Kunde Schlesner18-18/+18
2016-09-21Remove empty newlines in #include blocks.Emmanuel Gil Peyrot35-105/+17
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 Schlesner23-125/+119
2016-09-18Sources: Run clang-format on everything.Emmanuel Gil Peyrot42-2532/+2943
2016-09-16VideoCore: Fix dangling lambda context in shader interpreterYuri Kunde Schlesner1-1/+1
The static meant that after the first execution, these lambda context would be pointing to a random location on the stack. Fixes a random crash when using the interpreter.
2016-08-30OpenGL: Avoid error on unsupported lighting LUTJannik Vogel1-0/+1
2016-08-30config: Add a setting for graphics V-Sync.bunnei1-0/+1
2016-06-28OpenGL: Add scaled resolution support to scissorYuri Kunde Schlesner4-3/+16
2016-06-28PICA: Scissor fixes and cleanupsYuri Kunde Schlesner5-45/+39
2016-06-28PICA: Implement scissor testSubv5-3/+105
2016-06-25Remove superfluous std::move in return std::move(local_var)scurest1-1/+1
2016-06-07OpenGL: Implement fogJannik Vogel5-7/+124
2016-06-07Rasterizer: Implement fogJannik Vogel1-21/+52
2016-06-07Pica: Add fog stateJannik Vogel3-14/+69
2016-06-07OpenGL: Avoid undefined behaviour for UNIFORM_BLOCK_DATA_SIZEJannik Vogel2-6/+8
2016-06-01gsp::gpu: Reset g_thread_id in UnregisterInterruptRelayQueuemailwl1-1/+1
2016-05-23OpenGL: Set shader_dirty on lighting changesJannik Vogel1-0/+23
2016-05-23Pica: Name LightSrc.config registerJannik Vogel2-17/+15
2016-05-23Pica: Name lighting.config0 and .config1 registersJannik Vogel2-18/+18
2016-05-23OpenGL: Use uniforms for dist_atten_bias and dist_atten_scaleJannik Vogel3-8/+84
2016-05-21Refactor Tev stage dumperJannik Vogel2-115/+114
2016-05-21Extend Tev stage dumperJannik Vogel1-14/+38
2016-05-16Retrieve shader result from new OutputRegisters-typeJannik Vogel4-64/+81
2016-05-14OpenGL: Only update depth uniforms if the depth changedJannik Vogel2-9/+22
2016-05-14OpenGL: value-initialize variables which cause uninitialised access otherwiseJannik Vogel1-2/+2
2016-05-13Use new shader-jit signature for interpreterJannik Vogel3-8/+8
2016-05-13Refactor access to state in shader-jitJannik Vogel4-24/+42
2016-05-12OpenGL: Support blend equationJannik Vogel4-0/+31
2016-05-12Move program_counter and call_stack from UnitState to interpreterJannik Vogel3-45/+42
2016-05-12Move default_attributes into Pica stateJannik Vogel4-4/+4
2016-05-11Turn ShaderSetup into structJannik Vogel4-57/+58
2016-05-11OpenGL: Implement texture type 3Jannik Vogel4-35/+67
2016-05-11Rasterizer: Implement texture type 3Jannik Vogel1-2/+27
2016-05-11Pica: Add tc0.w to OutputVertexJannik Vogel1-1/+2
2016-05-11Pica: Add texture type to stateJannik Vogel1-0/+10
2016-05-10gl_rasterizer: Fix compilation for debug buildsLioncash1-1/+1
2016-05-10OpenGL: Implement W-Buffers and fix depth-mappingJannik Vogel3-4/+23
2016-05-10Pica: Implement W-Buffer in SW rasterizerJannik Vogel4-11/+43
2016-05-09vertex_loader: Correct forward declaration of InputVertexLioncash1-1/+1
It's actually a struct, not a class.
2016-05-09vertex_loader: Provide an assertion for ensuring the loader has been setupLioncash2-0/+7
Also adds an assert to ensure that Setup is not called more than once during a VertexLoader's lifetime.
2016-05-09vertex_loader: Add constructors to facilitate immediate and two-step initializationLioncash2-2/+6
2016-05-09vertex_loader: initialize_num_total_attributes.Lioncash1-1/+1
Keeps the public API sane.
2016-05-09vertex_loader: Use std::array instead of raw C arraysLioncash1-6/+7
2016-05-09vertex_loader: Correct header orderingLioncash1-1/+1
2016-05-07fixup simple type conversions where possibleAlexander Laties4-7/+8
2016-05-06Frontends, VideoCore: Move glad initialisation to the frontendEmmanuel Gil Peyrot1-6/+0
On SDL2 this allows it to use SDL_GL_GetProcAddress() instead of the default function loader, and fixes a crash when using apitrace with an EGL context. On Qt we will need to migrate from QGLWidget to QOpenGLWidget and QOpenGLContext before we can use gladLoadGLLoader() instead of gladLoadGL(), since the former doesn’t expose a function loader.
2016-05-04Pica: Rename VertexLoaded breakpoint to VertexShaderInvocationJannik Vogel2-7/+5
2016-05-03Pica: Use a union for PicaShaderConfigJannik Vogel3-125/+139
2016-05-03Pica: Add TevStageConfigRaw to PicaShaderConfig (MSVC workaround)Jannik Vogel2-2/+23
2016-05-03Pica: Make PicaShaderConfig trivially_copyable and clear it before useJannik Vogel1-21/+28
2016-05-03OpenGL: Don't copy const_color (Reverts #1745)Jannik Vogel1-2/+3
2016-05-03Pica: Replace logic in shader.cpp with loopJannik Vogel1-34/+4
2016-05-01OpenGL: Copy TevStageConfig using a loop. Fixes bug: const_color not copiedJannik Vogel1-30/+11
2016-04-30OpenGL: border_color was never set. Fixed. (#1740)Jannik Vogel1-0/+1
2016-04-30VideoCore: Run include-what-you-use and fix most includes.Emmanuel Gil Peyrot34-79/+212
2016-04-30Remove TGA dumperJannik Vogel3-62/+0
2016-04-29Common: Remove section measurement from profiler (#1731)Yuri Kunde Schlesner4-11/+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 Rydgard4-32/+35
2016-04-28Debugger fixHenrik Rydgard1-2/+2
2016-04-28Optimize the vertex loader, nearly doubling its speed.Henrik Rydgard2-32/+54
2016-04-28Don't keep base_address in the loader, it doesn't belong there (with it, the loader can't be cached).Henrik Rydgard3-11/+10
2016-04-28Move "&" to their proper place, add missing includes and make some properly relative.Henrik Rydgard2-8/+11
2016-04-28Refactor: Extract VertexLoader from command_processor.cpp.Henrik Rydgard5-125/+185
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-24shader: Shader size is long uint, not uint.Sam Spilsbury1-1/+1
2016-04-24shader: Handle non-CALL opcodes with a breakSam Spilsbury1-0/+2
2016-04-24shader: Format string must be provided inline and not as a variableSam Spilsbury1-1/+1
2016-04-24Replace std::map with std::array for graphics event breakpoints, and allow the compiler to inline. Saves 1%+ in vertex heavy situations.Henrik Rydgard2-7/+14
2016-04-23pica: Handle default lighting caseSam Spilsbury1-1/+6
2016-04-22HWRasterizer: reorder declarations to match defstfarley1-9/+9
2016-04-22HWRasterizer: sync specular uniform for new shaderstfarley1-0/+2
2016-04-21HWRasterizer: Texture forwardingtfarley13-759/+1371
2016-04-21Config: Add scaled resolution optiontfarley2-0/+2
2016-04-17Rasterizer: Allow all blend factors for alpha blend-funcJannik Vogel1-57/+42
2016-04-15debug_utils: use std::make_unique for initializing PicaTraceLioncash1-1/+1
2016-04-14shader_jit_x64: Rename RuntimeAssert to Compile_Assert.bunnei2-5/+5
2016-04-14shader_jit_x64.cpp: Rename JitCompiler to JitShader.bunnei3-92/+92
2016-04-14shader_jit_x64: Free memory that's no longer needed after compilation.bunnei1-0/+6
2016-04-14shader_jit_x64: Use a sorted vector instead of a set for keeping track of return addresses.bunnei2-5/+8
2016-04-14shader_jit_x64: Use CALL/RET instead of JMP for subroutines.bunnei1-17/+7
2016-04-14shader_jit_x64: Separate initialization and code generation for readability.bunnei1-9/+8
2016-04-14shader_jit_x64: Get rid of unnecessary last_program_counter variable.bunnei2-6/+2
2016-04-14shader_jit_x64: Execute certain asserts at runtime.bunnei2-5/+19
- This is because we compile the full shader code space, and therefore its common to compile malformed instructions.
2016-04-14shader: Remove unused 'state' argument from 'Setup' function.bunnei3-5/+4
2016-04-14shader_jit_x64: Specify shader main offset at runtime.bunnei3-10/+6
2016-04-14shader_jit_x64: Allocate each program independently and persist for emu session.bunnei3-38/+28
2016-04-14shader_jit_x64: Rewrite flow control to support arbitrary CALL and JMP instructions.bunnei2-35/+119
2016-04-14shader_jit_x64: Fix strict memory aliasing issues.bunnei1-1/+3
2016-04-14file_util: Don't expose IOFile internals through the APILioncash1-1/+16
2016-04-10Pica: Remove geometry dumper (PICA_DUMP_GEOMETRY)Jannik Vogel4-71/+0
2016-04-10OpenGL: Implement color combiner Operation::Dot3_RGBJannik Vogel1-0/+3
2016-04-08OpenGL: Respect buffer-write allow registersJannik Vogel1-6/+28
2016-04-08OpenGL: Split buffer-write mask sync into seperate functionsJannik Vogel2-8/+39
2016-04-08Rasterizer: Respect buffer-write allow registersJannik Vogel2-4/+16
2016-04-08OpenGL: Keep stencil-test and framebuffer.depth_format in syncJannik Vogel1-0/+1
2016-04-05Common: Remove Common::make_unique, use std::make_uniqueMerryMage5-11/+7
2016-04-03OpenGL: Fix a double framebuffer completeness checks.Emmanuel Gil Peyrot1-4/+6
2016-04-03OpenGL: Check for framebuffer completenessJannik Vogel1-0/+3
2016-04-01Avoid warnings by casting to size_t for ARRAY_SIZE() comparisonsJannik Vogel1-6/+6
2016-03-24Pica: Improve accuracy of immediate-mode supportYuri Kunde Schlesner5-29/+56
This partially fixes Etrian Odyssey IV.
2016-03-24OpenGL: Don't attempt to draw empty triangle batchesYuri Kunde Schlesner1-0/+3
Our code did not handle this well, causing random crashes in some situations.
2016-03-17video_core: Don't cast away constLioncash3-18/+19
2016-03-17shader_interpreter: use std::inner_product for the dot productLioncash1-5/+3
Same thing, less code.
2016-03-17core/video_core: Make NumIds functions constexprLioncash1-1/+1
2016-03-17core/video_core: Don't cast away const in subscript operatorsLioncash1-3/+3
Not to say these subscript operators aren't totally ugly as is.
2016-03-17PICA: Alignment happens locally in vertexJannik Vogel1-6/+6
2016-03-15PICA: Fix MAD/MADI encodingJannik Vogel2-29/+33
2016-03-14PICA: Fix viewport offsetJannik Vogel1-2/+2
2016-03-14Respect vs output mapJannik Vogel2-7/+19
2016-03-13PICA: Align vertex attributesJannik Vogel1-1/+5
2016-03-12shader_jit_x64: Clear cache after code space fills up.bunnei3-2/+19
2016-03-12shader_jit_x64: Make assert outputs more useful & cleanup formatting.bunnei1-4/+7
2016-03-12shader: Update log message to use proper log class.bunnei1-1/+1
2016-03-09Common: Get rid of alignment macrosLioncash1-4/+4
The gl rasterizer already uses alignas, so we may as well move everything over.
2016-03-09renderer_base: In-class initialize variablesLioncash1-5/+2
2016-03-09render_base: Clarify/normalize getter functionsLioncash1-2/+2
2016-03-09renderer_base: Don't directly expose the rasterizer unique_ptrLioncash3-8/+11
There's no reason to allow direct access to the unique_ptr instance. Only its contained pointer.
2016-03-08Improve error report from Init() functionsLittleWhite5-8/+18
Add error popup when citra initialization failed
2016-03-06Pica: Write depth value even when depth test is disabledYuri Kunde Schlesner2-10/+12
This has been confirmed on hardware. Fixes Etrian Odyssey IV.
2016-03-03Add immediate mode vertex submissionDwayne Slater17-60/+172
2016-02-26renderer_opengl: Initalise fragment shader LUT texturesMerryMage1-0/+4
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 operatorMerryMage2-6/+6
2016-02-05pica: Cleanup lighting register definitions and documentation.bunnei2-48/+51
2016-02-05gl_rasterizer: Use alignas(16) instead of explicit padding.bunnei1-13/+6
2016-02-05renderer_opengl: Use GLvec3/GLvec4 aliases for commonly used types.bunnei4-14/+18
2016-02-05gl_rasterizer: Fix issue with interpolation of opposite quaternions.bunnei2-4/+32
2016-02-05pica_types: Fix typo in docstring.bunnei1-1/+1
2016-02-05pica_types: Replace float24/20/16 with a template class.bunnei5-116/+82
2016-02-05command_processor: Add an assertion to ensure LUTs are not written past their boundaries.bunnei1-0/+3
2016-02-05gl_rasterizer: Remove unnecessary casts.bunnei1-6/+6
2016-02-05gl_rasterizer: Fix PicaShaderConfig on GCC.bunnei1-29/+27
2016-02-05gl_rasterizer: Initial implementation of bump mapping.bunnei3-5/+42
2016-02-05gl_shader_gen: Fix bug in LUT range (should within range [0, 255] not [0, 256]).bunnei1-3/+3
2016-02-05gl_shader_gen: Implement lighting red, green, and blue reflection.bunnei3-21/+77
2016-02-05gl_shader_gen: View should be normalized.bunnei1-2/+2
2016-02-05gl_shader_gen: Implement fragment lighting fresnel effect.bunnei3-9/+38
2016-02-05gl_shader_gen: Implement fragment lighting specular 1 component.bunnei3-11/+41
2016-02-05gl_shader_gen: Add support for D0 LUT scaling.bunnei3-3/+71
2016-02-05gl_shader_gen: Refactor lighting config to match Pica register naming.bunnei3-42/+50
- Also implement D0 LUT enable.
2016-02-05pica: Cleanup and add some comments to lighting registers.bunnei2-19/+19
2016-02-05gl_rasterizer: Minor naming refactor on Pica register naming.bunnei2-20/+23
2016-02-05gl_shader_gen: Reorganize and cleanup lighting code.bunnei1-100/+107
- No functional difference.
2016-02-05gl_shader_gen: Fix directional lights.bunnei1-1/+1
2016-02-05gl_shader_gen: Fix bug with lighting where clamp highlights was only applied to last light.bunnei1-6/+6
2016-02-05gl_shader_gen: View vector needs to be normalized when computing half angle vector.bunnei1-3/+4
2016-02-05renderer_opengl: Use textures for fragment shader LUTs instead of UBOs.bunnei5-27/+64
- Gets us LUT interpolation for free. - Some older Intel GPU drivers did not support the big UBOs needed to store the LUTs.
2016-02-05renderer_opengl: Initial implementation of basic specular lighting.bunnei4-13/+165
2016-02-05renderer_opengl: Implement HW fragment lighting distance attenuation.bunnei2-17/+38
2016-02-05renderer_opengl: Implement HW fragment lighting LUTs within our default UBO.bunnei4-16/+67
2016-02-05renderer_opengl: Implement diffuse component of HW fragment lighting.bunnei6-15/+270
2016-02-05pica: Implement decoding of basic fragment lighting components.bunnei5-15/+120
- Diffuse - Distance attenuation - float16/float20 types - Vertex Shader 'view' output
2016-02-05pica: Implement fragment lighting LUTs.bunnei2-0/+34
2016-02-05pica: Add decodings for distance attenuation and LUT registers.bunnei1-1/+104
2016-02-05pica: Add pica_types module and move float24 definition.bunnei3-112/+127
2016-02-03hwrasterizer: Use proper cached fb addr/sizetfarley2-42/+34
2016-02-03OpenGL: Downgrade GL_DEBUG_SEVERITY_NOTIFICATION to Debug logging levelYuri Kunde Schlesner1-2/+0
The nVidia driver is *extremely* spammy on this category, sending a message on every buffer or texture upload, slowing down the emulator and making the log useless.
2016-01-25Debugger: Use 3dbrew names for GPU registersYuri Kunde Schlesner1-57/+465
This list was imported from the 3dbrew wiki page and is pretty much complete.
2016-01-25Shader: Implement "invert condition" feature of IFU instructionYuri Kunde Schlesner2-2/+5
If the bit 0 of the JMPU instruction is set, then the jump condition will be inverted. That is, a jump will happen when the boolean is false instead of when it is true.
2016-01-24Shader JIT: Fix off-by-one error when compiling JMPsYuri Kunde Schlesner2-6/+6
There was a mistake in the JMP code which meant that one instruction at the destination would be skipped when the jump was taken. This commit also changes the meaning of the culprit parameter to make it less confusing and avoid similar mistakes in the future.
2016-01-21hwrasterizer: Use depth offsettfarley3-2/+24
2016-01-17command_processor: Get rid of variable shadowingLioncash1-2/+1
2015-12-30video_core: Make the renderer global a unique_ptrLioncash2-6/+10
2015-12-30swrasterizer: Add missing override specifierLioncash1-1/+1
2015-12-21VideoCore: Sync state after changing rasterizersYuri Kunde Schlesner1-0/+1
This fixes various bugs that appear in the HW rasterizer after switching between it and the SW one during emulation.
2015-12-08VideoCore: Unify interface to OpenGL and SW rasterizersYuri Kunde Schlesner13-67/+105
This removes explicit checks sprinkled all over the codebase to instead just have the SW rasterizer expose an implementation with no-ops for most operations.
2015-12-07VideoCore: Rename HWRasterizer methods to be less confusingYuri Kunde Schlesner4-12/+12
2015-12-07OpenGL: Rename cache functions to better match what they actually doYuri Kunde Schlesner3-12/+11
2015-12-06GPU/PrimitiveAssembler: Fixed drawing triangle fans.Subv1-5/+4
It was skipping the second vertex assignment and using uninitialized garbage when assembling the corresponding triangle.
2015-12-05OpenGL: Flip framebuffers during transfer rather than when renderingYuri Kunde Schlesner2-12/+11
2015-12-05OpenGL: Add support for glFrontFace in the state trackerYuri Kunde Schlesner2-0/+6
2015-12-01PICA: Properly emulate 1-stage delay in the combiner bufferYuri Kunde Schlesner2-12/+19
This was discovered and verified by @fincs. The tev combiner buffer actually lags behind by one stage, meaning stage 1 reads the initial color, stage 2 reads stage 0's output, and so on. Fixes character portraits in Fire Emblem: Awakening and world textures in Zelda: ALBW. Closes #1140.
2015-11-26renderer_opengl: Fix uniform issues introduced with kemenaran/avoid-explicit-uniform-location.bunnei2-6/+8
2015-11-25Use regular uniform locationPierre de La Morinerie3-15/+5
The support for GL_ARB_explicit_uniform_location is not that good (53% according to http://feedback.wildfiregames.com/report/opengl/feature/GL_ARB_explicit_uniform_location). This fix the shader compilation on Intel HD 4000 (#1222).
2015-11-19FragShader: Use an UBO instead of several individual uniformsSubv6-13/+67
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-10-24OpenGL: Log GL_KHR_debug messages we receiveEmmanuel Gil Peyrot1-0/+57
This allows the driver to communicate errors, warnings and improvement suggestions about our usage of the API.
2015-10-22gl_shader_gen: Use explicit locations for vertex shader attributes.bunnei2-15/+9
2015-10-22gl_shader_gen: Optimize code for AppendAlphaTestCondition.bunnei1-16/+11
- Also add a comment to AppendColorCombiner.
2015-10-22gl_rasterizer: Define enum types for each vertex texcoord attribute.bunnei3-12/+14
2015-10-22gl_shader_gen: Various cleanups to shader generation.bunnei3-48/+52
2015-10-22gl_rasterizer: Use MMH3 hash for shader cache hey.bunnei4-83/+63
- Includes a check to confirm no hash collisions.
2015-10-22gl_shader_gen: Require explicit uniform locations.bunnei3-56/+34
- Fixes uniform issue on AMD.
2015-10-22gl_shader_gen: Rename 'o' to 'attr' in vertex/fragment shaders.bunnei1-11/+11
2015-10-22gl_shader_gen: AppendAlphaModifier default should be 0.0, not vec4(0.0).bunnei1-1/+1
2015-10-22gl_shader_gen: Fix bug where TEV stage outputs should be clamped.bunnei1-3/+3
2015-10-22gl_rasterizer: Add documentation to ShaderCacheKey.bunnei1-0/+16
2015-10-22gl_shader_gen: Add additional function documentation.bunnei2-0/+18
2015-10-22gl_shader_util: Cleanup header file + add docstring.bunnei1-1/+7
2015-10-22gl_shader_gen: Various cleanups + moved TEV stage generation to its own function.bunnei1-161/+170
2015-10-22renderer_opengl: Refactor shader generation/caching to be more organized + various cleanups.bunnei10-788/+509
2015-10-22gl_rasterizer: Move logic for creating ShaderCacheKey to a static function.bunnei3-22/+50
2015-10-22gl_shader_util: Use vec3 constants for AppendColorCombiner.bunnei1-6/+6
2015-10-22gl_rasterizer: Fix typo in uploading TEV const color uniforms.bunnei1-5/+5
2015-10-22gl_shader_util: Fix precision bug with alpha testing.bunnei2-9/+9
- Alpha testing is not done with float32 precision, this makes the HW renderer match the SW renderer.
2015-10-22Initial implementation of fragment shader generation with caching.Subv7-261/+568
2015-10-09CitraQt, SkyEye, Loader, VideoCore: Remove newlines in LOG_* calls.Emmanuel Gil Peyrot2-7/+7
The LOG_* function itself already appends one.
2015-10-07Silence -Wsign-compare warnings.Rohit Nirmal1-3/+3
2015-09-29fix some xcode 7.0 warningsMartin Lindhe3-2/+4
2015-09-16general: Silence some warnings when using clangLioncash3-7/+7
2015-09-11video_core: Reorganize headersLioncash19-62/+56
2015-09-11video_core: Remove unnecessary includes from headersLioncash5-13/+3
2015-09-10renderer_opengl: Remove unimplemented function declarationLioncash1-3/+0
2015-09-10video_core: Remove unused variablesLioncash3-4/+0
2015-09-10gl_rasterizer: Replace push_back calls with emplace_back in AddTriangleLioncash1-3/+3
2015-09-07Shader JIT: Use SCALE constant from emitteraroulin1-4/+4
2015-09-07Shader: Fix size_t to int casts of register offsetsaroulin2-15/+21
2015-09-03OpenGL: Use Sampler Objects to decouple sampler config from texturesYuri Kunde Schlesner4-21/+76
Fixes #978
2015-09-03OpenGL: Remove ugly and endian-unsafe color pointer castsYuri Kunde Schlesner4-9/+13
2015-09-03OpenGL: Add support for Sampler Objects to state trackerYuri Kunde Schlesner3-4/+42
2015-09-02video_core: Fix format specifiers warningsaroulin2-2/+3
2015-09-01x64: Proper stack alignment in shader JIT function callsaroulin2-28/+18
Import Dolphin stack handling and register saving routines Also removes the x86 parts from abi files
2015-08-31Pica: Added the primitive_restart register (0x25f) to the registers map.Subv2-1/+5
2015-08-31Pica: Add the vertex_offset register to the Pica registers map.Subv2-0/+2
2015-08-31Shader JIT: Fix SGE/SGEI NaN behavioraroulin1-3/+3
SGE was incorrectly emulated w.r.t. NaN behavior as the CMPSS SSE instruction was used with NLT
2015-08-30GPU: Implemented register 0x22A.Subv2-2/+8
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-30Replace the previous OpenGL loader with a glad-generated 3.3 oneYuri Kunde Schlesner11-2812/+12
The main advantage of switching to glad from glLoadGen is that, apart from being actively maintained, it supports a customizable entrypoint loader function, which makes it possible to also support OpenGL ES.
2015-08-28gl_rasterizer_cache: Detect and ignore unnecessary texture flushes.bunnei3-8/+18
2015-08-27Shader JIT: Fix float to integer rounding in MOVAaroulin1-2/+2
MOVA converts new address register values from floats to integers using truncation
2015-08-27Shader JIT: ifdef out reference to ifdef'd out shader_maparchshift1-0/+2
shader_map was only defined on x86 architectures, but was cleared on shutdown with no ifdef protection. Ifdef this out so non-x86 architectures can be built.
2015-08-25Integrate the MicroProfile profiling libraryYuri Kunde Schlesner5-0/+25
This brings goodies such as a configurable user interface and multi-threaded timeline view.
2015-08-24HWRenderer: Added a workaround for the Intel Windows driver bug that causes glTexSubImage2D to not change the stencil buffer.Subv1-2/+9
Reported here https://communities.intel.com/message/324464
2015-08-24fixup! Shaders: Fix multiplications between 0.0 and infYuri Kunde Schlesner1-4/+4
2015-08-24Shader JIT: Tiny micro-optimization in DPHYuri Kunde Schlesner1-4/+4
2015-08-24Shaders: Fix multiplications between 0.0 and infYuri Kunde Schlesner3-40/+58
The PICA200 semantics for multiplication are so that when multiplying inf by exactly 0.0, the result is 0.0, instead of NaN, as defined by IEEE. This is relied upon by games. Fixes #1024 (missing OoT interface items)
2015-08-24Shaders: Explicitly conform to PICA semantics in MAX/MINYuri Kunde Schlesner2-2/+10
2015-08-24Shader JIT: Add name to second scratch register (XMM4)Yuri Kunde Schlesner1-3/+5
2015-08-24shader_jit: Replace two MDisp usages with MatRLioncash1-2/+2
2015-08-24Shader JIT: Fix CMP NaN behavior to match hardwareYuri Kunde Schlesner1-8/+23
2015-08-23HWRenderer: Only reload the framebuffer from gpu memory if the hw renderer is in use during a breakpoint.Subv1-2/+6
2015-08-23Shader: Use std::sqrt for float instead of sqrtaroulin1-1/+1
2015-08-23Shader: RCP and RSQ computes only the 1st componentaroulin2-10/+10
2015-08-22Shader: implement DPH/DPHI in JITaroulin2-2/+36
2015-08-22Shader: implement DPH/DPHI in interpreteraroulin1-1/+8
Tests revealed that the component with w=1 is SRC1 and not SRC2, it is now fixed on 3dbrew.
2015-08-21HWRasterizer: Implemented stencil ops 6 and 7.Subv1-1/+3
2015-08-21SWRasterizer: Implemented stencil ops 6 and 7.Subv2-6/+14
IncrementWrap and DecrementWrap, verified with hwtests.
2015-08-21HWRasterizer: Implemented stencil op 1 (GL_ZERO)Subv1-1/+1
2015-08-21SWRasterizer: Implemented stencil action 1 (GL_ZERO).Subv2-1/+4
Verified with hwtests.
2015-08-21SWRasterizer: Removed a todo. Verified with hwtests.Subv1-1/+0
2015-08-21SWRenderer: The stencil depth_pass action is executed even if depth testing is disabled.Subv1-7/+5
The HW renderer already did this.
2015-08-21Rasterizer: Abstract duplicated stencil code into a lambda.Subv1-6/+9
2015-08-20GLRasterizer: Implemented stencil testing in the hw renderer.Subv4-2/+44
2015-08-20GPU/Rasterizer: Corrected the stencil implementation.Subv2-18/+39
Verified the behavior with hardware tests.
2015-08-19Shader: implement SGE, SGEI and SLT in JITaroulin2-15/+36
2015-08-19Shader: implement SGE, SGEI in interpreteraroulin1-0/+14
2015-08-19Shader: Save caller-saved registers in JIT before a CALLaroulin2-0/+33
2015-08-17Shader: implement EX2 and LG2 in JITaroulin2-2/+22
2015-08-16Fix Linux GCC 4.9 build (complaining about undeclared memset)LittleWhite1-1/+2
2015-08-16Shader: implement EX2 and LG2 in interpreteraroulin1-0/+36
2015-08-16Build fix for Debug configurations.Tony Wasserka1-1/+1
2015-08-16Introduce a shader tracer to allow inspection of input/output values for each processed instruction.Tony Wasserka8-41/+326
2015-08-16Pica/DebugUtils: Include uniform information into shader dumps.Tony Wasserka2-11/+51
2015-08-16citra-qt: Improve shader debugger.Tony Wasserka4-13/+28
Now supports dumping the current shader and recognizes a larger number of output semantics.
2015-08-16videocore: Added RG8 texture supportPatrick Martin2-1/+8
2015-08-16Shader: Use a POD struct for registers.bunnei5-40/+43
2015-08-16Rename ARCHITECTURE_X64 definition to ARCHITECTURE_x86_64.bunnei2-7/+6
2015-08-16Common: Cleanup CPU capability detection code.bunnei1-5/+5
2015-08-16Common: Move cpu_detect to x64 directory.bunnei1-2/+1
2015-08-16x64: Refactor to remove fake interfaces and general cleanups.bunnei6-150/+26
2015-08-16JIT: Support negative address offsets.bunnei1-26/+25
2015-08-16Shader: Initial implementation of x86_x64 JIT compiler for Pica vertex shaders.bunnei10-3/+940
- Config: Add an option for selecting to use shader JIT or interpreter. - Qt: Add a menu option for enabling/disabling the shader JIT.
2015-08-15Common: Added MurmurHash3 hash function for general-purpose use.bunnei1-1/+1
2015-08-15Shader: Define a common interface for running vertex shader programs.bunnei7-186/+289
2015-08-15Shader: Move shader code to its own subdirectory, "shader".bunnei9-12/+12
2015-08-15GPU: Refactor "VertexShader" namespace to "Shader".bunnei13-50/+48
- Also renames "vertex_shader.*" to "shader_interpreter.*"
2015-08-11ARM Core, Video Core, CitraQt, Citrace: Use CommonTypes types instead of the standard u?int*_t types.Emmanuel Gil Peyrot1-1/+2
2015-08-06OpenGL: Fix state tracking in situations with reused object handlesYuri Kunde Schlesner4-0/+45
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 Schlesner4-26/+3
All uses of this field where it's false can just set the texture id to 0 instead.
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-28OpenGL: Add a profiler category measuring framebuffer readbackYuri Kunde Schlesner1-0/+7
2015-07-26citra-qt/debug_utils: Use lock_guard everywhereLectem1-6/+5
unique_lock were being used as lock_guards. Also replaced manual lock/unlock by lock_guard for harmonization.
2015-07-26citra-qt/command list: Add mask columnLectem3-25/+24
2015-07-26OpenGL: Make OpenGL object resource wrappers fully inlineYuri Kunde Schlesner3-143/+79
The functions are so simple that having them separate only bloats the code and hinders optimization.
2015-07-26Videocore: Don't reinitialize register name map on every queryYuri Kunde Schlesner2-65/+72
This greatly speeds up the command list debug widget.
2015-07-26Videocore: Simplify variables in vertex shader interpreterYuri Kunde Schlesner1-24/+21
Simplifies the code and gives a tiny speed-up.
2015-07-26Videocore: Replace std::stack in shader interpreter with static_vectorYuri Kunde Schlesner1-6/+6
Shaves off 1/3rd of the vertex shader time in Fire Emblem
2015-07-26VideoCore: #ifdef out some debugging routinesYuri Kunde Schlesner5-13/+18
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-25Address error that remained in last mergeYuri Kunde Schlesner1-1/+1
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-23VideoCore: Saturate vertex colors before interpolatingYuri Kunde Schlesner1-0/+6
During testing, it was discovered that hardware does not interpolate colors output by the vertex shader as-is. Rather, it drops the sign and saturates the value to 1.0. This is done before interpolation, such that (e.g.) interpolating outputs 1.5 and -0.5 is equivalent to as if the shader had output the values 1.0 and 0.5 instead, with the interpolated value never crossing 0.0. This change has been tested against hardware.
2015-07-23Qt/GPU Breakpoints: Added three more breakpoint types:Subv2-4/+7
* 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-23Rasterizer/GL: Set the border color when binding a texture.Subv1-2/+9
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-07-21GPU: Added registers for min and mag texture filters and implemented them in the hw renderer.Subv4-3/+37
2015-07-20Pica: Correct switched S/T texture wrapping registersYuri Kunde Schlesner1-2/+2
This was found and hwtested by Lectem
2015-07-20Pica: Fix DP3 instruction, which wasn't assigning to the w componentYuri Kunde Schlesner1-1/+1
2015-07-19GLRasterizer: Don't try to get a pointer to the depth buffer if it doesn't exist.Subv1-3/+7
2015-07-19Rasterizer/Textures: Fixed a bug where the I4 format would get twice the real stride.Subv1-0/+1
Also added its name to the texture viewer widget
2015-07-19Vertex Shader : Undo castingzawata1-1/+1
2015-07-19Video_Core : Type fixeszawata2-2/+2
2015-07-19Video_Core: Finally fix pesky warningzawata1-1/+1
2015-07-19Video_Core : Change Tabs to Spaceszawata1-0/+15
This really should be universalized, I keep getting errors creating commits because lines I've edited use tabs instead of spaces(and yes I did read the contributing guide and i know they are supposed to be spaces)
2015-07-19Video_Core : Fix Conversion Warningszawata3-18/+3
2015-07-15Pica/Shader: Add geometry shader definitions.Tony Wasserka5-149/+162
2015-07-15Pica/CommandProcessor: Move default attribute setup to the proper position.Tony Wasserka1-40/+40
2015-07-15Pica/Clipper: Output proper number of triangles in debugging logs.Tony Wasserka1-1/+1
2015-07-14VideoCore: Implement the DOT3_RGB combinerLectem2-1/+13
2015-07-13Pica: Implement stencil testing.Tony Wasserka2-12/+173
2015-07-13Clean up command_processor.cpp.Tony Wasserka1-22/+27
2015-07-13Add CiTrace recording support.Tony Wasserka3-2/+63
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-07-09Added GL_CLAMP_TO_BORDER supportLectem3-13/+28
2015-06-28Core: Cleanup hw includes.Emmanuel Gil Peyrot5-4/+13
2015-06-28Core, VideoCore: Replace or fix exit() calls.Emmanuel Gil Peyrot1-6/+9
2015-06-28CitraQt: Cleanup includes.Emmanuel Gil Peyrot3-5/+10
2015-06-28Common: Cleanup emu_window includes.Emmanuel Gil Peyrot3-10/+8
2015-06-28Common: Cleanup key_map includes.Emmanuel Gil Peyrot2-3/+9
2015-06-27VideoCore: Fix floating point warningzawata1-1/+1
2015-06-16VideoCore: Log the GL driver’s vendor and renderer.Emmanuel Gil Peyrot1-0/+2
2015-06-14video_core: add extra braces around initializerYuri Kunde Schlesner1-3/+3
Trivial change and fixes several warnings in the clang build.
2015-06-09Renderer formatting editstfarley2-26/+29
2015-06-09Render-to-texture flush, interval math fixtfarley1-1/+13
2015-06-09Liberal texture unbind (clout menu)tfarley2-4/+40
2015-06-09Depth format fix (crush3d intro/black screens)tfarley1-46/+46
2015-06-09Implemented glColorMasktfarley3-0/+24
2015-05-31Pica: Use zero for the SecondaryFragmentColor source.bunnei3-11/+21
- This is a workaround until we support fragment lighting.
2015-05-31rasterizer: Remove unnecessary 'using' for BlendEquation.bunnei1-2/+1
2015-05-31Pica: Implement LogicOp function.bunnei7-8/+135
2015-05-31rasterizer: Implement AddSigned combiner function for alpha channel.bunnei1-0/+7
2015-05-31vertex_shader: Use address offset on src2 in inverted mode.bunnei1-3/+3
2015-05-31Pica: Implement command buffer execution registers.bunnei2-44/+76
2015-05-31vertex_shader: Implement SLT/SLTI instructions.bunnei1-4/+10
2015-05-31vertex_shader: Implement MIN instruction.bunnei1-0/+9
2015-05-30Move video_core/color.h to common/color.harchshift5-218/+4
2015-05-30Move video_core/math.h to common/vector_math.harchshift7-648/+6
The file only contained vector manipulation code, and such widely-useable code doesn't belong in video_core.
2015-05-29Remove every trailing whitespace from the project (but externals).Emmanuel Gil Peyrot11-25/+25
2015-05-23gl_state: Remove unnecessary const specifier on ApplyLioncash2-2/+2
2015-05-23video_core/utils: Remove unused variables in GetMortonOffsetLioncash1-3/+0
2015-05-23Pica: Create 'State' structure and move state memory there.bunnei12-428/+451
2015-05-23gl_state: Fix a condition typo in ApplyLioncash1-1/+1
2015-05-23OpenGL renderertfarley21-44/+2196
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-15Memmap: Re-organize memory function in two filesYuri Kunde Schlesner4-5/+3
memory.cpp/h contains definitions related to acessing memory and configuring the address space mem_map.cpp/h contains higher-level definitions related to configuring the address space accoording to the kernel and allocating memory.
2015-05-14pica: Add the ULL specifier in IsDefaultAttributeLioncash1-1/+1
This is necessary otherwise there are warnings about a 32-bit result being casted to a 64-bit value.
2015-05-12GPU: Add more fine grained profiling for vertex shader and rasterizationYuri Kunde Schlesner2-0/+10
2015-05-11Implement I4 texture formatarchshift2-1/+12
@neobrain, could you confirm that this is correct? It's been tested with various different games and fixes different textures, including in Animal Crossing, Kirby Triple Deluxe, and SMB3D.
2015-05-10rasterizer: Implemented combiner output scaling.bunnei2-2/+16
2015-05-10rasterizer: Implemented AddSigned combiner op.bunnei1-0/+10
2015-05-10rasterizer: Fixed a depth testing bug.bunnei2-6/+19
2015-05-10rasterizer: Implement combiner buffer input.bunnei2-4/+53
2015-05-10rasterizer: Return zero'd vectors on error conditions.bunnei1-3/+3
2015-05-10vertex_shader: Implement FLR instruction.bunnei1-0/+9
2015-05-10vertex_shader: Implement MADI instruction.bunnei1-4/+7
nihstro: Update submodule to latest upstream/master to support MADI instruction decoding.
2015-05-09Memory: Add GetPhysicalPointer helper functionYuri Kunde Schlesner3-11/+11
2015-05-09Memory: Support more regions in the VAddr-PAddr translation functionsYuri Kunde Schlesner3-18/+7
Also adds better documentation and removes the one-off reimplementation of the function in pica.h.
2015-05-09Memory: Re-organize and rename memory area address constantsYuri Kunde Schlesner1-1/+1
2015-05-07Common: Remove common.hYuri Kunde Schlesner6-3/+8
2015-05-07GPU: Implemented default vertex shader attributes.Subv4-68/+137
Fixes some games crashing.
2015-04-29VideoCore: Remove a superfluous auto variable declaration in debug_utils.Emmanuel Gil Peyrot1-1/+1
2015-04-10Silence some -Wsign-compare warnings.Rohit Nirmal1-2/+2
2015-04-05Changed occurences of colour to color for consistencyGareth Higgins2-4/+4
2015-04-04Allow the user to set the background clear color during emulationarchshift1-1/+2
The background color can be seen at the sides of the bottom screen or when the window is wider than normal.
2015-03-16VideoCore: Add static_cast around expressions where the compiler doesn’t deduce the right type.Emmanuel Gil Peyrot2-4/+4
2015-03-12Pica/VertexShader: Fix a bug caused due to incorrect assumptions of consecutive output register tables.Tony Wasserka1-20/+24
We now write create a temporary buffer for output registers and copy all of them to the actual output vertex structure after the shader has run. This is technically not necessary, but it's easier to vectorize in the future.
2015-03-10GPU: Added the stencil test structure to the Pica Regs struct.Subv3-50/+65
2015-03-10GPU: Implemented more depth buffer formats.Subv3-9/+115
This fixes the horizontal lines in Picross E, Cubic Ninja, Cave Story 3D and possibly others
2015-03-09Added LCD registers, and implementation for color filling in OGL code.archshift2-11/+48
2015-03-09Pica/PrimitiveAssembly: Fix triangle strips and fans being generated with incorrect winding order.Tony Wasserka1-6/+3
2015-03-08Update nihstro submodule to the initial release version.archshift1-37/+38
Includes more opcodes to implement in the future.
2015-03-07Set framebuffer layout from EmuWindow.bunnei3-43/+9
2015-03-07GPU/Textures: Fixed ETC texture decoding.Subv1-1/+1
2015-03-04GPU: Added RGB565/RGB8 framebuffer support and various cleanups.bunnei5-85/+155
- Centralizes color format encode/decode functions. - Fixes endianness issues. - Implements remaining framebuffer formats in the debugger.
2015-03-02Add profiling infrastructure and widgetYuri Kunde Schlesner2-0/+18
2015-02-28Added RGBA5551 compatibility in the rasterizerarchshift3-2/+41
This allows Virtual Console games to display properly.
2015-02-27GPU: Implemented bits 3 and 1 from the display transfer flags.Subv3-54/+91
Bit 3 is used to specify a raw copy, where no processing is done to the data, seems to behave exactly as a DMA. Bit 1 is used to specify whether to convert from a tiled format to a linear format or viceversa.
2015-02-26Video core: Fix A4 texture decodingYuri Kunde Schlesner1-2/+2
It was trying to take the LSB from `coarse_x`, which would always be 0 and thus would always return the same texel from each byte. To add insult to the injury, the conditional was actually the wrong way around too. Fixes blocky text in OoT.
2015-02-26Video core: Fix pixelation/blockiness in textures.Yuri Kunde Schlesner1-3/+3
This was caused during morton decoding by me not masking the bits of each coordinate before merging them, so the bits from x could set bits in y if it was >255.
2015-02-25Rasterizer: Add support for RGBA4 framebuffer format.bunnei1-0/+21
2015-02-22Rasterize with the correct color component order.bunnei1-11/+24
- Fixes a regression with #594.
2015-02-21Pica/VertexShader: Fixed LOOP with more than one iteration.Subv1-1/+4
Previously it wouldn't jump back to the start of the loop code once it reached the end of the block. Fixes the texture problems in a lot of games.
2015-02-20Remove duplication of INSERT_PADDING_WORDS between pica.h and gpu.harchshift1-11/+0
2015-02-19Rasterizer: Fixed a warning in GetWrappedTexCoord.Subv1-4/+4
Redeclaring the variable inside the switch was causing weird behavior.
2015-02-18Pica/Rasterizer: Replace exit() calls with UNIMPLEMENTED().Tony Wasserka1-5/+5
2015-02-18Pica/Rasterizer: Make some local lambdas static.Tony Wasserka1-8/+8
2015-02-18Pica/BlendUnit: Implement separate color/alpha blend equations.Tony Wasserka2-65/+59
2015-02-18Pica/TextureEnvironment: Add a note.Tony Wasserka1-0/+4
2015-02-18Pica/TextureEnvironment: Treat texture combiner source 1 as the PrimaryColor.Tony Wasserka2-0/+4
Not really sure where the difference is, but some applications seem to use this 1:1 the same way...
2015-02-18Pica/TextureEnvironment: Add support for the MAD-like texture combiners and clean up texture environment logic.Tony Wasserka2-0/+28
2015-02-18Pica/OutputMerger: Fix flipped framebuffers.Tony Wasserka1-0/+10
2015-02-18Pica/TextureUnit: Implement mirrored repeating texture wrapping.Tony Wasserka2-3/+12
2015-02-18Pica: Fix a bug in the register definitions, relating to texture wrapping.Tony Wasserka2-2/+2
2015-02-18Pica/OutputMerger: Implement color format checking.Tony Wasserka2-4/+13
2015-02-18Pica/Rasterizer: Rasterize actual pixel centers instead of pixel corners.Tony Wasserka1-2/+3
2015-02-18Pica/Rasterizer: Fix garbage pixels at triangle borders.Tony Wasserka1-1/+3
2015-02-18Pica/Rasterizer: Clean up and fix backface culling.Tony Wasserka1-11/+27
2015-02-18Pica: Cleanup clipping code and change screenspace z to range from -1..0.Tony Wasserka2-53/+42
The change in depth range seems to reflect better to what applications are expecting, and makes for cleaner code overall (hence is more likely to reflect hardware behavior).
2015-02-18Pica/VertexShader: Implement the LOOP instruction.Tony Wasserka1-14/+36
2015-02-18Pica/CommandProcessor: Properly implement shader load destination offset registers.Tony Wasserka2-20/+10
2015-02-18Pica/CommandProcessor: Work around initialized vertex attributes some more.Tony Wasserka1-2/+8
2015-02-17core/video_core: Use in-place construction where possibleLioncash2-4/+4
2015-02-16VideoCore: Fix a typo in Vec4 MakeVec(T, Vec3<T>), where the second argument was Vec2<T> instead.Emmanuel Gil Peyrot1-1/+1
2015-02-15video_core: Implement the remaining framebuffer formats in the OpenGL renderer.Emmanuel Gil Peyrot2-12/+67
2015-02-12Build: Fixed some warningsSubv2-3/+3
2015-02-11Fix Min and Max blend equationsDarius Goad1-6/+8
2015-02-11Asserts: break/crash program, fit to style guide; log.h->assert.harchshift8-23/+18
Involves making asserts use printf instead of the log functions (log functions are asynchronous and, as such, the log won't be printed in time) As such, the log type argument was removed (printf obviously can't use it, and it's made obsolete by the file and line printing) Also removed some GEKKO cruft.
2015-02-10Add more blend equations from 3dbrewDarius Goad2-2/+49
2015-02-05Rasterizer: Implement the other color and alpha modifiers.bunnei2-58/+69
2015-02-05VideoCore: Added same-component swizzlers to math utility functions.bunnei1-16/+35
2015-01-31Pica: Implement blend factors.bunnei2-10/+67
2015-01-28Pica: Implement color/alpha channel enable.bunnei2-1/+12
2015-01-27Rasterizer: Implemented alpha testing.bunnei2-7/+52
2015-01-26GPU: Implement the remaining depth testing functions.bunnei2-3/+28
2015-01-14GSP: Update framebuffer info on all interruptsYuri Kunde Schlesner1-3/+1
Hardware testing determined that the GSP processes shared memory framebuffer update info even when no memory transfer or filling GX commands are used. They are now updated on every interrupt, which isn't confirmed correct but matches hardware behaviour more closely. This also reverts the hack introduced in #404. It made a few games behave better, but I believe it's incorrect and also breaks other games.
2015-01-13Pica/Rasterizer: Add ETC1 texture decompression support.Tony Wasserka2-14/+142
2015-01-13Pica/VertexShader: Implement JMPC/JMPU/CALLC/CALLU.Tony Wasserka1-23/+52
2015-01-13Pica/VertexShader: Implement the MAD instruction.Tony Wasserka1-0/+69
2015-01-08GSP: Toggle active framebuffer each framebunnei1-1/+4
2014-12-31Pica/Rasterizer: Remove some redundant casts.Tony Wasserka1-3/+3
2014-12-31Pica/Rasterizer: Make orient2d a free function and rename it to SignedArea.Tony Wasserka1-31/+38
2014-12-31Pica: Cleanup color conversion.Tony Wasserka2-18/+46
2014-12-31VideoCore: Remove some unused functions.Tony Wasserka1-26/+0
2014-12-31Pica/Rasterizer: Fix a bug related to multitexturing and texture wrapping.Tony Wasserka1-2/+2
2014-12-31Pica/Rasterizer: Clean up long code lines.Tony Wasserka1-4/+8
2014-12-31Pica/VertexShader: Coding style fixes.Tony Wasserka1-16/+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/Rasterizer: Implement backface culling.Tony Wasserka2-10/+36
2014-12-31Pica/Rasterizer: Textures seem to be laid out flipped vertically.Tony Wasserka1-1/+1
Not sure if this is a correct fix. Probably should instead change the decoding logic itself.
2014-12-31Pica/DebugUtils: Fix a bug in RGBA4 texture decoding.Tony Wasserka1-2/+2
2014-12-31Pica/Rasterizer: Implement alpha blending.Tony Wasserka1-0/+84
2014-12-31Pica/Rasterizer: Implement depth testing.Tony Wasserka2-6/+34
2014-12-31Pica/Rasterizer: Further enhance Tev support.Tony Wasserka1-4/+19
2014-12-31Pica: Add output merger definitions.Tony Wasserka1-1/+56
2014-12-31Pica: Fix A4, IA4 and IA8 texture formats.Tony Wasserka1-13/+7
Both IA4 and IA8 had their component order mixed up. Additionally, IA4 used the wrong number of nibbles per texel. A4 skipped every second texel.
2014-12-31Pica/CommandProcessor: Add support for integer uniforms.Tony Wasserka4-1/+30
2014-12-29Rasterizer: Pre-divide vertex attributes by WYuri Kunde Schlesner3-8/+32
Execute the division-by-W for perspective-correct interpolation of values in the clipper, moving them out of the rasterization inner loop.
2014-12-29GPU: Bitwise texture swizzlingYuri Kunde Schlesner1-27/+24
Replace the loop-based texture address swizzling code by a bit-twiddling implementation, providing a very small speed up. Also simplify addressing code.
2014-12-29Rasterizer: Common sub-expression eliminationYuri Kunde Schlesner1-14/+17
Move the computation of some values out of loops so that they're not constantly recalculated even when they don't change.
2014-12-29Clipper: Compact buffers on each clipping passYuri Kunde Schlesner1-28/+27
Use a new buffer management scheme in the clipper that allows using a bounded minimal amount of buffer space. Even though it copies more data it is still slightly faster likely due to using less cache.
2014-12-29Clipper: Avoid dynamic allocationsYuri Kunde Schlesner1-10/+7
The triangle clipper was allocating its temporary input, output and work buffers using a std::vector. Since this is a hot path, it's desirable to use stack allocation instead.
2014-12-29Vertex Shader: Zero OutputVertex to avoid denormalsYuri Kunde Schlesner1-0/+4
Unused OutputVertex attributes were being left un-initialized. The leftover garbage sometimes decoded as floating-point denormalized values, causing fallbacks to microcode and massive slowdowns in the rest of the rasterization pipeline even though the results were unused. By zeroing the structure we ensure these attributes only contain harmless zeros.
2014-12-29GPU: Implement frameskip and remove forced framebuffer swap hack.bunnei1-0/+5
2014-12-21Fix visual studio ambiguous symbol errorApology111-4/+4
2014-12-21More warning cleanupsChin2-7/+7
2014-12-21License changepurpasmart9623-23/+23
2014-12-20Pica/VertexShader: Promote a log message to critical status.Tony Wasserka1-1/+1
2014-12-20Pica/VertexShader: Small optimization.Tony Wasserka1-7/+7
2014-12-20Pica/VertexShader: Be robust against invalid inputs.Tony Wasserka1-2/+9
More specifically, this also fixes crashes by Citra trying to load a src2 register even if the current instruction does not use that.
2014-12-20Pica/VertexShader: Clarify a comment.Tony Wasserka1-1/+3
2014-12-20Pica/DebugUtils: Further cleanups to LookupTexture.Tony Wasserka1-7/+7
2014-12-20Pica/DebugUtils: Fix two warnings.Tony Wasserka1-2/+2
2014-12-20Pica/DebugUtils: Better document LookupTexture.Tony Wasserka2-7/+16
2014-12-20Pica/Rasterizer: Get rid of C-style casts.Tony Wasserka1-4/+4
2014-12-20Pica/DebugUtils: Make a number of variables static.Tony Wasserka1-13/+13
Makes for cleaner and faster code.
2014-12-20Pica/VertexShader: Cleanup flow control logic and implement CMP/IFU instructions.Tony Wasserka1-50/+56
2014-12-20Pica/VertexShader: Run instruction handlers according to the effective opcode.Tony Wasserka1-1/+1
This allows for proper emulation of the different CMP/LRP/MAD instructions.
2014-12-20Pica/VertexShader: Implement MAX instructions.Tony Wasserka1-0/+9
2014-12-20Pica: Add support for boolean uniforms.Tony Wasserka4-2/+21
2014-12-20Pica/VertexShader: Add support for MOVA, CMP and IFC.Tony Wasserka2-7/+138
2014-12-20Pica/VertexShader: Move code around a bit.Tony Wasserka1-42/+58
2014-12-20Pica/VertexShader: Some cleanups using std::array.Tony Wasserka2-5/+19
2014-12-20Pica/VertexShader: Support negating src2.Tony Wasserka2-3/+9
2014-12-20Pica/DebugUtils: Replace duplicated SHBIN structures in favor of nihstro's ones.Tony Wasserka1-61/+8
2014-12-20Pica/VertexShader: Remove (now) duplicated shader bytecode definitions in favor of nihstro's ones.Tony Wasserka2-222/+30
2014-12-20Pica/DebugUtils: Add an event triggered after loading a vertex.Tony Wasserka2-0/+4
2014-12-20Pica/PrimitiveAssembly: Implement triangle strips.Tony Wasserka2-8/+16
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-20Add support for a ridiculous number of texture formats.Tony Wasserka2-7/+80
2014-12-20Pica: Unify ugly address translation hacks.Tony Wasserka5-16/+25
2014-12-20Pica: Further improve Tev emulation.Tony Wasserka3-12/+51
2014-12-20Pica: Merge texture lookup logic for DebugUtils and Rasterizer.Tony Wasserka3-55/+41
This effectively adds support for a lot texture formats in the rasterizer.
2014-12-20Pica: Implement texture wrapping.Tony Wasserka2-2/+31
2014-12-20Pica/DebugUtils: Add support for RGBA8, RGBA5551, RGBA4 and A8 texture formats.Tony Wasserka2-3/+48
2014-12-20Pica: Initial support for multitexturing.Tony Wasserka3-24/+83
2014-12-20Clean up some warningsChin1-2/+2
2014-12-19Properly erase/remove an observerchinhodado1-1/+1
2014-12-13Convert old logging calls to new logging macrosYuri Kunde Schlesner10-38/+50
2014-12-12MemMap: Renamed "GSP" heap to "linear", as this is not specific to GSP.bunnei1-2/+2
- Linear simply indicates that the mapped physical address is always MappedVAddr+0x0C000000, thus this memory can be used for hardware devices' DMA (such as the GPU).
2014-12-10GSP: Trigger GPU interrupts at more accurate locations.bunnei2-1/+15
2014-12-10GPU: Fixed bug in command list size decoding.bunnei1-1/+2
2014-12-09Pica: Re-enable command names on MSVC.Tony Wasserka1-5/+0
The affected code is no longer limited by compiler support on that platform.
2014-12-09More coding style fixes.Tony Wasserka1-6/+12
2014-12-09Some code cleanup.Tony Wasserka1-3/+1
2014-12-09citra_qt: Add enhanced texture debugging widgets.Tony Wasserka3-1/+30
Double-clicking a texture parameter command in the pica command lists will spawn these as a new tab in the pica command list dock area.
2014-12-09citra-qt: Add texture viewer to Pica command list.Tony Wasserka2-21/+45
The texture viewer is enabled when selecting a write command to one of the texture config registers.
2014-12-09Pica/DebugUtils: Add breakpoint functionality.Tony Wasserka3-0/+189
2014-12-09Build fix for something which shouldn't have compiled successfully to begin with.Tony Wasserka1-1/+1
2014-12-07Integrate Boost into build system and perform a trivial cleanup in vertex_shader.cpp.Tony Wasserka1-6/+10
2014-12-03Change NULLs to nullptrs.Rohit Nirmal2-7/+7
2014-12-01Silence a few -Wsign-compare warnings.Rohit Nirmal3-6/+6
2014-11-30Fixed viewport error caused by roundingvaguilar1-2/+2
2014-11-19Remove tabs in all files except in skyeye imports and in generated GL codeEmmanuel Gil Peyrot4-14/+14
2014-11-19Remove trailing spaces in every file but the ones imported from SkyEye, AOSP or generatedEmmanuel Gil Peyrot2-3/+3
2014-11-18OpenGL Renderer: Cleanup viewport extent calculation.Tony Wasserka2-44/+29
2014-11-18Fixup EmuWindow interface and implementations thereof.Tony Wasserka1-3/+3
2014-11-18Viewport scaling and display density independenceKevin Hartman2-1/+50
The view is scaled to be as large as possible, without changing the aspect, within the bounds of the window. On "retina" displays, or other displays where window units != pixels, the view should no longer draw incorrectly.
2014-11-16vertex_shader: Fix control reaches end of function warningLioncash1-1/+1
2014-11-14Fix two format strings.Lioncash1-2/+2
2014-10-30Fix some warningsSean2-3/+3
2014-10-29Renamed souce files of services to match port namesGareth Poole1-1/+1
2014-10-26Add `override` keyword through the code.Yuri Kunde Schlesner1-4/+4
This was automated using `clang-modernize`.
2014-10-21Only check OpenGL shader log if size is >1.Yuri Kunde Schlesner1-9/+6
This prevents a crash when the buffer size returned by the driver is 0, in which case no space is allocated to store even the NULL byte and glGetShaderInfoLog errors out. Thanks to @Relys for the bug report.
2014-10-12Rework OpenGL renderer.Yuri Kunde Schlesner4-233/+193
The OpenGL renderer has been revised, with the following changes: - Initialization and rendering have been refactored to reduce the number of redundant objects used. - Framebuffer rotation is now done directly, using texture mapping. - Vertex coordinates are now given in pixels, and the projection matrix isn't hardcoded anymore.
2014-10-12OpenGL renderer: Shuffle initialization code around and rename functions.Yuri Kunde Schlesner2-25/+18
2014-10-12Remove virtual inheritance from RendererOpenGLYuri Kunde Schlesner2-3/+3
Also make destructor virtual so that instances are properly destructed.
2014-10-08Fix warnings in video_coreLioncash7-23/+23
2014-09-17Common: Rename the File namespace to FileUtil, to match the filename and prevent collisions.Emmanuel Gil Peyrot1-1/+1
2014-09-14Core: Fix warnings in gpu.cppLioncash1-1/+1
2014-09-12Added support for multiple input device types for KeyMap and connected Qt.Kevin Hartman1-0/+1
2014-09-09Moved common_types::Rect from common to Common namespacearchshift2-3/+3
2014-09-07renderer_opengl.cpp: improved alignment for readabilityarchshift1-16/+16
2014-09-07Dead code removal: video_core.cpp, load_symbol_map.cpparchshift1-7/+0
2014-09-07utils: cleaned up DumpTGA, removing redundanciesarchshift2-21/+13
2014-09-01Remove hand-crafted Visual Studio solution.Yuri Kunde Schlesner2-217/+0
2014-09-01CMake cleanupYuri Kunde Schlesner1-13/+26
Several cleanups to the buildsystem: - Do better factoring of common libs between platforms. - Add support to building on Windows. - Remove Qt4 support. - Re-sort file lists and add missing headers.
2014-09-01Replace GLEW with a glLoadGen loader.Yuri Kunde Schlesner10-13/+2819
This should fix the GL loading errors that occur in some drivers due to the use of deprecated functions by GLEW. Side benefits are more accurate auto-completion (deprecated function and symbols don't exist) and faster pointer loading (less entrypoints to load). In addition it removes an external library depency, simplifying the build system a bit and eliminating one set of binary libraries for Windows.
2014-08-28Downgrade GLSL version to 1.50 (compatible with GL 3.2)Yuri Kunde Schlesner3-10/+15
2014-08-26VideoCore: Fixes rendering issues on Qt and corrects framebuffer output size.bunnei4-8/+15
2014-08-26Rewrite of OpenGL renderer, including OS X supportKevin Hartman8-211/+340
Screen contents are now displayed using textured quads. This can be updated to expose an FBO once an OpenGL backend for when Pica rendering is being worked on. That FBO's texture can then be applied to the quads. Previously, FBO blitting was used in order to display screen contents, which did not work on OS X. The new textured quad approach is less of a compatibility risk.
2014-08-25Pica/Rasterizer: Clarify a TODO.Tony Wasserka1-1/+3
2014-08-25Pica/VertexShader: Fix a bug in the call stack handling.Tony Wasserka1-2/+3
2014-08-25Math: Warning fixes.Tony Wasserka1-14/+23
2014-08-25Pica: Consolidate the primitive assembly code in PrimitiveAssembly and GeometryDumper.Tony Wasserka5-46/+74
2014-08-25Pica/Rasterizer: Add texturing support.Tony Wasserka3-18/+69
2014-08-25Pica/DebugUtils: Add convenient tev setup printer.Tony Wasserka3-0/+101
2014-08-25Pica/Rasterizer: Add initial implementation of texture combiners.Tony Wasserka2-2/+225
2014-08-25Pica: Add support for dumping textures.Tony Wasserka3-1/+177
2014-08-25Pica/Math: Improved the design of the Vec2/Vec3/Vec4 classes and simplified rasterizer code accordingly.Tony Wasserka3-98/+133
- Swizzlers now return const objects so that things like "first_vec4.xyz() = some_vec3" now will fail to compile (ideally we should support some vector holding references to make this actually work). - The methods "InsertBeforeX/Y/Z" and "Append" have been replaced by more versions of MakeVec, which now also supports building new vectors from vectors. - Vector library now follows C++ type promotion rules (hence, the result of Vec2<u8> with another Vec2<u8> is now a Vec2<int>).
2014-08-25Pica/VertexShader: Fix a bug in the bitfield definitions and add the "negate" field for swizzlers.Tony Wasserka2-14/+92
2014-08-25Pica/citra-qt: Replace command list view and command list debugging code with something more sophisticated.Tony Wasserka4-63/+78
2014-08-25Pica/CommandProcessor: Implement parameter masking.Tony Wasserka2-6/+25
2014-08-25Pica: Add debug utilities for dumping shaders.Tony Wasserka4-1/+227
2014-08-25Pica: Add debug utility functions for dumping geometry data.Tony Wasserka6-4/+123
2014-08-24Fix the threading for GL Context in Qt5.Sacha1-1/+0
Connect the emu_thread start/finish to a moveContext slot.
2014-08-13float24: Remove private default constructorarchshift1-2/+0
Fixes building with clang.
2014-08-12Use glewExperimental on Linux in order to fix GLFW-modearchshift1-3/+2
2014-08-12Pica: Add basic rasterizer.Tony Wasserka7-2/+260
2014-08-12Pica: Add triangle clipper.Tony Wasserka7-8/+230
2014-08-12Pica: Add primitive assembly stage.Tony Wasserka7-2/+95
2014-08-12Pica: Add vertex shader implementation.Tony Wasserka7-10/+722
2014-08-12Pica: Implement vertex loading.Tony Wasserka2-8/+102
2014-08-12Pica: Add register definition for vertex loading and rendering.Tony Wasserka1-33/+128
2014-08-12Pica: Add command processor.Tony Wasserka7-5/+107
2014-08-12Pica: Add float24 structure.Tony Wasserka1-0/+75
24-bit floating points are used internally for calculations on the GPU, however the current code will still emulate that with 32-bit floating points. In the future we might want to accurately perform the calculations with correct bitness in the future, but for now we just wrap the calculations around this class.
2014-08-12Video core: Add utility class for vector operations.Tony Wasserka4-1/+582
I wrote most of this for ppsspp, so I hold full copyright over it. In addition to the original release in ppsspp, this provides functionality to easily extend e.g. two-dimensional vectors to three-dimensional vectors.
2014-08-12Pica/GPU: Change hardware registers to use physical addresses rather than virtual ones.Tony Wasserka2-8/+8
This cleans up the mess that address reading/writing had become and makes the code a *lot* more sensible. This adds a physical<->virtual address converter to mem_map.h. For further accuracy, we will want to properly extend this to support a wider range of address regions. For now, this makes simply homebrew applications work in a good manner though.
2014-08-12Remove the fancy RegisterSet class introduced in 4c2bff61e.Tony Wasserka2-100/+146
While it was some nice and fancy template usage, it ultimately had many practical issues regarding length of involved expressions under regular usage as well as common code completion tools not being able to handle the structures. Instead, we now use a more conventional approach which is a lot more clean to use.
2014-08-06GSP: Removed dumb GX prefixes to functions/structs in GSP namespace.bunnei1-6/+6
- Various other cleanups.
2014-07-23Use uniform formatting when printing hexadecimal numbers.Tony Wasserka1-1/+1
2014-07-23GSP: Clean up GX command processing a lot and treat command id as a u8 rather than a u32.Tony Wasserka1-3/+2
Anonymous structs are not standard C++, hence don't use them.
2014-07-23RegisterSet: Simplify code by using structs for register definition instead of unions.Tony Wasserka1-9/+9
2014-07-23GPU: Make use of RegisterSet.Tony Wasserka1-26/+28
2014-07-23Renderer: Fix component order in bottom framebuffer.Tony Wasserka2-5/+4
2014-07-23Renderer: Respect the active_fb GPU register.Tony Wasserka1-2/+9
2014-07-23Renderer: Add a few TODOs.Tony Wasserka1-3/+10
2014-07-22GPU debugger: Don't keep track of debugging data if no debugger views are active.Tony Wasserka1-0/+6
2014-06-12GPU debugger: Const correctness and build fix.Tony Wasserka1-3/+3
2014-06-12Preprocessor: #if's out OSX-specific GL changes on other platformsarchshift1-0/+3
2014-06-12Pica: Use some template magic to define register structures efficiently.Tony Wasserka1-25/+102
2014-06-12Further refine GPU command list debugging.Tony Wasserka2-0/+17
2014-06-12Refine command list debugging functionality and its qt interface.Tony Wasserka2-8/+17
2014-06-12citra-qt: Add command list view.Tony Wasserka1-2/+2
2014-06-12GPU debugger: Add functionality to inspect command lists.Tony Wasserka1-1/+53
2014-06-12video core: added PICA definitions file.Tony Wasserka3-0/+37
2014-06-12Rename LCD to GPU.Tony Wasserka1-3/+3
2014-06-12Add initial graphics debugger interface.Tony Wasserka3-3/+102
2014-05-20common_types: Changed BasicRect back to Rect, in the common namespacearchshift2-3/+3
Only Rect is in the namespace for now; the rest of common should be added in the future
2014-05-20Improved clarity and whitespacearchshift2-3/+4
Changed QGL version to 3,2 in order to be less restrictive, yet it should still change up to 4,1 on OSX on Qt5.
2014-05-20CMakeLists: rename HEADS, improved commentsarchshift1-2/+2
Changes for clarity of comments, removed redundant compiler flags.
2014-05-19Indent fixesarchshift1-31/+31
2014-05-08Update FlipFramebufferSethpaien1-7/+6
Less calculations + fix
2014-05-01Fixed indentsarchshift2-37/+35
2014-05-01Reverse debugging changesarchshift1-2/+0
2014-05-01Unintended change reversalarchshift1-36/+36
2014-05-01TGA dumps work, courtesy of @bunneiarchshift2-36/+38
2014-05-01OpenGL 3+ on OSX with GLFWarchshift1-0/+2
2014-04-29IT'S ALIVE!archshift1-1/+6
2014-04-28Xcode complains that the class name is redundant.archshift1-1/+1
2014-04-28Rect to BasicRectarchshift2-3/+3
Somewhere along the line an OSX header had already taken the name Rect.
2014-04-28removed DISALLOW_COPY_AND_ASSIGN in favor of NonCopyable classbunnei2-4/+1
2014-04-27fixed renderer to use correct framebuffer locationbunnei2-8/+7
2014-04-22fixed GL context acquire (applies to Qt GUI only)bunnei1-0/+2
2014-04-18renamed hw_lcd module to just lcdbunnei1-1/+1
2014-04-17fixed framebuffer color orderbunnei1-1/+1
2014-04-17removed hard-coded framebuffer addresses from renderer_opengl.cppbunnei1-2/+4
2014-04-11cleaned up some logging messagesbunnei1-1/+2
2014-04-10fixed a bunch of errors in CMakeListsbunnei1-3/+3
2014-04-10updated CMakeListsbunnei1-16/+2
2014-04-09fixed project includes to use new directory structurebunnei9-38/+39
2014-04-09got rid of 'src' folders in each sub-projectbunnei7-0/+0
2014-04-09fixed license header in video_corebunnei7-182/+23
2014-04-09- removed lots of unused code from gekkobunnei3-367/+110
- updated code style/naming conventions
2014-04-07added support for renderering the external framebuffersbunnei2-20/+147
2014-04-07added external framebuffer GL handlesbunnei1-2/+11
2014-04-06added initial renderer codebunnei7-19/+534
2014-04-05added video_core project to solutionbunnei8-0/+567