aboutsummaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
...
* etnaviv: remove number of pixel pipes validationChristian Gmeiner2017-03-011-10/+0
| | | | | | | | | | | | | | This validation was added before the etnaviv drm driver landed in the linux kernel. Due some pre-merge API changes we had to fix-up this value but with a mainline kernel this is not a problem anymore. Lets remove that validation which also gets rid of problem caught by Coverity, reported to me by imirkin. Cc: "17.0" <[email protected]> Signed-off-by: Christian Gmeiner <[email protected]> Reviewed-by: Eric Engestrom <[email protected]> (cherry picked from commit e8d600710cf7c1a646a36947ee7752c89860bf11)
* etnaviv: move pctx initialisation to avoid a null dereferenceChristian Gmeiner2017-03-011-5/+5
| | | | | | | | | | | | In case ctx->stream == NULL the fail label gets executed where pctx gets dereferenced - too bad pctx is NULL in that case. Caught by Coverity, reported to me by imirkin. Cc: "17.0" <[email protected]> Signed-off-by: Christian Gmeiner <[email protected]> Reviewed-by: Eric Engestrom <[email protected]> (cherry picked from commit a0b16a08905d68da07668a42eeb464b4f30bf3e5)
* radeonsi: fix UINT/SINT clamping for 10-bit formats on <= CIKNicolai Hähnle2017-03-016-19/+43
| | | | | | | | | | | The same PS epilog workaround as for 8-bit integer formats is required, since the CB doesn't do clamping. Fixes GL45-CTS.gtf32.GL3Tests.packed_pixels.packed_pixels*. Cc: [email protected] Reviewed-by: Marek Olšák <[email protected]> (cherry picked from commit 066a117be77fdc2b29c8eafabb4e2c2fa902a18e)
* radeonsi: handle MultiDrawIndirect in si_get_draw_start_countNicolai Hähnle2017-03-011-7/+53
| | | | | | | | | | | | | | | | | | | | | | Also handle the GL_ARB_indirect_parameters case where the count itself is in a buffer. Use transfers rather than mapping the buffers directly. This anticipates the possibility that the buffers are sparse (once ARB_sparse_buffer is implemented), in which case they cannot be mapped directly. Fixes GL45-CTS.gtf43.GL3Tests.multi_draw_indirect.multi_draw_indirect_type on <= CIK. v2: - unmap the indirect buffer correctly - handle the corner case where we have indirect draws, but all of them have count 0. Cc: [email protected] Reviewed-by: Marek Olšák <[email protected]> Acked-by: Edward O'Callaghan <[email protected]> (cherry picked from commit 6a1d9684f4ec1e1eed49bc14749be7b7784277ec)
* gallivm: Override getHostCPUName() "generic" w/ "pwr8" (v4)Ben Crocker2017-03-011-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | If llvm::sys::getHostCPUName() returns "generic", override it with "pwr8" (on PPC64LE). This is a work-around for a bug in LLVM: a table entry for "POWER8NVL" is missing, resulting in (big-endian) "generic" being returned on little-endian Power8NVL systems. The result is that code that attempts to load the least significant 32 bits of a 64-bit quantity in memory loads the wrong half. This omission should be fixed in the next version of LLVM (4.0), but this work-around should be left in place in case some future version of POWER<n> also ends up unrepresented in LLVM's table. This workaround fixes failures in the Piglit arb_gpu_shader_fp64 conversion tests on POWER8NVL processors. (V4: add similar comment in the code.) Signed-off-by: Ben Crocker <[email protected]> Cc: 12.0 13.0 17.0 <[email protected]> Acked-by: Emil Velikov <[email protected]> (cherry picked from commit b934aae36410e09892e772b26f61fed5d037fc69)
* gallivm: Improve debug output (V2)Ben Crocker2017-03-012-1/+18
| | | | | | | | | | | | | | | | | Improve debug output from gallivm_compile_module and lp_build_create_jit_compiler_for_module, printing the -mcpu and -mattr options passed to LLC. V2: enclose MAttrs debug_printf block and llc -mcpu debug_printf in "if (gallivm_debug & <flags>)..." Signed-off-by: Ben Crocker <[email protected]> Cc: 12.0 13.0 17.0 <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]> (v2) [Emil Velikov: rebase] Signed-off-by: Emil Velikov <[email protected]> (cherry picked from commit a8e9c630f3dc656d107c4252b90c8e991438a3c4)
* winsys/amdgpu: reduce max_alloc_size based on GTT limitsNicolai Hähnle2017-03-011-2/+4
| | | | | | | | | | | | | | | | | | Allocating huge buffers in VRAM is not a problem, but when those buffers start being migrated, the kernel runs into errors because it cannot split those buffer up for moving through GTT. This should fix intermittent failures of GL45-CTS.texture_buffer.texture_buffer_max_size Cc: [email protected] Reviewed-by: Marek Olšák <[email protected]> (cherry picked from commit 550125e1e73e2441989da11495057a20dd9dad44) [Emil Velikov: resolve trivial conflicts] Signed-off-by: Emil Velikov <[email protected]> Conflicts: src/gallium/winsys/amdgpu/drm/amdgpu_winsys.c
* gallium/u_index_modify: don't add PIPE_TRANSFER_UNSYNCHRONIZED unconditionallyMarek Olšák2017-03-015-6/+14
| | | | | | | | | It's OK for r300g (because r300g can't write to buffers via the GPU), but not later hardware. This issue was spotted randomly. Cc: [email protected] Reviewed-by: Nicolai Hähnle <[email protected]> (cherry picked from commit c8ef5123980f9f538c79e626b0092660a2256ae6)
* gallium/util: remove unused u_index_modify helpersMarek Olšák2017-03-012-101/+0
| | | | | | | Reviewed-by: Nicolai Hähnle <[email protected]> (cherry picked from commit 42297c862f60ccecf794297ee97410f007bd75df) [Emil Velikov: Nominate as a requirement for next commit] Nominated-by: Emil Velikov <[email protected]>
* radeonsi: fix UNSIGNED_BYTE index buffer fallback with non-zero start (v2)Marek Olšák2017-03-011-2/+2
| | | | | | | | | | | | | | | | | start can only be non-zero with MultiDrawElements, which is unlikely to occur with UNSIGNED_BYTE indices. v2: Also fix the util_shorten_ubyte_elts_to_userptr call. Tested with the new piglit. Cc: [email protected] Reviewed-by: Nicolai Hähnle <[email protected]> (cherry picked from commit a264fee6245856340fab9024e1a428626e966335) [Emil Velikov: resolve trivial conflicts] Signed-off-by: Emil Velikov <[email protected]> Conflicts: src/gallium/drivers/radeonsi/si_state_draw.c
* i965/fs: fix uninitialized memory accessLionel Landwerlin2017-03-011-3/+2
| | | | | | | | | Found while running shader-db under valgrind. Signed-off-by: Lionel Landwerlin <[email protected]> Reviewed-by: Jordan Justen <[email protected]> Cc: "13.0 17.0" <[email protected]> (cherry picked from commit a0ac118398c924f2ae75e5649fbaacd95abd231f)
* radv: Never try to create more than max_sets descriptor sets.Bas Nieuwenhuizen2017-03-012-2/+6
| | | | | | | | | | | | We only use the freed ones after all free space has been used. If the app only allocates small descriptor sets, we might go over max_sets before the memory is full. Signed-off-by: Bas Nieuwenhuizen <[email protected]> Reviewed-by: Dave Airlie <[email protected]> CC: <[email protected]> Fixes: f4e499ec79147f4172f3669ae9dafd941aaeeb65 (cherry picked from commit f4487016226c3337fa5fb2244c75ce298093c3ce)
* i965/fs: Fix the inline nir_op_pack_double optimizationJason Ekstrand2017-03-011-29/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | We can only do the optimization if the source *is* SSA. Reviewed-by: Kenneth Graunke <[email protected]> Cc: "13.0 17.0" <[email protected]> (cherry picked from commit a4393bd97fe62e8299273bae769201c5c9c816ea) Squashed with commit: i965/fs: Remove the inline pack_double_2x32 optimization It's broken in a number of ways. In particular, a bunch of the conditions are backwards so it doesn't actually detect what it's supposed to detect. Since it's been broken, it hasn't actually been helping anything so just deleting it isn't a regression. This (and removing another optimization) were done on master in commit b07381161777ba5d5f4a1d713f7655bcaede4139. Cc: "Kenneth Grunke" <[email protected]> Cc: "Mark Janes" <[email protected]> [Emil Velikov: patch is a backport of the below "cherry pick"] Fixes: a4393bd97fe ("i965/fs: Fix the inline nir_op_pack_double optimization") (cherry picked from commit b07381161777ba5d5f4a1d713f7655bcaede4139)
* anv: wsi: report presentation error per image requestLionel Landwerlin2017-02-231-8/+15
| | | | | | | | | | | | | | | | | vkQueuePresentKHR() takes VkPresentInfoKHR pointer and includes a pResults fields which must holds the results of all the images requested to be presented. Currently we're not filling this field. Also as a side effect we probably want to go through all the images rather than stopping on the first error. This commit also makes the QueuePresentKHR() implementation return the first error encountered. Signed-off-by: Lionel Landwerlin <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]> Cc: "17.0" <[email protected]> (cherry picked from commit 0fcb92c17dee681bd39c08ddf0abc358a27337c7)
* glx/glvnd: Fix GLXdispatchIndex sortingHans de Goede2017-02-231-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | Commit 8bca8d89ef3b ("glx/glvnd: Fix dispatch function names and indices") fixed the sorting of the array initializers in g_glxglvnddispatchfuncs.c because FindGLXFunction's binary search needs these to be sorted alphabetically. That commit also mostly fixed the sorting of the DI_foo defines in g_glxglvnddispatchindices.h, which is what actually matters as the arrays are initialized using "[DI_foo] = glXfoo," but a small error crept in which at least causes glXGetVisualFromFBConfigSGIX to not resolve, breaking games such as "The Binding of Isaac: Rebirth" and "Crypt of the NecroDancer" from Steam not working and possible causes other problems too. This commit fixes the last of the sorting errors, fixing these mentioned games not working. Fixes: 8bca8d89ef3b ("glx/glvnd: Fix dispatch function names and indices") Cc: "13.0" <[email protected]> Cc: "17.0" <[email protected]> Cc: Adam Jackson <[email protected]> Signed-off-by: Hans de Goede <[email protected]> Reviewed-by: Eric Engestrom <[email protected]> (cherry picked from commit 4c66f529a8ea4cc7589c1e3760894793c666e9b2)
* anv: fix Get*MemoryRequirements for !LLCConnor Abbott2017-02-231-6/+8
| | | | | | | | | | | Even though we supported both coherent and non-coherent memory types, we effectively forced apps to use the coherent types by accident. Found by inspection, only compile tested. Signed-off-by: Connor Abbott <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]> Cc: "17.0" <[email protected]> (cherry picked from commit 6319bfc2a6497d708ead536b9a6d5d5a00c1f2f3)
* radv: adopt some init config workarounds from radeonsi.Dave Airlie2017-02-231-2/+9
| | | | | | | | | | Just one bonaire fix. Reviewed-by: Edward O'Callaghan <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]> Cc: "13.0 17.0" <[email protected]> Signed-off-by: Dave Airlie <[email protected]> (cherry picked from commit 09bf5491c4611e83d2ec745dc0e727bcdb0b31aa)
* radv: fix cik macroModeIndex.Dave Airlie2017-02-231-0/+14
| | | | | | | | | | | This just a CIK fix ported from radeonsi. Tested-by: Kai Wasserbäch <[email protected]> Reviewed-by: Edward O'Callaghan <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]> Cc: "13.0 17.0" <[email protected]> Signed-off-by: Dave Airlie <[email protected]> (cherry picked from commit 0f1a4220a693a02685bf227f8b9d932046f7d1d3)
* radv: change base aligmment for allocated memory.Dave Airlie2017-02-231-1/+1
| | | | | | | | | | | | | | | | On some CIK (Hawaii) this needs to be at least 64k, I'm not 100% sure it doesn't need to be 128k. This was causing fast clear eliminate to overwrite the previous buffer, which since my gfx init code, was the indirect buffer. Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=99692 Tested-by: Kai Wasserbäch <[email protected]> Reviewed-by: Edward O'Callaghan <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]> Cc: "13.0 17.0" <[email protected]> Signed-off-by: Dave Airlie <[email protected]> (cherry picked from commit 06ffd299252311f57feac4474551bd5b44d3d4d4)
* nvc0: disable linked tsc mode in compute launch descriptorIlia Mirkin2017-02-232-2/+6
| | | | | | | | | | | Empirically, this makes things work. Presumably this was originally copied from the blob, which does make use of linked tsc mode. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=99532 Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Samuel Pitoiset <[email protected]> Cc: [email protected] (cherry picked from commit 956556b3c30ce3d38d0af795f9383df3bc2cf8a2)
* tgsi: fix memory leak in tgsi sanity checkDave Airlie2017-02-231-3/+5
| | | | | | | | | | This just fixes this without repeating the code. Reported-by: Li Qiang Cc: "17.0" <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]> Signed-off-by: Dave Airlie <[email protected]> (cherry picked from commit 69fc7a2c828adbb454072d386a26b568e56dd886)
* intel/blorp: Swizzle clear colors on the CPUJason Ekstrand2017-02-231-18/+30
| | | | | | | | | | It's trivial to swizzle clear colors on the CPU, easily deals with the hardware restrictions for render target swizzles, and makes swizzled clears work on all hardware as opposed to just HSW+. Reviewed-by: Juan A. Suarez Romero <[email protected]> Cc: "17.0" <[email protected]> (cherry picked from commit e233db6e93e523952577d0314ed68276bda34479)
* mesa: Do (TCS && !TES) draw time validation in ES as well.Kenneth Graunke2017-02-231-19/+26
| | | | | | | | | | | | | | | | | | Now that we have OES_tessellation_shader, the same situation can occur in ES too, not just GL core profile. Having a TCS but no TES may confuse drivers - i965 crashes, for example. This prevents regressions in ES31-CTS.core.tessellation_shader.single.xfb_captures_data_from_correct_stage with some SSO pipeline validation changes I'm making. v2: Add an ES spec citation (suggested by Alejandro) Cc: "17.0" <[email protected]> Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Alejandro Piñeiro <[email protected]> (cherry picked from commit 05a56893aa2570cb1f6e61e3c9cf365266ea1d3a)
* i965/sampler_state: Set the "Base Mip Level" field on Sandy BridgeJason Ekstrand2017-02-232-1/+20
| | | | | | | | | | | | Fixes two GL ES 3.0 CTS tests on Sandy Bridge: ES3-CTS.functional.texture.mipmap.cube.base_level.linear_linear ES3-CTS.functional.texture.mipmap.cube.base_level.linear_nearest Reviewed-by: Lionel Landwerlin <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Cc: "17.0 13.0" <[email protected]> (cherry picked from commit c59d1ea51bd0809761094e54c66bf3a200d964ff)
* i965/sampler_state: Pass texObj into update_sampler_stateJason Ekstrand2017-02-231-6/+4
| | | | | | | Reviewed-by: Lionel Landwerlin <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Cc: "17.0 13.0" <[email protected]> (cherry picked from commit c4f8f395b291a88eb74b07b90a4028ef4f026f58)
* i965/sampler_state: Clamp min/max LOD to 14 on gen7+Jason Ekstrand2017-02-231-2/+5
| | | | | | | Reviewed-by: Lionel Landwerlin <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Cc: "17.0" <[email protected]> (cherry picked from commit 9df3778016e9153bc8759f84075db2d62a62a596)
* st/mesa: don't pass compare mode for stencil-sampled texturesIlia Mirkin2017-02-231-1/+1
| | | | | | | | | Fixes dEQP-GLES31.functional.stencil_texturing.misc.compare_mode_effect Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Cc: [email protected] (cherry picked from commit 3970257cef5e0c7b5b31c023450f1ea55b784e88)
* nvc0: set the render condition in the compute objectIlia Mirkin2017-02-231-2/+10
| | | | | | | | Fixes GL45-CTS.compute_shader.conditional-dispatching Signed-off-by: Ilia Mirkin <[email protected]> Cc: [email protected] (cherry picked from commit 48f04862c1d74844db9534b32ef73e5a2bc0ae74)
* gm107/ir: fix address offset bitfield for ATOMSIlia Mirkin2017-02-231-1/+1
| | | | | | | | Fixes GL45-CTS.compute_shader.atomic-case1 on Maxwell Signed-off-by: Ilia Mirkin <[email protected]> Cc: [email protected] (cherry picked from commit 7e75f0913ab545be14feb233d1ed74dc48116fb8)
* glsl: non-last member unsized array on SSBO must fail compilation on GLSL ES 3.1Jose Maria Casanova Crespo2017-02-231-4/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | From GLSL ES 3.10 spec, section 4.1.9 "Arrays": "If an array is declared as the last member of a shader storage block and the size is not specified at compile-time, it is sized at run-time. In all other cases, arrays are sized only at compile-time." In desktop GLSL it is allowed to have unsized-arrays that are not last, as long as we can determine that they are implicitly sized, which is detected at link-time. With this patch Mesa reports a compilation error as glslang does with the following shader: buffer SSBO { vec4 data[]; vec4 moreData;}; void main (void) { } Fixes: dEQP-GLES31.functional.debug.negative_coverage.log.shader.compile_compute_shader dEQP-GLES31.functional.debug.negative_coverage.callbacks.shader.compile_compute_shader dEQP-GLES31.functional.debug.negative_coverage.get_error.shader.compile_compute_shader Cc: "17.0" <[email protected]> Signed-off-by: Jose Maria Casanova Crespo <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> (cherry picked from commit 5bc222ebafddd14f2329f5096287b51d798a6431)
* vc4: Avoid emitting small immediates for UBO indirect load address guards.Eric Anholt2017-02-235-4/+20
| | | | | | | | | | | | | The kernel will reject our shader if we emit one here, and having 4, 8, or 12 as the top end of our UBO clamp rare is enough that it's not worth making the kernel let us. Fixes piglit fs-const-array-of-struct and fs-const-array-of-struct-of-array since recent GLSL linking changes made us get this as an indirect load of a uniform, instead of a tempoary. Cc: "13.0 17.0" <[email protected]> (cherry picked from commit b2309393039b2ec0cc00a8e6fd828c60c4ef1e11)
* gallivm: Reenable PPC VSX (v3)Ben Crocker2017-02-231-1/+13
| | | | | | | | | | | | | | | | | Reenable the PPC64LE Vector-Scalar Extension for LLVM versions >= 3.8.1, now that LLVM bug 26775 and its corollary, 25503, are fixed. Amendment: remove extraneous spaces in macro def & invocations. We would prefer a runtime check, e.g. via an LLVMQueryString (analogous to glGetString, eglQueryString) or LLVMGetVersion API, but no such API exists at this time. Signed-off-by: Ben Crocker <[email protected]> [Emil Velikov: remove LLVM_VERSION macro] Signed-off-by: Emil Velikov <[email protected]> (cherry picked from commit 3f1b6ef2aa9c99bebe539f1de5a5054d90fc5dc3)
* util/disk_cache: use stat() to check if entry is a directoryTimothy Arceri2017-02-131-9/+24
| | | | | | | | | | | | | | | | | | | | | d_type is not supported on all systems. Tested-by: Vinson Lee <[email protected]> Reviewed-by: Emil Velikov <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=97967 (cherry picked from commit d7b3707c612027b354deea6bc5eae56a02d5f8d5) Squashed with commit: util/disk_cache: correctly use stat(3) I forgot to error check stat() and also I wasn't using the subdir in is_two_character_sub_directory(). Fixes: d7b3707c612 "util/disk_cache: use stat() to check if entry is a directory" Reviewed-by: Plamena Manolova <[email protected]> Reviewed-by: Emil Velikov <[email protected]> (cherry picked from commit 0cbde643eb29c8bf19eb8551ac8e821f7f733212)
* anv/blorp: Disable resolves for transparent black clearsNanley Chery2017-02-101-2/+8
| | | | | | Signed-off-by: Nanley Chery <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]> (cherry picked from commit 84dbf683781241038d847b9db81f153ab59e27f6)
* gallium/radeon: fix performance of buffer readbacksMarek Olšák2017-02-101-8/+9
| | | | | | | | | | | | | | | | We want cached GTT for all non-persistent read mappings. Set level = 0 on purpose. Use dma_copy, because resource_copy_region causes a failure in the PBO read of piglit/getteximage-luminance. If Rocket League used the READ flag, it should get cached GTT. v2: mask out UNSYNCHRONIZED Cc: 13.0 17.0 <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]> (cherry picked from commit d86099df0af7c22c8acfd48b38ad446d9c8df6bd)
* tgsi-dump: dump label if instruction has oneMarc-André Lureau2017-02-101-11/+13
| | | | | | | | | | | | | | | The instruction has an associated label when Instruction.Label == 1, as can be seen in ureg_emit_label() or tgsi_build_full_instruction(). This fixes dump generating extra :0 labels on conditionals, and virgl parsing more than the expected tokens and eventually reaching "Illegal command buffer" (when parsing more than a safety margin of 10 we currently have). Signed-off-by: Marc-André Lureau <[email protected]> Cc: "13.0 17.0" <[email protected]> Signed-off-by: Dave Airlie <[email protected]> (cherry picked from commit dc2d9b8da14b97376cca9c87e2408763b11bdaa7)
* nvc0/ir: fix ubo max clamp, reset file indexIlia Mirkin2017-02-101-1/+3
| | | | | | | | | | | | We just increased the max UBO, so we should also increase the clamp that we do for robustness. Similarly, as we're including the fileIndex in the new indirect value, we should reset fileIndex to 0 so that it is not added in a second time. Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Samuel Pitoiset <[email protected]> Cc: [email protected] (cherry picked from commit c95f821cb4286f8163bfdf341be2b0940011585a)
* nvc0/ir: fix robustness guarantees for constbuf loads on kepler+ computeIlia Mirkin2017-02-101-25/+22
| | | | | | | | | | | | | | Kepler and up unfortunately only support up to 8 constbufs. We work around this by loading from constbufs as if they were storage buffers. However we were not consistently applying limits to loads from these buffers. Make sure to do the same thing we do for storage buffers. Fixes GL45-CTS.robust_buffer_access_behavior.uniform_buffer Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Samuel Pitoiset <[email protected]> Cc: [email protected] (cherry picked from commit 1acdd62847cf0da8a8e9c7915d698208d73a5be8)
* nvc0: increase number of ubo binding pointsIlia Mirkin2017-02-101-3/+2
| | | | | | | | | | | | | | Apparently GL 4.5 requires 14 of these (there's a "*" in the spec, but it's unclear what it refers to). We need to expose an extra binding point for the "program parameters", which means this must be 15. Remove the last vestige of the "use c14 for immediates" idea. Fixes GL45-CTS.shading_language_420pack.binding_uniform_block_array Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Samuel Pitoiset <[email protected]> Cc: [email protected] (cherry picked from commit 59ca352fc573a37f9f70c1f6217e85dd3e31d38e)
* glsl: correct compute shader checks for memoryBarrier functionsMarc Di Luzio2017-02-101-6/+12
| | | | | | | | | | | | | | | | | As per the spec - "The functions memoryBarrierShared() and groupMemoryBarrier() are available only in compute shaders; the other functions are available in all shader types." Conform to this by adding another delegate to check for compute shader support instead of only whether the current stage is compute This allows some fragment shaders in Dirt Rally to compile Cc: "17.0" <[email protected]> Reviewed-by: Anuj Phogat <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> (cherry picked from commit 21efe2528cd88cb09ba9f69222f69a8ee47611c9)
* Revert "i965: Disable guardband clipping in the smaller-than-viewport case."Kenneth Graunke2017-02-101-31/+0
| | | | | | | | | | | | | | | | | | | | This reverts commit 0bac2551e40410e2251daf4fd9faf69310ab34ce. Now that we position the guardband correctly (applying translations in addition to scaling) and made it as large (or larger) than the render target, this shouldn't be necessary. Now we leave guardband clipping enabled 100% of the time, like the Windows driver does. Fixes GL45-CTS.gtf21.GL2FixedTests.clip.clip. It tries to draw a 16384x64 rectangle, and it appears that some kind of numerical imprecisions in the clipper result in some edge pixels going missing. The Windows driver passes this test because of guardband clipping. Cc: "17.0" <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]> (cherry picked from commit ce8a63de6dffd4a7bc704b63bdd48a63798a438e)
* i965: Always scissor on Gen6-7.5 instead of disabling guardband.Kenneth Graunke2017-02-103-48/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously we disabled the guardband when the viewport was smaller than the framebuffer on Gen6-7.5, to prevent portions of primitives from being draw outside of the viewport. On Gen8+, we relied on the viewport extents test to effectively scissor this away for us. We can simply always enable scissoring instead. We already include the viewport in the scissor rectangle, so this will effectively do the viewport extents test for us. (The only difference is that the scissor rectangle doesn't support sub-pixel values. I think that's okay.) Given that the viewport extents test is essentially a second scissor, and is enabled for basically all 3D drawing on Gen8+, it stands to reason that scissoring is cheap. Enabling the guardband reduces the cost of clipping, which is expensive. The Windows driver appears to never disable guardband clipping, and appears to use scissoring in this case. I don't know if they leave it on universally though. This fixes misrendering in Blender, where the "floor plane" grid lines started rendering at wrong angles after I disabled XY clipping of line primitives. Enabling the guardband seems to solve the issue. Cc: "17.0" <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=99339 Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]> (cherry picked from commit ece0e535a44c228dd994861592deb155c14740d8)
* i965: Use a better guardband calculation.Jason Ekstrand2017-02-104-82/+126
| | | | | | | | | | | | | | | | | | | | | | (Patch co-authored by Jason and Ken.) We scaled the guardband based on the viewport size, but failed to take into account the translation portion of the viewport transform. This meant the guardband was always centered around the origin. We want it to be centered around the screen-space drawing area, which is the intersection of the viewport and the render target. At best, getting this wrong would reduce the guardband's effectiveness in some cases. At worst, it might break things - objects outside of the guardband are trivially rejected, so getting the guardband in the wrong place and leaving guardband clipping enabled could cause problems. v2: drop clamping of positive maximums. Cc: "17.0" <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> (cherry picked from commit f3c068c5c89c8c3dce257ecc2b640f375d3f4836)
* i965: Combine the Gen6 SF and Clip viewport atoms.Kenneth Graunke2017-02-103-57/+30
| | | | | | | | | | | The next patch will make the guardband calculation dependent on the transformation matrix. Instead of computing it in both atoms, just combine them into a single atom. Cc: "17.0" <[email protected]> Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Topi Pohjolainen <[email protected]> (cherry picked from commit 89ad7f1be6a607b33ffb388516b5d0547b491c33)
* radv: pass FMASK alignment to applicationDave Airlie2017-02-101-0/+1
| | | | | | | | | As was done for dcc and cmask. Cc: "17.0" <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]> (cherry picked from commit 90ac2285f0900972d2a3e7a034b51ee4de374ffb)
* radv: Pass DCC alignment to application.Bas Nieuwenhuizen2017-02-101-0/+1
| | | | | | | | Signed-off-by: Bas Nieuwenhuizen <[email protected]> Cc: "17.0" <[email protected]> Reviewed-by: Dave Airlie <[email protected]> Reviewed-by: Andres Rodriguez <[email protected]> (cherry picked from commit 47ca0f537dfbc03f0eb0cb12fdee06dbe664fbc7)
* radv: Pass CMASK alignment to application.Bas Nieuwenhuizen2017-02-101-0/+1
| | | | | | | | | | | CMASK alignment can be greater than image data alignment, so pass it to the app so that it knows what alignment to backing memory should have. Signed-off-by: Bas Nieuwenhuizen <[email protected]> Cc: <[email protected]> Reviewed-by: Dave Airlie <[email protected]> (cherry picked from commit eb01b20cc41e9501062eb25034069e484f8b1899)
* radv/ac: avoid the fmask path when doing txs.Dave Airlie2017-02-101-1/+2
| | | | | | | | | This fixes the vulkan samples deferredmultisampling test. Cc: "17.0" <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]> (cherry picked from commit a864ef7f4824a8319b74d4cf1c82e2dd25672ff1)
* swr: [rasterizer core] Remove dead code Clipper::ClipScalar()Bruce Cherniak2017-02-101-39/+0
| | | | | | | | | | | | | | Clipper::ClipScalar() is dead code and should be removed. It is causing an error with gcc-7 because it references a now defunct member. v2: includes bugzilla reference, same code change Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=99633 CC: "13.0 17.0" <[email protected]> Tested-by: Vinson Lee <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]> Reviewed-by: Tim Rowley <[email protected]> (cherry picked from commit bf29495dcdb290c8b15cacd2001603b8ae5d36c8)
* dri/common: clear the loaderPrivate pointer in driDestroyDrawableNicolai Hähnle2017-02-101-0/+12
| | | | | | | | | | | | | | | | | | | | | The GLX specification says about glXDestroyPixmap: "The storage for the GLX pixmap will be freed when it is not current to any client." We're not really following this language to the letter: some of the storage is freed immediately (in particular, the dri3_drawable, which contains both GLXDRIdrawable and loader_dri3_drawable). So we NULL out the pointers to that freed storage; the previous patches added the corresponding NULL-pointer checks. This fixes memory corruption in piglit ./bin/glx-visuals-depth/stencil -pixmap -auto Cc: 17.0 <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Emil Velikov <[email protected]> (cherry picked from commit 7be0e602ed82d25b9f0db77748618c663d9cbfe7)