summaryrefslogtreecommitdiffstats
path: root/src/video_core (unfollow)
Commit message (Collapse)AuthorFilesLines
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