summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)AuthorFilesLines
2018-02-02meson: Don't confuse the install and search paths for dri driversHEADmasterDylan Baker3-4/+4
Currently there is not a separate option for setting the search path of DRI drivers in meson, like there is in scons and autotools. This is an oversight and needs to be fixed. This adds an extra option `dri-search-path`, which will default to the value of `dri-drivers-path`, like autotools does. v2: - Split input list before joining. v3: - use : instead of ; as the delimiter. The autotools help string incorrectly says ; but the code uses : v4: - Take list in pre : delimited form (Ilia) - Ensure that the dri-search-path is absolute when using dri_drivers_path Fixes: db9788420d4bc7b4 ("meson: Add support for configuring dri drivers directory.") Reported-by: Ilia Mirkin <imirkin@alum.mit.edu> Signed-off-by: Dylan Baker <dylan.c.baker@intel.com> Reviewed-by: Eric Anholt <eric@anholt.net> (v2) Reviewed-by: Eric Engestrom <eric@engestrom.ch> (v3)
2018-02-02radeonsi: use pknorm_i16/u16 and pk_i16/u16 LLVM intrinsicsMarek Olšák3-113/+216
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
2018-02-02glx/test: fix building for osxJon Turney2-0/+16
An additional stub for applegl_create_context() is needed Cannot test indirect API as it's not built on osx, currently Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
2018-02-02i965: check if upload is 0 explicitely, when downsizing a formatAndres Gomez1-8/+8
downsize_format_if_needed takes an integer as number of uploads parameter. Hence, let's do an integer comparation instead of a boolean check, since that is confusing. Since we are at it, fix a couple of wrongly tabbed indents. Cc: Alejandro Piñeiro <apinheiro@igalia.com> Cc: Kenneth Graunke <kenneth@whitecape.org> Signed-off-by: Andres Gomez <agomez@igalia.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
2018-02-02mesa: don't flag _NEW_COLOR for KHR adv.blend if prog constant doesn't changeMarek Olšák4-15/+51
This only affects drivers that set DriverFlags.NewBlend. v2: - fix typo advanded -> advanced - return "enum gl_advanced_blend_mode" from _mesa_get_advanced_blend_sh_constant - don't call FLUSH_VERTICES twice Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2018-02-02ac/nir: replace SI.buffer.load.dword with amdgcn.buffer.loadSamuel Pitoiset1-32/+20
The old one generates useless instructions in there, found while comparing geometry shaders between RadeonSI and RADV. This improves all Vulkan demos that use geometry shaders, +4% for deferredshadows, +9% for viewportarray, +7% for geometryshader on Polaris10. This seems to also improve DOW3 a little bit (+1%). Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
2018-02-02r600/eg: add crap indirect compute support.Dave Airlie1-7/+19
I think the cp packets can be made work, but I think it might need a kernel change, so for now just do the worst thing. Reviewed-by: Roland Scheidegger <sroland@vmware.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2018-02-01i965: Call prepare_external after implicit window-system MSAA resolvesJason Ekstrand1-0/+15
This fixes some rendering corruption in a couple of Android apps that use window-system MSAA. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=104741 Cc: mesa-stable@lists.freedesktop.org Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
2018-02-02r600: don't do stack workarounds for hemlockRoland Scheidegger1-0/+1
By the looks of it it seems hemlock is treated separately to cypress, but certainly it won't need the stack workarounds cedar/redwood (and seemingly every other eg chip except cypress/juniper) need. (Discovered by accident.) Acked-by: Alex Deucher <alexander.deucher@amd.com>
2018-02-02r600: initial attempt at gl_HelperInvocation (v3)Dave Airlie6-3/+108
This passes the CTS and piglit tests. This also disable sb for helper invocations until it doesn't mess up the VPM flags. Thanks to Ilia and Glenn for advice, and Roland for working out the working evergreen path. Reviewed-by: Roland Scheidegger <sroland@vmware.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2018-02-01radv: Don't expose VK_KHX_multiview on android.Bas Nieuwenhuizen1-1/+1
deqp does not allow any KHX extensions, and since deqp is included in android-cts, android does not allow any khx extensions. So disable VK_KHX_multiview on android. Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> CC: 18.0 <mesa-stable@lists.freedesktop.org>
2018-02-01vbo: Simplify input array distribution for dlist type draws.Mathias Fröhlich1-46/+8
Using the newly introduced VAO array maps, we can simplify vbo_bind_vertex_list. Signed-off-by: Mathias Fröhlich <Mathias.Froehlich@web.de> Reviewed-by: Brian Paul <brianp@vmware.com>
2018-02-01vbo: Simplify input array distribution for imm type draws.Mathias Fröhlich1-66/+15
Using the newly introduced VAO array maps, we can simplify vbo_exec_bind_arrays. Signed-off-by: Mathias Fröhlich <Mathias.Froehlich@web.de> Reviewed-by: Brian Paul <brianp@vmware.com>
2018-02-01vbo: Simplify input array distribution for array type draws.Mathias Fröhlich1-83/+27
Using the newly introduced VAO state variable, we can simplify recalculate_input_bindings. Signed-off-by: Mathias Fröhlich <Mathias.Froehlich@web.de> Reviewed-by: Brian Paul <brianp@vmware.com>
2018-02-01vbo: Use static const VERT_ATTRIB->VBO_ATTRIB maps.Mathias Fröhlich6-35/+99
Instead of each context having its own map instance for this purpose, use a global static const map. v2: s,unsigned char,GLubyte,g s,_VP_MODE_MAX,VP_MODE_MAX,g Change comment style. Signed-off-by: Mathias Fröhlich <Mathias.Froehlich@web.de> Reviewed-by: Brian Paul <brianp@vmware.com>
2018-02-01mesa: Track position/generic0 aliasing in the VAO.Mathias Fröhlich5-4/+242
Since the first material attribute no longer aliases with the generic0 attribute, only aliasing between generic0 and position is left and entirely dependent on the enabled state of the VAO. So introduce a gl_attribute_map_mode in the VAO that is used to track how the position and the generic 0 attribute alias. Provide a static const array that can be used to map from vertex program input indices to VERT_ATTRIB_* indices. The outer dimension of the array is meant to be indexed directly by the new VAO member variable. Also provide methods on the VAO to convert bitmasks of VERT_BIT's from the VAO numbering to the vertex processing inputs numbering. v2: s,unsigned char,GLubyte,g s,_ATTRIBUTE_MAP_MODE_MAX,ATTRIBUTE_MAP_MODE_MAX,g Change comment style, add comments. Signed-off-by: Mathias Fröhlich <Mathias.Froehlich@web.de> Reviewed-by: Brian Paul <brianp@vmware.com>
2018-02-01mesa: Put materials at the end of the generic block.Mathias Fröhlich5-19/+24
The materials are now moved to the end of the generic attributes block to the range 4-15. Before, the way the position and generic 0 attribute is handled was dependent on the presence and kind of the currently attached vertex program. With this change the way the position attribute and the generic 0 attribute is treated only depends on the enabled flag of those two arrays. This will later help to untangle the update dependencies between enabled arrays and shader inputs. v2: s,VERT_ATTRIB_MAT_OFFSET,VERT_ATTRIB_MAT0,g Signed-off-by: Mathias Fröhlich <Mathias.Froehlich@web.de> Reviewed-by: Brian Paul <brianp@vmware.com>
2018-02-01mesa: Use defines for the aliased material array attributes.Mathias Fröhlich11-37/+55
Instead of just assuming that the material attributes just overlap with the generic attributes 0-12, give them symbolic defines so that we can easier move them to an other range. Signed-off-by: Mathias Fröhlich <Mathias.Froehlich@web.de> Reviewed-by: Brian Paul <brianp@vmware.com>
2018-02-01vbo: Correctly handle attribute offsets in dlist draw.Mathias Fröhlich3-31/+36
When executing a display list draw, for the offset list to be correct, the offset computation needs to accumulate all attribute size values in order. Specifically, if we are shuffling around the position and generic0 attributes, we may violate the order or if we do not walk the generic vbo attributes we may skip some of the attributes. Even if this is an unlikely usecase we can fix this use case by precomputing the offsets on the full attribute list and store the full offset list in the display list node. v2: Formatting fix v3: Rebase Signed-off-by: Mathias Fröhlich <Mathias.Froehlich@web.de> Reviewed-by: Brian Paul <brianp@vmware.com>
2018-02-01gallivm/llvmpipe: add const qualifiers on sampler variablesBrian Paul5-8/+8
Once a lp_build_sampler_soa or lp_build_sampler_aos object is created, it should never be modified. Found by inspection. Reviewed-by: Roland Scheidegger <sroland@vmware.com>
2018-02-01vbo: change an argument in vbo_draw_indirect_prims()Brian Paul1-5/+12
In vbo_draw_indirect_prims() pass the 'indirect_data' argument to vbo->draw_prims(). All the callers are passing ctx->DrawIndirectBuffer so this should be no functional change. Add a (temporary) assertion to be sure. Reviewed-by: Marek Olšák <marek.olsak@amd.com> Reviewed-by: Mathias Fröhlich <mathias.froehlich@web.de>
2018-02-01vbo: add comments on the VBO draw function typedefsBrian Paul1-2/+55
And rename indirect_params -> indirect_draw_count_buffer and indirect_params_offset -> indirect_draw_count_offset to be more specific. Reviewed-by: Marek Olšák <marek.olsak@amd.com> Reviewed-by: Mathias Fröhlich <mathias.froehlich@web.de>
2018-02-01vbo: s/drawcount/drawcount_offsetBrian Paul1-12/+16
This parameter (from the glMultiDrawArraysIndirectCountARB function) is poorly named. It's an offset into the buffer which contains the number of primitives to draw. Reviewed-by: Marek Olšák <marek.olsak@amd.com> Reviewed-by: Mathias Fröhlich <mathias.froehlich@web.de>
2018-02-01vbo: use vbo local var for draw call in vbo_save_playback_vertex_list()Brian Paul1-7/+7
Reviewed-by: Marek Olšák <marek.olsak@amd.com> Reviewed-by: Mathias Fröhlich <mathias.froehlich@web.de>
2018-02-01svga: remove unneeded #includes in svga_pipe_draw.cBrian Paul1-7/+0
Reviewed-by: Neha Bhende <bhenden@vmware.com>
2018-02-01svga: whitespace/formatting fixes in svga_pipe_draw.cBrian Paul1-33/+34
Reviewed-by: Neha Bhende <bhenden@vmware.com>
2018-02-01svga: clean up retry_draw_range_elements(), retry_draw_arrays()Brian Paul1-54/+27
Get rid of a bunch of goto spaghetti. Remove unneeded do_retry parameter. No Piglit changes. Also tested w/ Google Earth and other apps. Reviewed-by: Neha Bhende <bhenden@vmware.com>
2018-02-01svga: remove unused min/max_index params to draw_vgpu10()Brian Paul1-4/+3
Reviewed-by: Neha Bhende <bhenden@vmware.com>
2018-02-01broadcom/vc5: Fix image_h setup for both loads and stores.Eric Anholt1-3/+2
The image_h for the tiling algorithm needs to be the padded-to-a-uifblock height of the level, not the unpadded height or the height of level 0. Fixes some cases of KHR-GLES3.texture_repeat_mode.* and depthstencil-render-miplevels.
2018-02-01broadcom/vc5: Add appropriate height padding for bank conflicts.Eric Anholt4-0/+63
I thought I didn't need this because I was doing level-0-always-UIF and that the pad there would propagate down, but it turns out that for level 1 the padding ends up being chosen by the HW. This brings us closer to being able to turn on UIF XOR for increased performance, as well.
2018-02-01broadcom/vc5: Simplify separate stencil surface setup.Eric Anholt3-99/+77
If we just make another gallium surface for the separate stencil, it's a lot easier to keep track of which set of fields we're using in RCL setup. This also incidentally fixes a little bug in setting up the surface's padded height for separate stencil when the UIF-ness changes at different levels of Z versus stencil.
2018-02-01broadcom/vc5: Rename the UIFCFG register in the UAPI.Eric Anholt2-2/+2
This matches the naming of the other hub regs we get, and I don't know for sure if UIFCFG will be the same register between the hub and the cores on all versions.
2018-02-01broadcom/vc5: Fix a segfault on mix of booleans.Eric Anholt1-1/+3
We don't have a src1 to look up if the compare instruction is "i2b".
2018-02-01broadcom/vc5: Skip over missing color buffers for a couple of checks.Eric Anholt2-0/+6
Fixes crashes in piglit alpha-to-coverage-no-draw-buffer-zero 2
2018-02-01broadcom/vc5: Add the missing PIPE_CAP_FENCE_SIGNAL.Eric Anholt1-0/+1
2018-02-01mesa: fix query of GL_TEXTURE_COMPRESSION_HINT_ARBBaldur Karlsson1-1/+1
Fixes: f96a69f916a ("mesa: replace GLenum with GLenum16 in common structures (v4)") Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=104908 Reviewed-by: Brian Paul <brianp@vmware.com>
2018-02-01renderonly: fix dumb BO allocation for non 32bpp formatsLucas Stach1-1/+2
Take into account the resource format, instead of applying a hardcoded 32bpp. This not only over-allocates 16bpp formats, but also results in a wrong stride being filled into the handle. Fixes: 848b49b288f ("gallium: add renderonly library") CC: <mesa-stable@lists.freedesktop.org> Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de> Reviewed-by: Daniel Stone <daniels@collabora.com>
2018-02-01intel/decoder: Fix control / evaluation label mixup.Kenneth Graunke1-2/+2
Trivial. DS is TES, HS is TCS.
2018-02-01i965: Bump official kernel requirement to Linux v3.9.Kenneth Graunke1-2/+2
In commit 3f353342a6b6744773c26ed66b12afed42bd57af (present in 17.3.0) we started unconditionally using I915_EXEC_NO_RELOC, which was introduced in Linux v3.9. ChromeOS kernel 3.8 has backported this, so it should work too. Running on older kernels would likely result in every single batch being rejected by the kernel, which is pretty catastrophic. Yet, it appears that nobody noticed. So, let's just bump the official requirement and move forward ever so slowly. Fixes: 3f353342a6b ("i965: Use I915_EXEC_NO_RELOC") Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Acked-by: Emil Velikov <emil.velikov@collabora.com>
2018-02-01meson: don't install windows headers on non-windows platformsMarc Dietrich1-1/+3
Only dive into the windows subdir if windows platform is selected. Signed-off-by: Marc Dietrich <marvin24@gmx.de> Fixes: 5ef75cb02b2b4db5506b8 "meson: build src/glx/windows" Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
2018-02-01radeonsi: use ac_build_buffer_load_format for image buffer loadsMarek Olšák1-4/+10
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
2018-02-01ac/nir: use ac_build_buffer_load_format for image buffer loadsMarek Olšák1-8/+13
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
2018-02-01ac: add glc parameter to ac_build_buffer_load_formatMarek Olšák5-5/+7
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
2018-02-01radeonsi: load the right number of components for VS inputs and TBOsMarek Olšák4-5/+54
The supported counts are 1, 2, 4. (3=4) The following snippet loads float, vec2, vec3, and vec4: Before: buffer_load_format_x v9, v4, s[0:3], 0 idxen ; E0002000 80000904 buffer_load_format_xyzw v[0:3], v5, s[8:11], 0 idxen ; E00C2000 80020005 s_waitcnt vmcnt(0) ; BF8C0F70 buffer_load_format_xyzw v[2:5], v6, s[12:15], 0 idxen ; E00C2000 80030206 s_waitcnt vmcnt(0) ; BF8C0F70 buffer_load_format_xyzw v[5:8], v7, s[4:7], 0 idxen ; E00C2000 80010507 After: buffer_load_format_x v10, v4, s[0:3], 0 idxen ; E0002000 80000A04 buffer_load_format_xy v[8:9], v5, s[8:11], 0 idxen ; E0042000 80020805 buffer_load_format_xyzw v[0:3], v6, s[12:15], 0 idxen ; E00C2000 80030006 s_waitcnt vmcnt(0) ; BF8C0F70 buffer_load_format_xyzw v[3:6], v7, s[4:7], 0 idxen ; E00C2000 80010307 Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
2018-02-01radeonsi: remove unused si_shader_context membersMarek Olšák2-11/+0
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
2018-02-01glx/apple: locate dispatch table functions to wrap by nameJon Turney3-7/+22
Avoid reaching into the dispatch table internals (and thus having to deal with the complexities of remap etc.) by identifying functions to wrap by name. See: https://lists.freedesktop.org/archives/mesa-dev/2015-June/086721.html et seq. https://bugs.freedesktop.org/show_bug.cgi?id=90311 Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
2018-02-01glx/apple: include util/debug.h for env_var_as_boolean prototypeJon Turney2-0/+2
mesa/src/glx/glxcmds.c:1295:21: error: implicit declaration of function 'env_var_as_boolean' is invalid in C99 [-Werror,-Wimplicit-function-declaration] mesa/src/glx/apple/apple_visual.c:85:28: error: implicit declaration of function 'env_var_as_boolean' is invalid in C99 [-Werror,-Wimplicit-function-declaration] Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
2018-02-01osx: ld doesn't support --build-idJon Turney1-1/+1
Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
2018-02-01mesa: remove usage of alloca in externalobjects.c v4Andres Rodriguez1-12/+48
Don't want an overly large numBufferBarriers/numTextureBarriers to blow up the stack. v2: handle malloc errors v3: fix patch v4: initialize texObjs/bufObjs Suggested-by: Emil Velikov <emil.velikov@collabora.com> Signed-off-by: Andres Rodriguez <andresx7@gmail.com>
2018-02-01radv: do not insert shaders in cache when it's disabledSamuel Pitoiset1-5/+24
When the application doesn't provide its own pipeline cache, the driver uses a in-memory cache but it shouldn't insert any entries when the cache is explicitely disabled by the user. Found while running my experimental pipeline-db tool with a ton of shaders, the memory footprint was just huge, and sometimes the process was even killed... Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>