aboutsummaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Move compiler.h and imports.h/c from src/mesa/main into src/utilMarek Olšák2020-03-27244-264/+263
| | | | | Reviewed-by: Timothy Arceri <[email protected] Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4324>
* wgl: use gldrv.h instead of stw_icd.hJesse Natalie2020-03-2710-647/+33
| | | | | | | | | Now that we have the official header, let's use that instead of stw_icd.h. Reviewed-by: Jose Fonseca <[email protected]> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4305> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4305>
* wgl: add official gldrv.h header-fileJesse Natalie2020-03-271-0/+589
| | | | | | | | This is the official, Microsoft-provided gldrv.h that describes the driver-interface for OpenGL drivers on Windows. Reviewed-by: Jose Fonseca <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4305>
* nv50, nvc0: fix must_check warning of util_dynarray_resize_bytesKarol Herbst2020-03-272-6/+14
| | | | | | | Signed-off-by: Karol Herbst <[email protected]> Reviewed-by: Erik Faye-Lund <[email protected]> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4330> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4330>
* nv50: remove unused variableErik Faye-Lund2020-03-271-2/+0
| | | | | | | | This isn't used anymore, so let's get rid of it to silence a warning. Fixes: c574cda3c6a ("util: Make helper functions for pack/unpacking pixel rows.") Reviewed-by: Karol Herbst <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4330>
* intel/perf: store the probed i915-perf versionLionel Landwerlin2020-03-273-1/+22
| | | | | | | | | Signed-off-by: Lionel Landwerlin <[email protected]> Acked-by: Tapani Pälli <[email protected]> Reviewed-by: Rafael Antognolli <[email protected]> Reviewed-by: Mark Janes <[email protected]> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4344> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4344>
* intel/perf: document meaning of query fieldLionel Landwerlin2020-03-271-0/+1
| | | | | | | | Signed-off-by: Lionel Landwerlin <[email protected]> Acked-by: Tapani Pälli <[email protected]> Reviewed-by: Rafael Antognolli <[email protected]> Reviewed-by: Mark Janes <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4344>
* intel/perf: move mdapi query definitions to their own fileLionel Landwerlin2020-03-275-346/+388
| | | | | | | | | | | Where they belong. Signed-off-by: Lionel Landwerlin <[email protected]> Acked-by: Jason Ekstrand <[email protected]> Acked-by: Tapani Pälli <[email protected]> Reviewed-by: Rafael Antognolli <[email protected]> Reviewed-by: Mark Janes <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4344>
* intel/perf: break GL query stuff awayLionel Landwerlin2020-03-2712-1601/+1685
| | | | | | | | | | | | | | This stuff is somewhat specific to the GL extension & drivers. On Vulkan we won't use this, it also made a rather large file. v2: Fix Android build (Lionel) Signed-off-by: Lionel Landwerlin <[email protected]> Acked-by: Jason Ekstrand <[email protected]> Acked-by: Tapani Pälli <[email protected]> Reviewed-by: Rafael Antognolli <[email protected]> Reviewed-by: Mark Janes <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4344>
* intel/perf: move register definition to special fileLionel Landwerlin2020-03-272-19/+8
| | | | | | | | Signed-off-by: Lionel Landwerlin <[email protected]> Acked-by: Tapani Pälli <[email protected]> Reviewed-by: Rafael Antognolli <[email protected]> Reviewed-by: Mark Janes <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4344>
* util/test: Use MAX_PATH on WindowsDaniel Stone2020-03-271-0/+5
| | | | | | | | | | | | Windows provides MAX_PATH rather than PATH_MAX for the maximum allowable path length. This is not a limit on the length of filename which can exist on the filesystem, but a length on the length of path which can be passed to Win32 API calls. Signed-off-by: Daniel Stone <[email protected]> Reviewed-by: Eric Engestrom <[email protected]> Fixes: f8f1413070a ("util/u_process: add util_get_process_exec_path") Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4304>
* util: fix process_test pathPierre-Eric Pelloux-Prayer2020-03-271-3/+4
| | | | | | | | | | Make sure we only use winepath when needed. Reviewed-by: Daniel Stone <[email protected]> Reviewed-by: Eric Engestrom <[email protected]> Fixes: f8f1413070a ("util/u_process: add util_get_process_exec_path") Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/2690 Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4304>
* nir: fix packing of TCS varyings not read by the TESTimothy Arceri2020-03-271-4/+68
| | | | | | | | | | | | | | | | | | | | Unlike other stages TCS outputs not read by the TES cannot always be demoted to globals e.g. when they are read by other TCS invocations. We were not taking these outputs into account when packing which could result in other outputs being assigned to the same location. Here we make sure to gather information on these outputs and group them together when packing. This fixes rendering issues in QUBE 2 via Proton. Closes: #2653 Fixes: 26aa460940f6 ("nir: rewrite varying component packing") Reviewed-by: Samuel Pitoiset <[email protected]> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4328> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4328>
* glsl: fix varying packing for 64bit integersTimothy Arceri2020-03-271-1/+1
| | | | | | | | | Without this we can incorrectly end up marking things as making use of ARB_enhanced_layouts style packing. Cc: 19.3 20.0 <[email protected]> Reviewed-by: Dave Airlie <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4328>
* ac/nir: use llvm.amdgcn.rcp in ac_build_fdiv()Samuel Pitoiset2020-03-272-20/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of emitting 1.0 / x which includes a slow division that LLVM doesn't always optimize even if the metadata is correctly set. No pipeline-db changes with VEGA10/LLVM 9. pipeline-db (VEGA10/LLVM 10): Totals from affected shaders: SGPRS: 6672 -> 6672 (0.00 %) VGPRS: 6652 -> 6652 (0.00 %) Spilled SGPRs: 0 -> 0 (0.00 %) Spilled VGPRs: 0 -> 0 (0.00 %) Code Size: 561780 -> 561692 (-0.02 %) bytes Max Waves: 1043 -> 1043 (0.00 %) pipeline-db (VEGA10/LLVM 11 - 92744f62478): Totals from affected shaders: SGPRS: 84608 -> 83768 (-0.99 %) VGPRS: 106768 -> 106636 (-0.12 %) Spilled SGPRs: 1625 -> 1713 (5.42 %) Spilled VGPRs: 0 -> 0 (0.00 %) Code Size: 10850936 -> 10726712 (-1.14 %) bytes Max Waves: 3152 -> 3180 (0.89 %) LLVM 11 (master) is more affected than previous versions, but based on the small impact with LLVM 9/10, I decided to emit it unconditionally. Cc: 20.0 <[email protected]> Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4326> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4326>
* ac/nir: use llvm.amdgcn.rsq for nir_op_frsqSamuel Pitoiset2020-03-271-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of emitting 1.0 / sqrt(x) which includes a slow division that LLVM doesn't always optimize even if the metadata is correctly set. pipeline-db (VEGA10/LLVM 9): Totals from affected shaders: SGPRS: 16872 -> 16864 (-0.05 %) VGPRS: 15320 -> 15464 (0.94 %) Spilled SGPRs: 2021 -> 2133 (5.54 %) Code Size: 1915464 -> 1917476 (0.11 %) bytes Max Waves: 641 -> 639 (-0.31 %) pipeline-db (VEGA10/LLVM 10): Totals from affected shaders: SGPRS: 43936 -> 44120 (0.42 %) VGPRS: 41776 -> 41972 (0.47 %) Spilled SGPRs: 875 -> 875 (0.00 %) Code Size: 4468164 -> 4468120 (-0.00 %) bytes Max Waves: 2412 -> 2414 (0.08 %) pipeline-db (VEGA10/LLVM 11 - 92744f62478): Totals from affected shaders: SGPRS: 60096 -> 60096 (0.00 %) VGPRS: 63552 -> 63648 (0.15 %) Spilled SGPRs: 6135 -> 6117 (-0.29 %) Spilled VGPRs: 0 -> 0 (0.00 %) Code Size: 6252996 -> 6249772 (-0.05 %) bytes Max Waves: 2324 -> 2337 (0.56 %) LLVM 11 (master) is more affected than previous versions, but based on the small impact with LLVM 9/10, I decided to emit it unconditionally. Cc: 20.0 <[email protected]> Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4326>
* ac/nir: use llvm.amdgcn.rcp for nir_op_frcpSamuel Pitoiset2020-03-271-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of emitting 1.0 / x which includes a slow division that LLVM doesn't always optimize even if the metadata is correctly set. pipeline-db (VEG10/LLVM 9): Totals from affected shaders: SGPRS: 50384 -> 50312 (-0.14 %) VGPRS: 42572 -> 42696 (0.29 %) Spilled SGPRs: 1372 -> 1372 (0.00 %) Code Size: 5692040 -> 5691428 (-0.01 %) bytes Max Waves: 3954 -> 3951 (-0.08 %) pipeline-db (VEG10/LLVM 10): Totals from affected shaders: SGPRS: 78512 -> 78464 (-0.06 %) VGPRS: 62408 -> 62484 (0.12 %) Spilled SGPRs: 1502 -> 1502 (0.00 %) Code Size: 8106188 -> 8103372 (-0.03 %) bytes Max Waves: 7759 -> 7753 (-0.08 %) pipeline-db (VEGA10/LLVM 11 - 92744f62478): Totals from affected shaders: SGPRS: 112760 -> 113232 (0.42 %) VGPRS: 111132 -> 110568 (-0.51 %) Spilled SGPRs: 5870 -> 5940 (1.19 %) Spilled VGPRs: 650 -> 652 (0.31 %) Code Size: 11887232 -> 11561744 (-2.74 %) bytes Max Waves: 8964 -> 9015 (0.57 %) LLVM 11 (master) is more affected than previous versions, but based on the small impact with LLVM 9/10, I decided to emit it unconditionally. Cc: 20.0 <[email protected]> Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4326>
* x86: Add ENDBR at function entriesH.J. Lu2020-03-263-0/+22
| | | | | | | | | | | | | | | | | | Intel Control-flow Enforcement Technology (CET): https://software.intel.com/en-us/articles/intel-sdm contains shadow stack (SHSTK) and indirect branch tracking (IBT). When IBT is enabled, all indirect branch targets must start with ENDBR instruction which is a NOP on non-CET processors. Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/2538 Acked-by: Matt Turner <[email protected]> Reviewed-by: Dave Airlie <[email protected]> Reviewed-by: Ben Widawsky <[email protected]> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3865> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3865>
* mesa: try to fix the android buildMarek Olšák2020-03-261-1/+8
| | | | | | | | | Fixes: 8a3e2cd9b26 Closes: #2685 Acked-by: Tapani Pälli <[email protected]> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4325> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4325>
* intel/fs/gen12: Fix interaction of SWSB dependency combination with EU ↵Francisco Jerez2020-03-261-10/+11
| | | | | | | | | | | | | | | | | fusion workaround. This has been reported to fix a hang in Shadow of Mordor on Gen12. One of its compute shaders seems to cause an in-order exec_all dependency to be merged into an out-of-order SET dependency slot, which would prevent us from baking the SET dependency into the parent instruction, leading to an assert failure in emit_inst_dependencies() (Thanks to Rafael for noticing that). Prevent that by avoiding combination of in-order dependencies whenever that would cause a SET dependency to be demoted to a SYNC.NOP instruction. Fixes: e14529ff3262a527 "intel/fs/gen12: Workaround data coherency issues due to broken NoMask control flow." Tested-by: Rafael Antognolli <[email protected]> Reviewed-by: Caio Marcelo de Oliveira Filho <[email protected]>
* x86_init_func_common: Add ENDBR at function entryH.J. Lu2020-03-261-0/+5
| | | | | | | | | | | | | | | | Intel Control-flow Enforcement Technology (CET): https://software.intel.com/en-us/articles/intel-sdm when IBT is enabled, all indirect branch targets must start with ENDBR instruction which is a NOP on non-CET processors. Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/2575 Acked-by: Matt Turner <[email protected]> Reviewed-by: Ben Widawsky <[email protected]> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3985> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3985>
* intel/aub_viewer: Fix format specifier for uint64_tDanylo Piliaiev2020-03-261-7/+7
| | | | | | | | | | Use PRIx64 instead of lx for uint64_t Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/2692 Signed-off-by: Danylo Piliaiev <[email protected]> Reviewed-by: Sagar Ghuge <[email protected]> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4331> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4331>
* panfrost: Extend the tiled store fast-path to loadsIcecream952020-03-261-28/+47
| | | | | | | | | | | | The access functions are forced to be inline, so performance shouldn't be impacted for stores. WebGL performance in Firefox is more than doubled, and track loading in STK is noticeably faster. Reviewed-by: Alyssa Rosenzweig <[email protected]> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4317> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4317>
* mesa/format_utils: Add a fast-path for RGBA to BGRAIcecream952020-03-261-0/+9
| | | | | | | | | | | | | | This is similar to an existing fast-path, but this is for an array source while the existing one is for an array destination. Firefox can hit this case for WebGL when GL compositing is not used. For a WebGL sample on the Panfrost driver, the frame-rate increased from 19.4 fps to 20.6 fps, which is a 6% gain. Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Alyssa Rosenzweig <[email protected]> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4315> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4315>
* glsl: set error_emitted true if type not ok for assignmentTapani Pälli2020-03-261-2/+5
| | | | | | | | | | | | | | Patch changes also existing assert to not trigger when we have error types in assignment. v2: simplify, cleanup (Ian) Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/2629 Fixes: d1fa69ed61d ("glsl: do not attempt assignment if operand type not parsed correctly") Signed-off-by: Tapani Pälli <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4178> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4178>
* vtn/opencl: add rint-supportBoris Brezillon2020-03-261-0/+2
| | | | | | | Signed-off-by: Boris Brezillon <[email protected]> Reviewed-by: Karol Herbst <[email protected]> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4318> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4318>
* vtn/opencl: add native exp2/log2-supportErik Faye-Lund2020-03-261-0/+4
| | | | | Reviewed-by: Karol Herbst <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4318>
* vtn/opencl: add native exp10/log10-supportErik Faye-Lund2020-03-261-0/+6
| | | | | | Reviewed-by: Jason Ekstrand <[email protected]> Reviewed-by: Karol Herbst <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4318>
* vtn/opencl: add native exp/log-supportErik Faye-Lund2020-03-261-0/+6
| | | | | | Reviewed-by: Jason Ekstrand <[email protected]> Reviewed-by: Karol Herbst <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4318>
* compiler/nir: move build_log helper into builtin-builderErik Faye-Lund2020-03-262-16/+13
| | | | | | Reviewed-by: Karol Herbst <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4318>
* compiler/nir: move build_exp helper into builtin-builderErik Faye-Lund2020-03-262-18/+15
| | | | | | Reviewed-by: Karol Herbst <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4318>
* vtn/opencl: fully enable OpenCLstd_ClzErik Faye-Lund2020-03-261-0/+1
| | | | | | | Fixes: 7325f6ac987 ("vtn/opencl: add clz support") Reviewed-by: Boris Brezillon <[email protected]> Reviewed-by: Karol Herbst <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4318>
* radeonsi: enable full out-of-order drawing when allow_draw_out_of_order is setMarek Olšák2020-03-261-2/+4
| | | | | | Reviewed-by: Pierre-Eric Pelloux-Prayer <[email protected]> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4152> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4152>
* mesa: allow out-of-order drawing to optimize immediate mode if it's safeMarek Olšák2020-03-2617-2/+134
| | | | | | | | | This increases performance by 11-13% in Viewperf11/Catia - first scene. Set allow_draw_out_of_order=true to enable this. Acked-by: Pierre-Eric Pelloux-Prayer <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4152>
* glsl_to_tgsi: set shader_info::writes_memoryMarek Olšák2020-03-261-0/+8
| | | | | Acked-by: Pierre-Eric Pelloux-Prayer <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4152>
* nir: add and gather shader_info::writes_memoryMarek Olšák2020-03-262-0/+97
| | | | | | | for out-of-order drawing. Acked-by: Pierre-Eric Pelloux-Prayer <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4152>
* radeonsi: Stop exposing PIPE_SHADER_CAP_FP16Kristian H. Kristensen2020-03-251-1/+1
| | | | | | | Not fully supported. Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4321> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4321>
* util/u_process: Add util_get_process_exec_path for macOS.Vinson Lee2020-03-251-0/+9
| | | | | | | | | Fixes: f8f1413070ae ("util/u_process: add util_get_process_exec_path") Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/2682 Signed-off-by: Vinson Lee <[email protected]> Reviewed-by: Pierre-Eric Pelloux-Prayer <[email protected]> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4313> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4313>
* freedreno: ssbo: mark resource read or written depending on usageChristian Gmeiner2020-03-251-10/+15
| | | | | | | Signed-off-by: Christian Gmeiner <[email protected]> Reviewed-by: Rob Clark <[email protected]> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/1963> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/1963>
* freedreno: ssbo: keep track if a buffer gets writtenChristian Gmeiner2020-03-252-0/+3
| | | | | | Signed-off-by: Christian Gmeiner <[email protected]> Reviewed-by: Rob Clark <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/1963>
* freedreno: simplify fd_set_shader_buffers(..)Christian Gmeiner2020-03-251-16/+8
| | | | | | | | | Clear the modified bits for enabled_mask and then iterate over the whole range and set the specific bit where there is a buffer. Signed-off-by: Christian Gmeiner <[email protected]> Reviewed-by: Rob Clark <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/1963>
* freedreno: calculate modified bit mask only onceChristian Gmeiner2020-03-251-6/+2
| | | | | | Signed-off-by: Christian Gmeiner <[email protected]> Reviewed-by: Rob Clark <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/1963>
* gallium/util: Add back (and rename) util_float_to_half implementationRoland Scheidegger2020-03-252-1/+58
| | | | | | | | | | | | | | | | | | | | | | | | | This implementation was removed by 8b8af6d3 ("gallium/util: Switch util_float_to_half to _mesa_float_to_half()'s impl.") It was not actually broken, but _mesa_float_to_half() implements round-to-nearest-even, whereas util_float_to_half() implemented round-to-zero. So rename it appropriately. GL actually never cares about rounding (except a broken piglit test), however d3d10 very much does and requires RTZ for float to half conversion. Moreover, apparently at least radeon gpus actually always do RTZ when doing RT writes (and I'd suspect for shader image writes as well). Hence it seems appropriate to hook up this rtz function to the format instead. This will cause llvmpipe and softpipe to use rtz rounding for clears with half float formats, and softpipe would use rtz behavior for rt writes as well (llvmpipe has that hardcoded), not sure if "real" hw drivers hit this function for much. (For shader opcodes would still need to figure out what rounding to use appropriately, but this is a question for another day.) Note should probably unify with _mesa_float_to_float16_rtz. Unclear at this point which one is better, so just restore previous function here. Reviewed-by: Marek Olšák <[email protected]> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4312> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4312>
* etnaviv: Emit PE.ALPHA_COLOR_EXT* on GPUs with half-float supportMarek Vasut2020-03-251-1/+2
| | | | | | | | | | | | | | | | | | | | At least GC880 (iMX6S), GC2000 (iMX6Q) blobs do not emit the PE.ALPHA_COLOR_EXT0 and PE.ALPHA_COLOR_EXT1 into the command stream. The GCnano (STM32MP1) is not affected by this change either. This is because neither of these GPUs support the half-float feature. Emit PE.ALPHA_COLOR_EXT* in etnaviv only if half-float support is present in the GPU. This fixes all of the currently failing dEQPs in this group: dEQP-GLES2.functional.fragment_ops.blend.* Fixes: 76adf041f25 ("etnaviv: fix blend color on newer GPUs") Signed-off-by: Marek Vasut <[email protected]> Reviewed-by: Christian Gmeiner <[email protected]> Reviewed-by: Jonathan Marek <[email protected]> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4277> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4277>
* gallivm: disable rgtc/latc SNORM accellerated fetchesRoland Scheidegger2020-03-251-13/+19
| | | | | | | | | | | Unfortunately this appears to be bugged (it seems the piglit tests aren't quite exhaustive enough). I'm almost certain it's the lerp (lp_build_lerpdxta()) which doesn't handle signed numbers correctly, let's disable for now. Reviewed-by: Dave Airlie <[email protected]> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4311> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4311>
* rbug: do not return void-valueErik Faye-Lund2020-03-251-1/+1
| | | | | | | | | | | | Returning a void-value is nonsensical, and in this case it seems like a mistake. This eliminates a warning when building on MSVC. Fixes: fb04e5da97d ("gallium: add pipe_screen::finalize_nir") Reviewed-by: Brian Paul <[email protected]> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4297> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4297>
* rbug: clean up cast-warningsErik Faye-Lund2020-03-251-2/+2
| | | | | | | | | Similarly to the previous cast; on 64-bit Windows, unsigned long is 32-bit, and casting a pointer to a non-matchin bit-width integer produce warnings. So let's use uintpre_t for this purpose instead. Reviewed-by: Brian Paul <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4297>
* pipebuffer: clean up cast-warningsErik Faye-Lund2020-03-251-2/+2
| | | | | | | | | | | | | | | | | This code produces warnings, so let's fix that. The problem is that casting a pointer to an integer of non-pointer-size triggers warnings on MSVC, and on 64-bit Windows unsigned long is 32-bit large. So let's instead use uintptr_t, which is exactly for these kinds of things. While we're at it, let's make the resulting index a plain "unsigned", which is the type this originated from before we started with this cast-dance. Fixes: 1a66ead1c75 ("pipebuffer, winsys/svga: Add functionality to update pb_validate_entry flags") Reviewed-by: Brian Paul <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4297>
* vulkan/overlay: Add a workaround semaphore for application presenting ↵Lionel Landwerlin2020-03-251-19/+53
| | | | | | | | | | | | | | without one When an application calls vkQueuePresent() on a different queue than the one we run our drawing on and it doesn't give a semaphore to wait on, let's insert our own semaphore so that we don't race the application's drawing. Signed-off-by: Lionel Landwerlin <[email protected]> Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/2540 Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3893> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3893>
* ac: fix ac_build_is_helper_invocation when postponed_kill is nullPierre-Eric Pelloux-Prayer2020-03-251-0/+3
| | | | | | | | | | | If there was no demote() in the shader, ac_build_is_helper_invocation behaves exactly the same as ac_build_load_helper_invocation, i.e. the helper lanes are the same as they were at the beginning of the shader. Fixes: de57ea2a3da ("amd/llvm: implement nir_intrinsic_demote(_if) and nir_intrinsic_is_helper_invocation") Reviewed-by: Daniel Schürmann <[email protected]> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4301> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4301>