summaryrefslogtreecommitdiffstats
path: root/src/video_core/renderer_opengl/gl_device.cpp (follow)
Commit message (Collapse)AuthorAgeFilesLines
* gl_shader_decompiler: Add safe fallbacks when ARB_shader_ballot is not availableReinUsesLisp2019-11-081-0/+2
|
* gl_rasterizer: Upload constant buffers with glNamedBufferSubDataReinUsesLisp2019-11-021-0/+4
| | | | | | | | | | | | | | | | Nvidia's OpenGL driver maps gl(Named)BufferSubData with some requirements to a fast. This path has an extra memcpy but updates the buffer without orphaning or waiting for previous calls. It can be seen as a better model for "push constants" that can upload a whole UBO instead of 256 bytes. This path has some requirements established here: http://on-demand.gputechconf.com/gtc/2014/presentations/S4379-opengl-44-scene-rendering-techniques.pdf#page=24 Instead of using the stream buffer, this commits moves constant buffers uploads to calls of glNamedBufferSubData and from my testing it brings a performance improvement. This is disabled when the vendor is not Nvidia since it brings performance regressions.
* shader/image: Implement SULD and remove irrelevant codeReinUsesLisp2019-09-211-0/+22
| | | | | * Implement SULD as float. * Remove conditional declaration of GL_ARB_shader_viewport_layer_array.
* gl_device: Disable precise in fragment shaders on bugged driversReinUsesLisp2019-09-041-14/+29
|
* shader_ir: Implement VOTEReinUsesLisp2019-08-211-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implement VOTE using Nvidia's intrinsics. Documentation about these can be found here https://developer.nvidia.com/reading-between-threads-shader-intrinsics Instead of using portable ARB instructions I opted to use Nvidia intrinsics because these are the closest we have to how Tegra X1 hardware renders. To stub VOTE on non-Nvidia drivers (including nouveau) this commit simulates a GPU with a warp size of one, returning what is meaningful for the instruction being emulated: * anyThreadNV(value) -> value * allThreadsNV(value) -> value * allThreadsEqualNV(value) -> true ballotARB, also known as "uint64_t(activeThreadsNV())", emits VOTE.ANY Rd, PT, PT; on nouveau's compiler. This doesn't match exactly to Nvidia's code VOTE.ALL Rd, PT, PT; Which is emulated with activeThreadsNV() by this commit. In theory this shouldn't really matter since .ANY, .ALL and .EQ affect the predicates (set to PT on those cases) and not the registers.
* Merge pull request #2695 from ReinUsesLisp/layer-viewportFernando Sahmkow2019-07-151-0/+2
|\ | | | | gl_shader_decompiler: Implement gl_ViewportIndex and gl_Layer in vertex shaders
| * gl_shader_decompiler: Implement gl_ViewportIndex and gl_Layer in vertex shadersReinUsesLisp2019-07-081-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | This commit implements gl_ViewportIndex and gl_Layer in vertex and geometry shaders. In the case it's used in a vertex shader, it requires ARB_shader_viewport_layer_array. This extension is available on AMD and Nvidia devices (mesa and proprietary drivers), but not available on Intel on any platform. At the moment of writing this description I don't know if this is a hardware limitation or a driver limitation. In the case that ARB_shader_viewport_layer_array is not available, writes to these registers on a vertex shader are ignored, with the appropriate logging.
* | gl_device: Query SSBO alignmentReinUsesLisp2019-07-061-0/+1
|/
* gl_device: Fix TestVariableAoffi testReinUsesLisp2019-06-121-1/+2
| | | | | | | | | | | | This test is intended to be invalid GLSL, but it was being invalid in two points instead of one. The intention is to use a non-immediate parameter in a textureOffset like function. The problem is that this shader was being compiled as a separable shader object and the text was writting to gl_Position without a redeclaration, being invalid GLSL. Address that issue by using a user-defined output attribute.
* Merge pull request #2512 from ReinUsesLisp/comp-indexingbunnei2019-06-061-0/+54
|\ | | | | gl_shader_decompiler: Pessimize uniform buffer access on AMD's prorpietary driver
| * gl_device: Add test to detect broken component indexingReinUsesLisp2019-05-241-0/+54
| | | | | | | | | | | | | | | | | | | | Component indexing on AMD's proprietary driver is broken. This commit adds a test to detect when we are on a driver that can't successfully manage component indexing. It dispatches a dummy draw with just one vertex shader that writes to an indexed SSBO from the GPU with data sent through uniforms, it then reads that data from the CPU and compares the expected output.
* | gl_device: Add commentary to AOFFI unit test source codeReinUsesLisp2019-05-271-0/+1
|/ | | | | The intention behind this commit is to hint someone inspecting an apitrace dump to ignore this ill-formed GLSL code.
* gl_shader_decompiler: Declare all possible varyings on physical attribute usageReinUsesLisp2019-05-031-0/+9
|
* gl_shader_decompiler: Use variable AOFFI on supported hardwareReinUsesLisp2019-04-141-3/+21
|
* gl_device: Implement interface and add uniform offset alignmentReinUsesLisp2019-04-101-0/+27