aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers
Commit message (Collapse)AuthorAgeFilesLines
* r600/radeonsi: silence zero-length-bounds gcc warningsTimothy Arceri2020-07-083-8/+9
| | | | | Reviewed-by: Marek Olšák <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5766>
* gallium: add PIPE_SHADER_CAP_GLSL_16BIT_TEMPS for LowerPrecisionTemporariesMarek Olšák2020-07-0716-0/+20
| | | | | Reviewed-by: Rob Clark <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5746>
* llvmpipe: add ARB_post_depth_coverage support.Dave Airlie2020-07-082-3/+30
| | | | | | | | This doesn't pass thie piglits because currently they are broken for case where GL upgrades 2 samples to 4 Reviewed-by: Roland Scheidegger <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5767>
* draw/gs: use mask to limit vertex emission.Dave Airlie2020-07-081-0/+1
| | | | | | | | | | | | When executing for a single primitive, the mask has only one active lane, however the vertex emit emits for all the lanes, pass in the active mask and write the excess lanes to the overflow slot. Fixes: glsl-1.50-gs-max-output -scan 1 20 Reviewed-by: Roland Scheidegger <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5555>
* gallivm/gs_iface: pass stream into end primitive interface.Dave Airlie2020-07-081-1/+1
| | | | | | | This is just an API change for now Reviewed-by: Roland Scheidegger <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5555>
* util: Share a single function pointer for the 4-byte rgba unpack function.Eric Anholt2020-07-071-1/+1
| | | | | | | | Everyone wants the same behavior, and this helps shrink the size of our format description tables. Reviewed-by: Marek Olšák <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5728>
* llvmpipe: Generalize "could llvmpipe fetch this format" check in unit testing.Eric Anholt2020-07-071-11/+7
| | | | | | | | | This set of checks matched the "access" list in u_format_table.py that controls initializing this this function pointer, so just use the function pointer. Reviewed-by: Marek Olšák <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5728>
* util: Merge util_format_read_4* functions.Eric Anholt2020-07-071-38/+19
| | | | | | | | Everyone wants the same thing: unpack 4-bytes-per-channel data based on the base type of the format. Reviewed-by: Marek Olšák <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5728>
* util: Merge util_format_write_4* functions.Eric Anholt2020-07-071-25/+11
| | | | | | | | Everyone wants the same thing: pack 4-bytes-per-channel data based on the base type of the format. Reviewed-by: Marek Olšák <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5728>
* svga: Reuse util_format_unpack_rgba().Eric Anholt2020-07-071-12/+1
| | | | | | | This assumes that pipe_color_union is a vec4, but that seems safe. Reviewed-by: Marek Olšák <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5728>
* etnaviv: Use the util_pack_color_union() helper.Eric Anholt2020-07-071-7/+1
| | | | | | | | This snuck in since I cleaned up the other instances of it. Reviewed-by: Christian Gmeiner <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5728>
* softpipe: Clean up softpipe's SSBO load/store interpreting instructions.Eric Anholt2020-07-071-25/+9
| | | | | | | | | There's no need to go to all this trouble of setting up 16-byte vectors to pack/unpack our 32-bit values, memcpy is really good at moving 4 bytes around. Reviewed-by: Marek Olšák <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5728>
* nv50/ir/nir: fix cache mode conversionKarol Herbst2020-07-071-6/+3
| | | | | | | | The nir access qualifier is actually a bitfield, so we need to read out like one. Signed-off-by: Karol Herbst <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5747>
* gv100/ir: fix coherent and volatile memory accessKarol Herbst2020-07-072-15/+10
| | | | | Signed-off-by: Karol Herbst <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5747>
* gv100/ir: implement sample shadingKarol Herbst2020-07-071-7/+45
| | | | | | | Fixes sample shading tests in the Khronos OpenGL(ES) CTS Signed-off-by: Karol Herbst <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5747>
* nv50/ir/nir: fix interpolation on explicit operationsKarol Herbst2020-07-071-2/+12
| | | | | | | Fixes a bunch of interpolate tests in the aosp GLES CTS Signed-off-by: Karol Herbst <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5747>
* iris: Fix fast-clearing of depth via glClearTex(Sub)ImageDanylo Piliaiev2020-07-071-1/+1
| | | | | | | | | | | | | | | If we clear depth only texture via glClearTex(Sub)Image it may cause: ../src/intel/blorp/blorp_genX_exec.h:1554: blorp_emit_surface_states: Assertion `params->depth.enabled || params->stencil.enabled' failed. due to clear_depth_stencil calling blorp_clear_depth_stencil when depth is already fast-cleared and there is no stencil. Fixes piglit test: arb_clear_texture-depth Fixes: 51638cf18a532510f9e1fd8f36207b56d38137b8 Signed-off-by: Danylo Piliaiev <[email protected]> Reviewed-by: Lionel Landwerlin <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5770>
* gallium/swr: Fix compilation warningsjzielins2020-07-079-73/+34
| | | | | | | | | | | In some places in SWR cod objects are initialized using memset/memcpy. This is usually done to enable allocating those objects in aligned memory. It generates compilation warnings though, which are worked around by casting the pointers to void* before calling memset/memcpy. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5777>
* freedreno/a6xx: Force gl_Layer to 0 when necessaryConnor Abbott2020-07-071-0/+2
| | | | Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5732>
* panfrost: Expose MSAA 4xAlyssa Rosenzweig2020-07-071-3/+0
| | | | | Signed-off-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5782>
* panfrost: Save sample_mask before blittingAlyssa Rosenzweig2020-07-071-3/+1
| | | | | Signed-off-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5782>
* panfrost: Enable MSAA if we render to such a surfaceAlyssa Rosenzweig2020-07-071-0/+11
| | | | | | | We hit this case for clears of MSAA surfaces without draws. Signed-off-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5782>
* panfrost: Set depth/stencil_layer_stride accordinglyAlyssa Rosenzweig2020-07-071-0/+11
| | | | | | | Same logic as colour layer stride, I think. Signed-off-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5782>
* panfrost: Implement alpha-to-coverageAlyssa Rosenzweig2020-07-072-2/+5
| | | | | Signed-off-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5782>
* panfrost: Pass sample_mask to the hardwareAlyssa Rosenzweig2020-07-073-1/+9
| | | | | | | Gallium computes it for us. Signed-off-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5782>
* panfrost: Identify coverage_maskAlyssa Rosenzweig2020-07-071-1/+1
| | | | | | | The driver specifies the mask directly. Signed-off-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5782>
* panfrost: Don't advertise MSAA 2xAlyssa Rosenzweig2020-07-071-2/+3
| | | | | | | | Let the frontend promote to MSAA 4x if the app requests it. We don't support MSAA 2x. Signed-off-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5782>
* panfrost: Set layer_stride for multisampled renderingAlyssa Rosenzweig2020-07-071-0/+12
| | | | | Signed-off-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5782>
* panfrost: Index texture by sampleAlyssa Rosenzweig2020-07-075-7/+9
| | | | | | | This will allow MSAA to route through. Signed-off-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5782>
* panfrost: Allocate space for multisamplingAlyssa Rosenzweig2020-07-071-1/+14
| | | | | | | As an effective depth. Ugly but matches the blob. Signed-off-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5782>
* panfrost: Set depth to sample_count for MSAA 2DAlyssa Rosenzweig2020-07-071-2/+14
| | | | | | | Treated like a 3D texture. Signed-off-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5782>
* ir3: use empirical size for params as used by the shaderIlia Mirkin2020-07-061-7/+8
| | | | | | | | | | | | For example only some UCPs may be used by the shader, triggering asserts that too many consts are being uploaded. While we're at it, also fix the const size when loading UCPs, since otherwise it doesn't correspond to what the shader is actually using. Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Rob Clark <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5752>
* v3d: Enable perpendicular line caps when line smoothingNeil Roberts2020-07-061-0/+6
| | | | | | | | | | | V3D has a bit to set the line caps to be perpendicular to the line rather than aligned to the edges of the framebuffer. I don’t know what the disadvantages are of enabling this, but I noticed by experimentation that enabling line smoothing on the Intel driver also enables nicer line caps, so it seems nice to enable it here too. Reviewed-by: Eric Anholt <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5624>
* v3d: Add a lowering pass for line smoothingNeil Roberts2020-07-065-2/+56
| | | | | | | | | | | | | | | | | | | | | | | | | When line smoothing is enabled, the driver now increases the width of the line so that it can add some semi-transparent pixels to either side of the line. A lowering pass is added which modifies the alpha component of every write to fragment output 0 so that if the fragment is outside the width of the line then the alpha is reduced. It additionally discards fragments that are completely invisible. It might seem bad to use discard on a tiled renderer but the assumption is that any bad effects from using discard will also happen anyway because of enabling alpha blending. v2: Disable the line smoothing pass entirely when the framebuffer contains an integer colour output or one with no alpha channel. Calculate the coverage once upfront and store in a global variable instead of calculating each time an output write is modified. Also do the conditional discard once upfront. v3: Don’t check whether the output buffer has an alpha channel. Only look at output 0. Use aa_line_width intrinsic instead of calculating the real line width in the shader. Clamp the coverage as part of the global variable, not per output write. Reviewed-by: Eric Anholt <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5624>
* v3d: Handle the line width intrinsicsNeil Roberts2020-07-061-0/+11
| | | | | | | | | Adds new QUNIFORMs to store the line widths. v2: Also handle the aa_line_width intrinsic Reviewed-by: Eric Anholt <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5624>
* intel/perf: move query_mask and location out of gen_perf_query_counterMarcin Ślusarz2020-07-061-5/+6
| | | | | | | Signed-off-by: Marcin Ślusarz <[email protected]> Reviewed-by: Lionel Landwerlin <[email protected]> Reviewed-by: Mark Janes <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5399>
* iris: remove iris_monitor_configMarcin Ślusarz2020-07-063-108/+20
| | | | | | | | | | | | | | | | | | | perf_cfg is enough - it already contains almost all necessary information and is constructed in a more optimal way (O(n) vs O(n^2) - it uses hash table to build the unique counter list). "Almost all", because it doesn't contain OA raw counters, but we should have not exposed them anyway. Quoting Mark Janes: "I see no reason to include the OA raw counters in the list that are provided to the user. They are unusable. The MDAPI library can be used to configure raw counters in a way that provides esoteric metrics, but that library is written against INTEL_performance_query." Signed-off-by: Marcin Ślusarz <[email protected]> Reviewed-by: Lionel Landwerlin <[email protected]> Reviewed-by: Mark Janes <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5399>
* a4xx: hook up centroid ij coordsIlia Mirkin2020-07-061-2/+5
| | | | | | | | | | This is necessary now that the compiler respects centroid interpolation, even in non-MSAA mode. Otherwise the interpolation doesn't work. Fixes a bunch of dEQP centroid transform feedback tests. Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Rob Clark <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5778>
* v3d: Only call nir_lower_io on shader_in/outJason Ekstrand2020-07-061-8/+6
| | | | | | | | | | Gallium drivers should never see nir_var_uniform because gallium lowers regular uniforms to a UBO. No GL driver should ever see either nir_var_mem_shared because that's lowered in GLSL IR. Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Connor Abbott <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5418>
* vc4: Only call nir_lower_io on shader_in/outJason Ekstrand2020-07-061-2/+2
| | | | | | | | | | Gallium drivers should never see nir_var_uniform because gallium lowers regular uniforms to a UBO. No GL driver should ever see either nir_var_mem_shared because that's lowered in GLSL IR. Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Connor Abbott <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5418>
* nouveau: Only call nir_lower_io on shader_in/outJason Ekstrand2020-07-061-1/+3
| | | | | | | | | | Gallium drivers should never see nir_var_uniform because gallium lowers regular uniforms to a UBO. No GL driver should ever see either nir_var_mem_shared because that's lowered in GLSL IR. Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Connor Abbott <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5418>
* lima: Only call nir_lower_io on shader_in/outJason Ekstrand2020-07-061-2/+4
| | | | | | | | | | Gallium drivers should never see nir_var_uniform because gallium lowers regular uniforms to a UBO. No GL driver should ever see either nir_var_mem_shared because that's lowered in GLSL IR. Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Connor Abbott <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5418>
* freedreno: Only call nir_lower_io on shader_in/outJason Ekstrand2020-07-062-7/+12
| | | | | | | | | | Gallium drivers should never see nir_var_uniform because gallium lowers regular uniforms to a UBO. No GL driver should ever see either nir_var_mem_shared because that's lowered in GLSL IR. Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Connor Abbott <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5418>
* etnaviv: replace prims-emitted queryChristian Gmeiner2020-07-063-6/+6
| | | | | | | | | | As we do not support stream output buffers we only count the primitives processed by the pipeline. Use the correct query type. Cc: <[email protected]> Signed-off-by: Christian Gmeiner <[email protected]> Reviewed-by: Lucas Stach <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5754>
* a4xx: add polygon offset clamp, fix unitsIlia Mirkin2020-07-064-3/+7
| | | | | | | | | | | | For some reason, in order to get all tests to pass, pretty much all hardware (across vendors) has to program in offset_units * 2. This fixes dEQP-GLES3.functional.polygon_offset.float32_displacement_with_units. While we're at it, add polygon offset clamp support. Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Rob Clark <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5763>
* a4xx: add noperspective interpolation supportIlia Mirkin2020-07-062-18/+16
| | | | | | Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Rob Clark <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5753>
* freedreno/ir3: fix/rework tess levelsJonathan Marek2020-07-061-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | The previous version assumes tess level outputs will only be written once in the shader, however its not possible to guarantee that. It also assumes all invocations will write all the levels, which is also not guaranteed. This is required to fix the "tesselation" and "terraintessellation" demos with turnip. The comment about nir_lower_io_to_temporaries in lower_tess_ctrl_block is removed because nir_lower_io_to_temporaries specifically skips TESS_CTRL shaders so the comment doesn't make sense. The split load for tess levels workaround is removed, the new version only has scalar access unless if ever gets vectorized. This sets NIR_COMPACT_ARRAYS cap to avoid the glsl tess vec lowering with gallium. It seems this will also disable "LowerCombinedClipCullDistance", which I'm not sure was needed or not. Signed-off-by: Jonathan Marek <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5744>
* iris: return max counter value for AMD_performance_monitorMarcin Ślusarz2020-07-061-3/+4
| | | | | | | | | | | | glGetPerfMonitorCounterInfoAMD(..., ..., GL_COUNTER_RANGE_AMD, ...) returned NAN (binary representation of uint64_t(-1) as float) as a max value. Fixes: 0fd4359733e6 ("iris/perf: implement routines to return counter info") Signed-off-by: Marcin Ślusarz <[email protected]> Reviewed-by: Lionel Landwerlin <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5473>
* llvmpipe: enable GL 4.2Dave Airlie2020-07-061-1/+1
| | | | | | mostly just docs patch, features were all complete already Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5724>
* llvmpipe: bump to GL support to GL 4.1Dave Airlie2020-07-061-1/+1
| | | | | Reviewed-by: Roland Scheidegger <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5724>