aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* nir/algebraic: mark float optimizations returning one parameter as inexactAndres Gomez2019-09-171-8/+8
| | | | | | | | | | | | | | | With the arrival of VK_KHR_shader_float_controls algebraic optimizations for float types of the form (('fop', a, b), a) become inexact depending on the execution mode. For example, if we have activated SHADER_DENORM_FLUSH_TO_ZERO, in case of a denorm value for the "a" parameter, we cannot return it still as a denorm, it needs to be flushed to zero. Therefore, we mark now all those operations as inexact. Suggested-by: Samuel Iglesias Gonsálvez <[email protected]> Signed-off-by: Andres Gomez <[email protected]> Reviewed-by: Connor Abbott <[email protected]>
* nir/constant_expressions: mind rounding mode converting from float to ↵Samuel Iglesias Gonsálvez2019-09-171-2/+10
| | | | | | | | | | | | float16 destinations v2: - Move the op-code specific knowledge to nir_opcodes.py even if it means a rount trip conversion (Connor). Signed-off-by: Samuel Iglesias Gonsálvez <[email protected]> Signed-off-by: Andres Gomez <[email protected]> Reviewed-by: Caio Marcelo de Oliveira Filho <[email protected]>
* nir/opcodes: make sure f2f16_rtz and f2f16_rtne behavior is not overriden by ↵Samuel Iglesias Gonsálvez2019-09-171-1/+20
| | | | | | | | | the float controls execution mode Suggested-by: Connor Abbott <[email protected]> Signed-off-by: Samuel Iglesias Gonsálvez <[email protected]> Signed-off-by: Andres Gomez <[email protected]> Reviewed-by: Connor Abbott <[email protected]>
* nir: mind rounding mode on fadd, fsub, fmul and fma opcodesSamuel Iglesias Gonsálvez2019-09-172-4/+46
| | | | | | | | | | | | | | | | | | | | | | According to Vulkan spec, the new execution modes affect only correctly rounded SPIR-V instructions, which includes fadd, fsub and fmul. v2: - Fix fmul, fsub and fadd round-to-zero definitions, they should use auxiliary functions to calculate the proper value because Mesa uses round-to-nearest-even rounding mode by default (Connor). v3: - Do an actual fused multiply-add at ffma (Connor). v4: - Simplify fadd and fmul for bit sizes < 64 (Connor). - Do not use double ffma for 32 bits float (Connor). Signed-off-by: Samuel Iglesias Gonsálvez <[email protected]> Signed-off-by: Andres Gomez <[email protected]> Reviewed-by: Connor Abbott <[email protected]> [v3]
* nir: add support for round to zero rounding mode to nir_op_f2f32Samuel Iglesias Gonsálvez2019-09-172-0/+11
| | | | | | | | | f2f16's rounding modes are already handled and f2f64 don't need it as there is not a floating point type with higher bit size than 64 for now. Signed-off-by: Samuel Iglesias Gonsálvez <[email protected]> Reviewed-by: Connor Abbott <[email protected]>
* util: add fp64 -> fp32 conversion support for RTNE and RTZ rounding modesSamuel Iglesias Gonsálvez2019-09-174-0/+95
| | | | | | | | | | | | | | | | | | | | | | In order to be coherent with the pre-existent API for half floats, this new API for double is the one meant to be used when doing double to float conversions. It is no more than a wrapper for the softfloat.h API but we meant to keep that one private. v2: - Fix bug in _mesa_double_to_float_rtz() in the inf/nan detection using the exponent value. v3: - Replace custom f64 -> f32 implementations with the softfloat one (Andres). v4: - Added API usage clarifying comments (Caio). Signed-off-by: Samuel Iglesias Gonsálvez <[email protected]> Signed-off-by: Andres Gomez <[email protected]> Reviewed-by: Caio Marcelo de Oliveira Filho <[email protected]>
* util: add float to float16 conversions with RTZ and RTNESamuel Iglesias Gonsálvez2019-09-172-0/+22
| | | | | | | | | | | | | | | | | | In order to be coherent with the pre-existent functions, this new API is the one meant to be used when doing half float to float conversions. It is no more than a wrapper for the softfloat.h API but we meant to keep that one private. v2: - Replace custom f32 -> f16 RTZ implementation with the softfloat one (Andres). v3: - Added API usage clarifying comments (Caio). Signed-off-by: Samuel Iglesias Gonsálvez <[email protected]> Signed-off-by: Andres Gomez <[email protected]> Reviewed-by: Caio Marcelo de Oliveira Filho <[email protected]>
* util: add softfloat functions to operate with doubles and floatsSamuel Iglesias Gonsálvez2019-09-174-0/+1544
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Implemented fadd, fsub, fmul and ffma for doubles and ffma for floats, rounding to zero, using a modified implementation from Berkely Softfloat 3e Library. Their implementation correctness has been checked with the Berkeley TestFloat Release 3e tool for x86_64. v2: - Reuse util_last_bit64() in _mesa_count_leading_zeros64() implementation (Connor). v3: - Add a specific ffma for floats version (Connor). - Implement the ffma for doubles version (Andres). - Lots of fixes in fadd, fsub and fmul (Andres). - Improved documentation (Andres). v4: - Added f64 -> f32 conversion function (Andres). - Added f32 -> f16 RTZ conversion function (Andres). Signed-off-by: Samuel Iglesias Gonsálvez <[email protected]> Signed-off-by: Andres Gomez <[email protected]> Tested-by: Andres Gomez <[email protected]> Acked-by: Caio Marcelo de Oliveira Filho <[email protected]>
* nir: add support for flushing to zero denorm constantsSamuel Iglesias Gonsálvez2019-09-175-41/+109
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | v2: - Refactor conditions and shared function (Connor). - Move code to nir_eval_const_opcode() (Connor). - Don't flush to zero on fquantize2f16 From Vulkan spec, VK_KHR_shader_float_controls section: "3) Do denorm and rounding mode controls apply to OpSpecConstantOp? RESOLVED: Yes, except when the opcode is OpQuantizeToF16." v3: - Fix bit size (Connor). - Fix execution mode on nir_loop_analize (Connor). v4: - Adapt after API changes to nir_eval_const_opcode (Andres). v5: - Simplify constant_denorm_flush_to_zero (Caio). v6: - Adapt after API changes and to use the new constant constructors (Andres). - Replace MAYBE_UNUSED with UNUSED as the first is going away (Andres). v7: - Adapt to newly added calls (Andres). - Simplified the auxiliary to flush denorms to zero (Caio). - Updated to renamed supported capabilities member (Andres). Signed-off-by: Samuel Iglesias Gonsálvez <[email protected]> Signed-off-by: Andres Gomez <[email protected]> Reviewed-by: Connor Abbott <[email protected]> [v4] Reviewed-by: Caio Marcelo de Oliveira Filho <[email protected]>
* nir: add auxiliary functions to detect if a mode is enabledSamuel Iglesias Gonsálvez2019-09-171-0/+81
| | | | | | | | | | | | | | | | v2: - Added more functions. v3: - Simplify most of the functions (Caio). v4: - Updated to renamed enum values (Andres). Signed-off-by: Samuel Iglesias Gonsálvez <[email protected]> Signed-off-by: Andres Gomez <[email protected]> Reviewed-by: Connor Abbott <[email protected]> [v2] Reviewed-by: Caio Marcelo de Oliveira Filho <[email protected]> [v3]
* spirv/nir: keep track of SPV_KHR_float_controls execution modesSamuel Iglesias Gonsálvez2019-09-173-0/+95
| | | | | | | | | | | | | | | | | | | | | | | | | | | | v2: - Add support for rounding modes for each floating point bit size. v3: - Commit e68871f6a44 ("spirv: Handle constants and types before execution modes") changed when the execution modes are handled, which affects the result of the floating point constants when the rounding mode is set in the execution mode. Moved the handling of the rounding modes before we handle the constants. v4: - Rename vtn_decoration "literals" to "operands" (Andres). - Simplify execution mode parsing util function (Caio). - Extend the comment about the timing of the handling of the rounding modes (Caio). v5: - Correct extension name (Caio). - Rename shader info member (Andres). - Rename float controls enum (Andres). Signed-off-by: Samuel Iglesias Gonsálvez <[email protected]> Signed-off-by: Andres Gomez <[email protected]> Reviewed-by: Connor Abbott <[email protected]> [v3] Reviewed-by: Caio Marcelo de Oliveira Filho <[email protected]>
* spirv: check support for SPV_KHR_float_controls capabilitiesSamuel Iglesias Gonsálvez2019-09-172-0/+8
| | | | | | | | | | v2: - Correct extension name (Caio). - Rename supported capabilities member (Andres). Signed-off-by: Samuel Iglesias Gonsálvez <[email protected]> Reviewed-by: Connor Abbott <[email protected]> [v1] Reviewed-by: Caio Marcelo de Oliveira Filho <[email protected]>
* gallium/xlib: Fix glXMakeCurrent(dpy, None, None, ctx)Adam Jackson2019-09-172-27/+40
| | | | | This is entirely legal in GL 3.0+. I wonder how many more times I'll need to fix this specific bug.
* gallium/xlib: Remove MakeCurrent_PrevContextAdam Jackson2019-09-171-12/+5
| | | | | As the comment notes, this is not thread-safe. You can just as easily use GetCurrentContext instead, so, do that.
* gallium/xlib: Remove drawable caching from the MakeCurrent pathAdam Jackson2019-09-171-32/+3
| | | | | AFAICT this only exists to avoid hitting XMesaFindBuffer, which is a linear search. But you don't have that many GLX drawables, so whatever.
* radeonsi: add Navi12 PCI IDMarek Olšák2019-09-171-0/+2
| | | | | | trivial and urgent Cc: 19.2 <[email protected]>
* ci: Run tests on i386 cross buildsAdam Jackson2019-09-174-6/+29
| | | | | | | | | Yes, some tests fail, but we can turn those into XFAILs at meson time. Better to keep the things that work working than not cover them at all. Unfortunately XPASS results will not cause the build to fail until we update CI to meson 0.51 or newer. Reviewed-by: Daniel Stone <[email protected]>
* Fix timespec_from_nsec test for 32-bit time_tJon Turney2019-09-171-1/+1
| | | | | | | | | Since struct timespec's tv_sec member is of type time_t, adjust the expected value to allow for the truncation which will occur with 32-bit time_t. Reviewed-by: Lionel Landwerlin <[email protected]> Reviewed-by: Adam Jackson <[email protected]>
* iris: close screen fd on iris_destroy_screenTapani Pälli2019-09-171-0/+1
| | | | | | | | | Otherwise it never gets closed, this fixes errors seen with deqp-egl where we end up opening 1024 files. Fixes: 2dce0e94 ("iris: Initial commit of a new 'iris' driver for Intel Gen8+ GPUs.") Signed-off-by: Tapani Pälli <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* docs: update calendar, add news item and link release notes for 19.1.7Juan A. Suarez Romero2019-09-173-7/+8
| | | | Signed-off-by: Juan A. Suarez Romero <[email protected]>
* docs: add sha256 checksums for 19.1.7Juan A. Suarez Romero2019-09-171-1/+1
| | | | | Signed-off-by: Juan A. Suarez Romero <[email protected]> (cherry picked from commit b9d7244035ce2da5bd93c984e30944b3730b219e)
* docs: add release notes for 19.1.7Juan A. Suarez Romero2019-09-171-0/+152
| | | | | Signed-off-by: Juan A. Suarez Romero <[email protected]> (cherry picked from commit f632aac9385cfe02f5bfe762d93e60b5b46f2c77)
* ac: Remove DEBUG workaroundMichel Dänzer2019-09-171-6/+0
| | | | | | As of version 7, LLVM uses LLVM_DEBUG instead of just DEBUG. Reviewed-by: Timothy Arceri <[email protected]>
* swr: Limit DEBUG workaround to LLVM < 7Michel Dänzer2019-09-173-3/+21
| | | | | | As of version 7, LLVM uses LLVM_DEBUG instead of just DEBUG. Reviewed-by: Timothy Arceri <[email protected]>
* gallivm: Limit DEBUG workaround to LLVM < 7Michel Dänzer2019-09-171-0/+4
| | | | | | As of version 7, LLVM uses LLVM_DEBUG instead of just DEBUG. Reviewed-by: Timothy Arceri <[email protected]>
* st/mesa: remove always-true expressionErik Faye-Lund2019-09-171-1/+0
| | | | | | | | | | In case the GLSL version is 130 or higher, we've already enabled ARB_shader_bit_encoding a bit earlier in this same function. So this condition will always be true. Signed-off-by: Erik Faye-Lund <[email protected]> Reviewed-by: Tapani Pälli <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* etnaviv: a bit of micro-optimizationChristian Gmeiner2019-09-172-1/+4
| | | | | Signed-off-by: Christian Gmeiner <[email protected]> Reviewed-by: Jonathan Marek <[email protected]>
* lima: reset scissor state if scissor test is disabledIcenowy Zheng2019-09-171-0/+4
| | | | | | | | | | | The PLBU seems to preserve scissor state between draws, and since lima doesn't emit PLBU_CMD_SCISSORS() if scissor test is disabled, it uses state from previous draw. Fix it by emitting PLBU_CMD_SCISSORS() for full fb if scissor test is disabled. Signed-off-by: Icenowy Zheng <[email protected]> Reviewed-by: Vasily Khoruzhick <[email protected]> Reviewed-by: Qiang Yu <[email protected]>
* vulkan: Update the XML and headers to 1.1.123Jason Ekstrand2019-09-1714-124/+192
| | | | Acked-by: Caio Marcelo de Oliveira Filho <[email protected]>
* spirv: Handle ShaderLayer and ShaderViewportIndex capabilitiesCaio Marcelo de Oliveira Filho2019-09-161-0/+2
| | | | | | | | SPIR-V 1.5 incorported the SPV_EXT_shader_viewport_index_layer but splitting into the two capabilities above. Just handle them as we support the extension already. Reviewed-by: Jason Ekstrand <[email protected]>
* spirv: Update JSON and headers to 1.5Caio Marcelo de Oliveira Filho2019-09-162-73/+1005
| | | | Acked-by: Jason Ekstrand <[email protected]>
* freedreno: Fix invalid read when a block has no instructions.Eric Anholt2019-09-161-2/+3
| | | | | | | | | | | | | We can't deref list_(first/last)_entries unless we know we have at least one. Instead, just use our IP we've been tracking as we go to set up the start ip, and fill in the end IP as we walk instructions. Fixes a complaint in valgrind on dEQP-GLES3.functional.transform_feedback.* which sometimes has an empty main (non-END) block when the VS inputs are just directly mapped to outputs without any ALU ops. Reviewed-by: Rob Clark <[email protected]>
* st/mesa: Increase GL_POINT_SIZE_RANGE minimum to 1.0Kenneth Graunke2019-09-161-4/+1
| | | | | | | | | | | | | | | | | | Table 23.54 of the OpenGL 4.5 spec lists the minimum values for GL_POINT_SIZE_RANGE as [1, 1]. So zero is not allowed (even though arguably this could be useful for MSAA rendering, where a sub-1px point might cover only some samples...) This fixes the WebGL 2.0 conformance suite's state.gl-get-calls test on Chromium on Linux, which uses desktop OpenGL. The test checks that the minimum value of GL_ALIASED_POINT_SIZE_RANGE is 1. Unfortunately, that query doesn't exist in desktop GL, so it checks POINT_SIZE_RANGE, which is the anti-aliased value. There's not really anything better for Chromium to do here, unfortunately. When running Chromium with --api=es3, it maps it to the correct query and the test already works. Reviewed-by: Jordan Justen <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* st/mesa: Prefer 5551 formats for GL_UNSIGNED_SHORT_5_5_5_1.Kenneth Graunke2019-09-161-0/+7
| | | | | | | | | | | | Previously, internalformat GL_RGBA and type GL_UNSIGNED_SHORT_5_5_5_1 was promoted to RGBA8888 as the table entry with the 5551 formats is listed below the 8888 entry, and it also doesn't have GL_RGBA as a possible internalformat. Using actual 5551 fixes the following dEQP-EGL test: - dEQP-EGL.functional.image.modify.tex_rgb5_a1_tex_subimage_rgba8 Reviewed-by: Eric Anholt <[email protected]>
* radv: always emit a position export in gs copy shadersRhys Perry2019-09-161-1/+1
| | | | | | Signed-off-by: Rhys Perry <[email protected]> Fixes: f8d0337299f ('radv: add multiple streams support for the GS copy shader') Reviewed-by: Samuel Pitoiset <[email protected]>
* radv: keep GS threads with excessive emissions which could write to memoryRhys Perry2019-09-163-4/+16
| | | | | Signed-off-by: Rhys Perry <[email protected]> Reviewed-by: Samuel Pitoiset <[email protected]>
* drirc: include unreal engine version 0 to 23Lionel Landwerlin2019-09-161-1/+1
| | | | | | | | | This was meant to include up to version 23. Signed-off-by: Lionel Landwerlin <[email protected]> Fixes: 0616b7ac90 ("vulkan: add vk_x11_strict_image_count option") Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=111522 Reviewed-by: Eric Engestrom <[email protected]>
* util/xmlconfig: fix regexp compile failure checkLionel Landwerlin2019-09-161-1/+1
| | | | | | | | This is embarrasing... Signed-off-by: Lionel Landwerlin <[email protected]> Fixes: 04dc6074cf ("driconfig: add a new engine name/version parameter") Reviewed-by: Eric Engestrom <[email protected]>
* gallium/gdi: use GALLIUM_FOO rather than HAVE_FOOErik Faye-Lund2019-09-162-10/+10
| | | | | | | | | This matches what other targets do, and makes it easier to port to meson. Signed-off-by: Erik Faye-Lund <[email protected]> Reviewed-by: Dylan Baker <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* scons: Make scons and meson agree about path to glapi generated headersDylan Baker2019-09-168-5/+8
| | | | | | | | Currently scons puts them in src/mapi/glapi, meosn puts them in src/mapi/glapi/gen. This results in some things being compilable only by one or the other, put them in the same places so that everyone is happy. Reviewed-by: Eric Engestrom <[email protected]>
* lima: add standalone disassembler with primitive MBS parserVasily Khoruzhick2019-09-162-0/+219
| | | | | | | | | It's useful for analyzing shader binaries produced by ARM mali offline compiler which outputs files in MBS format. MBS is mali binary shader, currently parser just extracts shader binary and ignores everything else. Reviewed-and-tested-by: Connor Abbott<[email protected]> Signed-off-by: Vasily Khoruzhick <[email protected]>
* mesa/gl: Sync with Khronos registryHeinrich Fink2019-09-166-242/+1406
| | | | | | | | | | | | | | | | | | Update GL headers and xml API from upstream Khronos registry (commit 3d0c3eb). Keep `BUILDING_MESA` quirk in glext.h. mesa/extensions: Expose EXT_EGL_sync instead of MESA_EGL_sync to reflect Khronos request of changing this extension's scope from MESA to EXT. EGL_EGL_sync is also the name of the extension that has been merged into the upstream Khronos GL registry. Remove MESA_EGL_sync spec txt from Mesa tree as it is now published as EXT by Khronos. v1: Remove MESA_EGL_sync spec and squash commits (Eric E) Reviewed-by: Eric Engestrom <[email protected]> Reviewed-by: Daniel Stone <[email protected]>
* nir/large_constants: pass after lowering copy_derefSergii Romantsov2019-09-162-32/+9
| | | | | | | | | | | v2: by J.Ekstrand suggestion moved lowering of large constants after lowering of copy_deref is done. CC: Jason Ekstrand <[email protected]> CC: Caio Marcelo de Oliveira Filho <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=111450 Signed-off-by: Sergii Romantsov <[email protected]>
* gitlab-ci: Move up meson-arm64 job definitionMichel Dänzer2019-09-161-42/+42
| | | | | | | This might allow the arm64 tests to start running earlier. Reviewed-by: Eric Engestrom <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* gitlab-ci: Move dependencies/needs for meson-main job to .deqp-testMichel Dänzer2019-09-161-6/+3
| | | | Reviewed-by: Eric Anholt <[email protected]>
* gitlab-ci: Simplify some job definitions by extending more similar jobsMichel Dänzer2019-09-161-37/+15
| | | | | | | | | | v2: * Preserve setting NIR_VALIDATE=0 for all arm64_* jobs * Preserve setting DEQP_SKIPS=deqp-default-skips.txt for arm64_a306_gles2 jobs Reviewed-by: Eric Engestrom <[email protected]> # v1 Reviewed-by: Eric Anholt <[email protected]>
* gitlab-ci: Use multiple inheritance instead of YAML referencesMichel Dänzer2019-09-161-12/+16
| | | | | | | Support for multiple inheritance was added to GitLab recently. Reviewed-by: Eric Engestrom <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* gitlab-ci: Add needs stanza to arm64_a306_gles2 job definitionMichel Dänzer2019-09-161-0/+1
| | | | | | | | | This allows the arm64_a306_gles2 jobs to run as soon as the meson-arm64 job has finished. Fixes: 6f0dc087b7a5 "freedreno: Introduce gitlab-based CI." Reviewed-by: Eric Engestrom <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* radeonsi/nir: fix number of used samplersTimothy Arceri2019-09-161-1/+1
| | | | | | | | | | | | | | | Commit f3e978db incorrectly assumed the maximum number of samplers was equal to the max number of defined samplers e.g. where bindings skip slots. This fixes an assert in si_nir_load_sampler_desc() for an enemy territory quake wars shader. And fixes potential bugs with incorrect bounds limiting in the same code for production builds of mesa. Fixes: f3e978db ("radeonsi/nir: Remove uniform variable scanning") Reviewed-by: Connor Abbott <[email protected]>
* radv/gfx10: disable unsupported transform feedback features for NGGSamuel Pitoiset2019-09-161-3/+3
| | | | | | | Mostly multiple streams and queries which have to be fixed/implemented. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>