aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* meson: update llvm dependency logic for meson 0.54.0Dylan Baker2020-04-211-6/+8
| | | | | | | | | | | | | | | In meson 0.54.0 I fixed the llvm cmake dependency to return "not found" if shared linking is requested. This means that for 0.54.0 and later we don't need to do anything, and for earlier versions we only need to change the logic to force the config-tool method if shared linking is required. Fixes: 821cf6942a390f5f64d8a2cff9933b24c84f7dc1 ("meson: Use cmake to find LLVM when building for window") Acked-by: Marek Olšák <[email protected]> Reviewed-by: Eric Engestrom <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4556>
* remove final imports.h and imports.c bitsDylan Baker2020-04-21218-952/+843
| | | | | | | | | | | This moves the fi_types to a new mesa_private.h and removes the imports.c file. The vast majority of this patch is just removing pound includes of imports.h and fixing up the recursive includes. Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Kristian H. Kristensen <[email protected]> Reviewed-by: Matt Turner <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3024>
* dri/nouveau: replace assert with unreachableDylan Baker2020-04-211-1/+3
| | | | | | | | | | | I don't know why removing imports.h suddenly makes clang realize that this function can not return in a non-debug build, but it does. Unreachable is better because it doesn't have this problem. Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Kristian H. Kristensen <[email protected]> Reviewed-by: Matt Turner <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3024>
* mesa: move ADD_POINTERS to macros.hDylan Baker2020-04-211-0/+1
| | | | | | | | | | | | I'm not really sure where else to put it. Since imports.h only has two things left in it (neither of which are abstractions for smoothing away libc differences) I'd like to get them out of there. macros.h is the only place I can think of to put this macro. Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Kristian H. Kristensen <[email protected]> Reviewed-by: Matt Turner <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3024>
* mesa|mapi: replace _mesa_[v]snprintf with [v]snprintfDylan Baker2020-04-2118-78/+44
| | | | | | | | | | MSVC 2015 and newer has perfectly valid snprintf and vsnprintf implementations, let's just use those. Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Kristian H. Kristensen <[email protected]> Reviewed-by: Matt Turner <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3024>
* replace imports memory functions with utils memory functionsDylan Baker2020-04-2119-254/+96
| | | | | | | Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Kristian H. Kristensen <[email protected]> Reviewed-by: Matt Turner <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3024>
* util: Add an aligned realloc functionDylan Baker2020-04-214-17/+40
| | | | | | | | | | Mesa has one of these in imports.h, so u_memory needs one as well. This is the version from mesa ported. Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Kristian H. Kristensen <[email protected]> Reviewed-by: Matt Turner <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3024>
* replace malloc macros in imports.h with u_memory.h versionsDylan Baker2020-04-2168-1/+70
| | | | | | | Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Kristian H. Kristensen <[email protected]> Reviewed-by: Matt Turner <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3024>
* Replace IS_INF_OR_NAN with util_is_inf_or_nanDylan Baker2020-04-2111-49/+28
| | | | | | | Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Kristian H. Kristensen <[email protected]> Reviewed-by: Matt Turner <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3024>
* move windows strtok_r define to u_stringDylan Baker2020-04-212-4/+4
| | | | | | | | | | | This makes more sense for it, it's only used in the glsl compiler currently, so we could probably move it there, but this seems fine for a header only #define. Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Kristian H. Kristensen <[email protected]> Reviewed-by: Matt Turner <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3024>
* replace IROUND with util functionsDylan Baker2020-04-2112-95/+80
| | | | | | | | | | | | This adds two new util functions to rounding.h, _mesa_iroundf and mesa_lround, which are just wrappers around roundf and round, that cast to int and long int respectively. This is possible since mesa recently dropped support for VC2013, since 2015 and 2017 support roundf. Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Kristian H. Kristensen <[email protected]> Reviewed-by: Matt Turner <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3024>
* mesa/main: remove unused IROUNDDDylan Baker2020-04-211-8/+0
| | | | | | | Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Kristian H. Kristensen <[email protected]> Reviewed-by: Matt Turner <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3024>
* Replace IROUND_POS with _mesa_roundevenfDylan Baker2020-04-214-24/+11
| | | | | | | | | | | Which has the same behavior as long as you don't change the FPU rounding mode. Other code in mesa makes the same assumption so it should be safe to make that assumption more generally. Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Kristian H. Kristensen <[email protected]> Reviewed-by: Matt Turner <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3024>
* replace IFLOOR with util_ifloorDylan Baker2020-04-217-77/+47
| | | | | | | | | which are exactly the same function with exactly the same implementation Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Kristian H. Kristensen <[email protected]> Reviewed-by: Matt Turner <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3024>
* u_math: add x86 optimized version of ifloorDylan Baker2020-04-211-0/+18
| | | | | | | | | | This is copied from the one in src/mesa/main/imports.h, which is the same otherwise. Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Kristian H. Kristensen <[email protected]> Reviewed-by: Matt Turner <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3024>
* replace LOG2 with util_fast_log2Dylan Baker2020-04-213-33/+3
| | | | | | | | | | | The implementation is somewhat different, although if you go back in time far enough they're the same, but the one in u_math was changed a long time back to be faster. Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Kristian H. Kristensen <[email protected]> Reviewed-by: Matt Turner <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3024>
* replace _mesa_logbase2 with util_logbase2Dylan Baker2020-04-2111-38/+18
| | | | | | | Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Kristian H. Kristensen <[email protected]> Reviewed-by: Matt Turner <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3024>
* replace _mesa_next_pow_two_* with util_next_power_of_two_*Dylan Baker2020-04-212-53/+1
| | | | | | | | | | The 64 bit variant in imports.h isn't even used. Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Kristian H. Kristensen <[email protected]> Reviewed-by: Matt Turner <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3024>
* replace _mesa_is_pow_two with util_is_power_of_two_*Dylan Baker2020-04-2111-40/+29
| | | | | | | | | | | | | Mostly this uses util_is_power_of_two_or_zero, which has the same behavior as _mesa_is_pow_two when the input is zero. In cases where the value is known to be != 0 ahead of time I used the _nonzero variant as it may be faster on some platforms. Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Kristian H. Kristensen <[email protected]> Reviewed-by: Matt Turner <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3024>
* freedreno/drm-shim: Add support for faking other adreno chips.Eric Anholt2020-04-212-3/+124
| | | | | | | | | | I wanted to look at the effect of a core NIR change on a2xx codegen, but I don't have any of those boards. This could also prove useful for quickly sanity-checking the compiler by running shader-db on it -- a2xx fails in a few ways on glmark2, and a3xx-a5xx fails on glmark2 in a debug_assert (which we don't have enabled in our dEQP runs). Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4652>
* r600/sfn: use new temp register allocation when loading single value temporariesGert Wollny2020-04-211-2/+1
| | | | | Signed-off-by: Gert Wollny <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4609>
* r600/sfn: Count only literals that are not inline to split instruction groupsGert Wollny2020-04-211-1/+11
| | | | | | | | An instruction group can only support 4 distinct literals, but inline constants count into this number, so skip them when counting. Signed-off-by: Gert Wollny <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4609>
* r600/sfn: Fix using the result of a fetch instruction in next fetchGert Wollny2020-04-211-0/+11
| | | | | | | | | The result of a fetch instruction can't be used as source in the same CF block, so force a new CF block when the result would be used in the same vertex fetch block. Signed-off-by: Gert Wollny <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4609>
* r600/sfn: Fix handling of GS inputsGert Wollny2020-04-211-0/+3
| | | | | Signed-off-by: Gert Wollny <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4609>
* r600/sfn: Handle b2b1 like it was a movGert Wollny2020-04-211-0/+1
| | | | | Signed-off-by: Gert Wollny <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4609>
* r600/sfn: Fix null pointer deref in live range evalationGert Wollny2020-04-211-2/+4
| | | | | Signed-off-by: Gert Wollny <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4609>
* r600/nir: Pin interpolation results to channelGert Wollny2020-04-213-0/+11
| | | | Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4609>
* r600/sfn: Implementing instructions blocksGert Wollny2020-04-2112-36/+199
| | | | Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4609>
* r600/sfn: Fix setting alignments when lowering UBOsGert Wollny2020-04-211-1/+1
| | | | | Signed-off-by: Gert Wollny <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4609>
* r600/sfn: Reduce array limit for scratch usageGert Wollny2020-04-211-1/+1
| | | | | Signed-off-by: Gert Wollny <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4609>
* r600: Dump a few more variables when requestedGert Wollny2020-04-211-0/+32
| | | | | Signed-off-by: Gert Wollny <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4609>
* anv/android: fix assert in anv_import_ahw_memoryAbhishek Kumar2020-04-211-1/+1
| | | | | | | | | | | | Commit fixes assert that triggers when running dEQP-VK.api.external.memory.android_hardware_buffer.dedicated.buffer#bind_export_import_bind on a debug build of Mesa. Fixes: c79a528d ("anv/android: support import/export of AHardwareBuffer objects") Signed-off-by: Abhishek Kumar <[email protected]> Reviewed-by: Tapani Pälli <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4655>
* st/mesa: Re-assign vs in locations after updating nir info for ffvp/ARB_vpDanylo Piliaiev2020-04-211-0/+1
| | | | | | | | | | | | | | | | | After call to nir_shader_gather_info - inputs_read may have changed so st_nir_assign_vs_in_locations should be called for shader to remain in sync with vbo state. Fixes piglit tests: gl-1.0-fpexceptions gl-1.1-color-material-unused-normal-array arb_vertex_program-unused-attributes regression on several gallium drivers. Fixes: d684fb37bfbc47d098158cb03c0672119a4469fe Signed-off-by: Danylo Piliaiev <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4645>
* tu: Fix the advertised maxFragmentInputComponentsConnor Abbott2020-04-211-1/+1
| | | | | | | | | | This appears to be limited by VPC_CNTL_0::NUMNONPOSVAR, which is an 8-bit bitfield with no possibility for expansion. Also, in practice we'll be limited by the vertex shader output maximum, which includes gl_Position, of 128, so that users won't be able to use more than 124 components anyways. Lower it to match the GL blob. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4641>
* freedreno/a6xx: Expand various varying-count bitfieldsConnor Abbott2020-04-211-6/+6
| | | | | | | | | The extra bit needs to be used when using the maximum of 128 varying components. I confirmed that PC_PRIMITIVE_CNTL_1 and SP_PRIMITIVE_CNTL are expanded using a trace of the Vulkan blob with the maximum number of varyings, and changed the others by analogy. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4641>
* docs: remove outdated sentenceErik Faye-Lund2020-04-211-3/+0
| | | | | | | | | | | The releasing documentation no longer contains this step, so this seems out of date. The anchor for this link is also removed, making it point nowhere. Fixes: d4cb9ef8260 ("docs: Update release notes with current process") Reviewed-by: Eric Engestrom <[email protected]> Reviewed-by: Dylan Baker <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4654>
* st/omx: fix gcc warningsPierre-Eric Pelloux-Prayer2020-04-211-3/+3
| | | | | Reviewed-by: Marek Olšák <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4584>
* gallium/utils: silence strncpy warningPierre-Eric Pelloux-Prayer2020-04-211-1/+1
| | | | | Reviewed-by: Marek Olšák <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4584>
* mesa: fix crash in find_valuePierre-Eric Pelloux-Prayer2020-04-211-1/+5
| | | | | Reviewed-by: Marek Olšák <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4584>
* nir: Delete the fnoise opcodesJason Ekstrand2020-04-214-44/+1
| | | | | | | | | As of the previous commit, they are never used. Reviewed-by: Alyssa Rosenzweig <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4624>
* glsl: Hard-code noise to zero in builtin_functions.cppJason Ekstrand2020-04-2116-229/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Version 4.4 of the GLSL spec changed the definition of noise*() to always return zero and earlier versions of the spec allowed zero as a valid implementation. All drivers, as far as I can tell, unconditionally call lower_noise() today which turns ir_unop_noise into zero. We've got a 10-year-old comment in there saying "In the future, ir_unop_noise may be replaced by a call to a function that implements noise." Well, it's the future now and we've not yet gotten around to that. In the mean time, the GLSL spec has made doing so illegal. To make things worse, we then pretend to handle the opcode in glsl_to_nir, ir_to_mesa, and st_glsl_to_tgsi even though it should never get there given the lowering. The lowering in st_glsl_to_tgsi defines noise*() to be 0.5 which is an illegal implementation of the noise functions according to pre-4.4 specs. We also have opcodes for this in NIR which are never used because, again, we always call lower_noise(). Let's just kill the whole opcode and make builtin_builder.cpp build a bunch of functions that just return zero. Reviewed-by: Alyssa Rosenzweig <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4624>
* st/glsl_to_nir: make use of nir linker for linking uniformsTimothy Arceri2020-04-213-14/+17
| | | | | Reviewed-by: Alejandro Piñeiro <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4395>
* glsl: fix gl_nir_set_uniform_initializers() for bindless texturesTimothy Arceri2020-04-211-0/+6
| | | | | | | | We need to skip opaque variables inside blocks, this is handled elsewhere and will cause a crash here. Reviewed-by: Alejandro Piñeiro <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4395>
* glsl: add bindless support to nir uniform linkerTimothy Arceri2020-04-211-77/+172
| | | | | Reviewed-by: Alejandro Piñeiro <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4395>
* pick-ui: show commit sha in the pick listEric Engestrom2020-04-211-1/+1
| | | | | | | | Useful to get more context when a manual merge is needed, for instance. Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Dylan Baker <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4651>
* pick-ui: make .pick_status.json path relative to the git root instead of the ↵Eric Engestrom2020-04-211-1/+4
| | | | | | | | | | | script This allows the script to be called from another git worktree for instance, which I need for my workflow :) Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Dylan Baker <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4649>
* pick-ui: compute .pick_status.json path only onceEric Engestrom2020-04-211-7/+6
| | | | | | Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Dylan Baker <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4649>
* intel/fs: Coalesce when the src live range is contained in the dstJason Ekstrand2020-04-211-7/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Consider the following case: // g119-123 are written somewhere above mul.sat(16) g67<1>F g6.4<0,1,0>F g125<8,8,1>F mul.sat(16) g69<1>F g6.5<0,1,0>F g125<8,8,1>F mul.sat(16) g71<1>F g6.6<0,1,0>F g125<8,8,1>F mov(16) g119<1>F g67<8,8,1>F mov(16) g121<1>F g69<8,8,1>F mov(16) g123<1>F g71<8,8,1>F We should be able to coalesce it into mul.sat(16) g119<1>F g6.4<0,1,0>F g125<8,8,1>F mul.sat(16) g121<1>F g6.5<0,1,0>F g125<8,8,1>F mul.sat(16) g123<1>F g6.6<0,1,0>F g125<8,8,1>F What's stopping us is an overly conservative check for writes to the two registers being coalesced. The check walks over the intersection of their live ranges and checks for no writes to either one. However, because the register which starts the live range (the mul.sat in this case) is inside that intersection, we flag it as a write in the intersection and don't coalesce. However, this case is safe because the destination register of the copy is never read after the source is written. Shader-db changes on ICL: total instructions in shared programs: 16043613 -> 16042610 (<.01%) instructions in affected programs: 43036 -> 42033 (-2.33%) helped: 226 HURT: 0 helped stats (abs) min: 1 max: 30 x̄: 4.44 x̃: 4 helped stats (rel) min: 0.09% max: 26.67% x̄: 4.89% x̃: 3.43% 95% mean confidence interval for instructions value: -4.86 -4.02 95% mean confidence interval for instructions %-change: -5.57% -4.22% Instructions are helped. total cycles in shared programs: 334766372 -> 334710124 (-0.02%) cycles in affected programs: 617548 -> 561300 (-9.11%) helped: 214 HURT: 2 helped stats (abs) min: 15 max: 1512 x̄: 263.21 x̃: 212 helped stats (rel) min: 0.30% max: 75.36% x̄: 25.30% x̃: 21.58% HURT stats (abs) min: 40 max: 40 x̄: 40.00 x̃: 40 HURT stats (rel) min: 0.15% max: 0.15% x̄: 0.15% x̃: 0.15% 95% mean confidence interval for cycles value: -277.91 -242.90 95% mean confidence interval for cycles %-change: -27.58% -22.55% Cycles are helped. No spill/fill changes or gained/lost Reviewed-by: Matt Turner <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4627>
* intel/fs: Rename block to scan_block in can_coalesce_varsJason Ekstrand2020-04-211-4/+4
| | | | | | Reviewed-by: Matt Turner <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4627>
* radv: use common nir_convert_ycbcrJonathan Marek2020-04-201-122/+9
| | | | | | | | | Signed-off-by: Jonathan Marek <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]> Acked-by: Jason Ekstrand <[email protected]> Reviewed-by: D Scott Phillips <[email protected]> Reviewed-by: Lionel Landwerlin <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4528>