summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* freedreno/ir3: use nopN encoding when possibleRob Clark2019-02-263-6/+35
| | | | | | | | | | | | | Use the (nopN) encoding for slightly denser shaders.. this lets us fold nop instructions into the previous alu instruction in certain cases. Shouldn't change the # of cycles a shader takes to execute, but reduces the size. (ex: glmark2 refract goes from 168 to 116 instructions) Currently only enabled for a6xx, but I think we could enable this for a5xx and possibly a4xx. Signed-off-by: Rob Clark <[email protected]>
* freedreno/a6xx: fix hangs with large shadersRob Clark2019-02-261-2/+2
| | | | | | | | | | We were overflowing instrlen (which is # of groups of 16 instructions) in a couple dEQP tests, causing gpu hangs: dEQP-GLES31.functional.ubo.random.all_per_block_buffers.13 dEQP-GLES31.functional.ubo.random.all_per_block_buffers.20 Signed-off-by: Rob Clark <[email protected]>
* mesa: fix display list corner case assertionBrian Paul2019-02-261-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes a failed assertion in glDeleteLists() for the following case: list = glGenLists(1); glDeleteLists(list, 1); when those are the first display list commands issued by the application. When we generate display lists, we plug in empty lists created with the make_list() helper. This function uses the OPCODE_END_OF_LIST opcode but does not call dlist_alloc() which would set the InstSize[OPCODE_END_OF_LIST] element to non-zero. When the empty list was deleted, we failed the InstSize[opcode] > 0 assertion. Typically, display lists are created with glNewList/glEndList so we set InstSize[OPCODE_END_OF_LIST] = 1 in dlist_alloc(). That's why this bug wasn't found before. To fix this failure, simply initialize the InstSize[OPCODE_END_OF_LIST] element in make_list(). The game oolite was hitting this. Fixes: https://github.com/OoliteProject/oolite/issues/325 Reviewed-by: Marek Olšák <[email protected]>
* svga: fix dma.pending > 0 testBrian Paul2019-02-261-1/+1
| | | | | | The dma.pending field is boolean, so testing for > 0 isn't right. Reviewed-by: Neha Bhende <[email protected]>
* svga: assorted whitespace and formatting fixesBrian Paul2019-02-267-56/+52
| | | | | | Remove trailing whitespace, etc. Trivial.
* st/mesa: whitespace/formatting fixes in st_cb_texture.cBrian Paul2019-02-261-32/+58
| | | | | | Remove trailing whitespace, replace tabs w/ spaces, etc. Trivial.
* i965: fixed clamping in set_scissor_bits when the y is flippedEleni Maria Stea2019-02-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Calculating the scissor rectangle fields with the y flipped (0 on top) can generate negative values that will cause assertion failure later on as the scissor fields are all unsigned. We must clamp the bbox values again to make sure they don't exceed the fb_height. Also fixed a calculation error. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=108999 https://bugs.freedesktop.org/show_bug.cgi?id=109594 v2: - I initially clamped the values inside the if (Y is flipped) case and I made a mistake in the calculation: the clamp of the bbox[2] should be a check if (bbox[2] >= fbheight) bbox[2] = fbheight - 1 instead and I shouldn't have changed the ScissorRectangleYMax calculation. As the fixed code is equivalent with using CLAMP instead of MAX2 at the top of the function when bbox[2] and bbox[3] are calculated, and the 2nd is more clear, I replaced it. (Nanley Chery) v3: - Reversed the CLAMP change in bbox[3] as the API guarantees that the viewport height is positive. (Nanley Chery) v4: - Added nomination for the mesa-stable branch and the link to the second bugzilla bug (Nanley Chery) CC: <[email protected]> Tested-by: Paul Chelombitko <[email protected]> Reviewed-by: Nanley Chery <[email protected]>
* freedreno/a6xx: Silence compiler warningsEduardo Lima Mitev2019-02-261-2/+4
| | | | | | | util_format_compose_swizzles() expects 'const unsigned char' and we are feeding it 'char'. Reviewed-by: Rob Clark <[email protected]>
* i965: Add support for sampling from XYUV imagesKasireddy, Vivek2019-02-264-0/+11
| | | | | | | | | Add support to the i965 DRI driver to sample from XYUV8888 buffers. Signed-off-by: Vivek Kasireddy <[email protected]> Reviewed-by: Lionel Landwerlin <[email protected]> Reviewed-by: Tapani Pälli <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* dri: Add XYUV8888 formatKasireddy, Vivek2019-02-263-0/+3
| | | | | | | | | | In addition to adding this format to the dri_interface header, add an entry in the android and wayland backends as well. Signed-off-by: Vivek Kasireddy <[email protected]> Reviewed-by: Lionel Landwerlin <[email protected]> Reviewed-by: Tapani Pälli <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* nir/lower_tex: Add support for XYUV loweringKasireddy, Vivek2019-02-262-0/+21
| | | | | | | | | | | The memory layout associated with this format would be: Byte: 0 1 2 3 Component: V U Y X Signed-off-by: Vivek Kasireddy <[email protected]> Reviewed-by: Lionel Landwerlin <[email protected]> Reviewed-by: Tapani Pälli <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* imgui: update memory editorLionel Landwerlin2019-02-262-67/+97
| | | | | Signed-off-by: Lionel Landwerlin <[email protected]> Acked-by: Tapani Pälli <[email protected]>
* imgui: update commitLionel Landwerlin2019-02-261-2/+5
| | | | | | | | In commit 3950e7c11efc86 ("imgui: bump copy") I forgot to update the README about what copy of imgui we carry. Signed-off-by: Lionel Landwerlin <[email protected]> Acked-by: Tapani Pälli <[email protected]>
* driinfo: add DTD to allow the xml to be validatedEric Engestrom2019-02-261-0/+16
| | | | | | | | | This DTD can be used to validate the output and make sure any parsers out there can handle it: $ xmllint --noout --valid driinfo.xml Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* vulkan/overlay: fix includesLionel Landwerlin2019-02-263-8/+8
| | | | | | | | | | | | | | | | | | The Loader/Validation-Layers repository allow the user to choose where header files are installed. On my system I choose /usr/include thinking it was the obvious "base" location, but it turns out the headers end up being installed right there rather in a vulkan subdirectory. On Debian/Ubuntu the selected installation path is /usr/include/vulkan, so just go with that. Hopefully other distro don't choose another path. Note that the validation layer doesn't provide a .pc file so we have no way of querying where the headers are installed. Signed-off-by: Lionel Landwerlin <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=109739 Acked-by: Eric Engestrom <[email protected]>
* vulkan/overlay: fix missing installation of layerLionel Landwerlin2019-02-261-0/+1
| | | | | | Signed-off-by: Lionel Landwerlin <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=109739 Reviewed-by: Eric Engestrom <[email protected]>
* egl/android: bump the number of drmDevices to 64Emil Velikov2019-02-261-1/+1
| | | | | | | It's the current maximum supported by the kernel. Stay consistent with the rest of Mesa and use the same number. Signed-off-by: Emil Velikov <[email protected]>
* loader: use loader_open_device() to handle O_CLOEXECEmil Velikov2019-02-261-1/+1
| | | | | | | | Some platforms lack O_CLOEXEC. The loader_open_device() handles those appropriately, so use the helper. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* meson: egl: correctly manage loader/xmlconfigEmil Velikov2019-02-261-6/+5
| | | | | | | | | | | | | | | | | | | | | | | Earlier commit introduced support for haiku yet did not properly annotate the loader/xmlconfig dependencies. Thus we ended up adding inc_loader for each !haiku platform - see 659910eda01 9a96bf0ecd0 c731508b988 ec6cb01e216. One piece remained though - the wayland platform. Hence the following would fail: meson -Dgallium-drivers=etnaviv -Ddri-drivers=''\ -Dtools=etnaviv -Dplatforms=wayland -Dglx=disabled \ build/ Cc: Alexander von Gluck IV <[email protected]> Reported-by: Boris Brezillon <[email protected]> Fixes: 834d221512f ("meson: Add Haiku platform support v4") Signed-off-by: Emil Velikov <[email protected]> Tested-by: Boris Brezillon <[email protected]> Reviewed-by: Eric Engestrom <[email protected]> Reviewed-by: Dylan Baker <[email protected]>
* egl/dri: de-duplicate dri2_load_driver*Emil Velikov2019-02-261-34/+11
| | | | | | | | | The difference between the three functions is the list of mandatory driver extensions. Pass that as an argument to the common helper. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Frank Binns <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* radv: don't copy buffer descriptors list for samplersSamuel Pitoiset2019-02-261-1/+5
| | | | | | | | | | | Sampler descriptors don't have a buffer list. This fixes some crashes with new CTS dEQP-VK.binding_model.descriptor_copy.*.sampler_*. Cc: 18.3 19.0 <[email protected]> Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv: fix out-of-bounds access when copying descriptors BO listSamuel Pitoiset2019-02-261-2/+0
| | | | | | | | | | | We shouldn't increment the buffer list pointers twice. This fixes some crashes with new CTS dEQP-VK.binding_model.descriptor_copy.*. Cc: 18.3 19.0 <[email protected]> Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* nir: use nir_variable_create instead of open-coding the logicTapani Pälli2019-02-261-6/+4
| | | | | | | Fixes: 3d7611e9 "st/nir: use NIR for asm programs" Reported-by: Matthias Lorenz <[email protected]> Signed-off-by: Tapani Pälli <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* nir: initialize value in copy_prop_vars_blockTapani Pälli2019-02-261-1/+1
| | | | | | | | | | | | | Fixes following valgrind warning: ==27561== Conditional jump or move depends on uninitialised value(s) ==27561== at 0x667856B: value_set_ssa_components (nir_opt_copy_prop_vars.c:78) ==27561== by 0x667A1C4: copy_prop_vars_block (nir_opt_copy_prop_vars.c:797) Fixes: 62332d139c8 "nir: Add a local variable-based copy propagation pass" Signed-off-by: Tapani Pälli <[email protected]> Reviewed-by: Lionel Landwerlin <[email protected]> Reviewed-by: Caio Marcelo de Oliveira Filho <[email protected]>
* v3d: Rematerialize MOVs of uniforms instead of spilling them.Eric Anholt2019-02-252-27/+68
| | | | | | | | | | | | | | | | | | | | | | | | | If we have a MOV of a uniform value available to spill, that's one of our best choices. We can just not spill the value, and emit a new load of the uniform as the fill. This saves bothering the TMU and the thrsw, and is the same cost in uniforms (since the spill offset is a uniform anyway). This doesn't have a huge impact on shader-db, since there aren't a whole lot of spills and we usually copy-prop the uniforms at the VIR level such that the only uniform MOVs are from vir_lower_uniforms: total instructions in shared programs: 6430292 -> 6430279 (<.01%) total uniforms in shared programs: 2386023 -> 2385787 (<.01%) total spills in shared programs: 4961 -> 4960 (-0.02%) total fills in shared programs: 6352 -> 6350 (-0.03%) However, I'm interested in dropping the uniforms copy-prop in the backend, since it would be cheaper to not load repeated uniforms if we have the registers to spare. This also saves many spills on dEQP-GLES31.functional.ubo.random.all_per_block_buffers.20, which is what motivated a bunch of my recent backend work in the first place: before: 46 spills, 106 fills, 3062 instructions after: 0 spills, 0 fills, 2611 instructions
* v3d: Dump the VIR after register spilling if we were forced to.Eric Anholt2019-02-251-0/+10
| | | | | Spilling is unusual, but one often has to debug it when it happens, so dump it.
* v3d: Fix vir_is_raw_mov() for input unpacks.Eric Anholt2019-02-251-0/+7
| | | | | There are no users at the moment, but I wanted to start using this in register spilling.
* st/mesa: Reduce array updates due to current changes.Mathias Fröhlich2019-02-262-1/+10
| | | | | | | | | | | | Since using bitmasks we can easily check if we have any current value that is potentially uploaded on array setup. So check for any potential vertex program input that is not already a vao enabled array. Only flag array update if there is a potential overlap. Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Brian Paul <[email protected]> Signed-off-by: Mathias Fröhlich <[email protected]>
* meson/iris: Use current coding styleDylan Baker2019-02-251-7/+10
| | | | | | Just a few minor style things. Reviewed-by: Jordan Justen <[email protected]>
* radeonsi: fix query buffer allocationTimothy Arceri2019-02-262-25/+32
| | | | | | | | | | | | Fix the logic for buffer full check on alloc. This patch just takes the fix Nicolai attached to the bug report and updates it to work on master. Fixes: e0f0d3675d4 ("radeonsi: factor si_query_buffer logic out of si_query_hw") Reviewed-by: Marek Olšák <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=109561
* nir: Just return when asked to rewrite uses of an SSA def to itself.Eric Anholt2019-02-251-1/+2
| | | | | | | | | | The nir_builder swizzling improvement to not emit extra MOVs resulted in nir_lower_tex() trying to rewrite an SSA def to itself, triggering the assert on all texturing in v3d. There's no work to be done in this case, so just stop asserting. Fixes: 743700be1f58 ("nir/builder: Don't emit no-op swizzles") Reviewed-by: Jason Ekstrand <[email protected]>
* radv: fix clearing attachments in secondary command buffersSamuel Pitoiset2019-02-251-10/+43
| | | | | | | | | | | If no framebuffer is bound, get the number of samples and the image format from the render pass. This fixes new CTS dEQP-VK.geometry.layered.*.secondary_cmd_buffer. Cc: 18.3 19.0 <[email protected]> Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* swr/rast: Fix autotools and scons codegenAlok Hota2019-02-252-20/+12
| | | | | | Use new input flags for gen_archrast.py Reviewed-by: Bruce Cherniak <[email protected]>
* swr/rast: Add general SWTag statisticsAlok Hota2019-02-253-161/+191
| | | | | | Update Archrast parser to use stats, used with an internal tool Reviewed-by: Bruce Cherniak <[email protected]>
* swr/rast: Add string handling to AR event frameworkAlok Hota2019-02-255-31/+54
| | | | | | For use by an internal tool Reviewed-by: Bruce Cherniak <[email protected]>
* swr/rast: Add initial SWTag proto definitionsAlok Hota2019-02-252-39/+71
| | | | | | Update gen_archrast.py to properly generate event IDs Reviewed-by: Bruce Cherniak <[email protected]>
* swr/rast: Cleanup and generalize gen_archrastAlok Hota2019-02-252-81/+41
| | | | | | Update meson.build to accomodate Reviewed-by: Bruce Cherniak <[email protected]>
* nir: Use SM5 properties to optimize shift(a@32, iand(31, b))Daniel Schürmann2019-02-251-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a common pattern from HLSL->SPIRV translation and supported in HW by all current NIR backends. vkpipeline-db results anv (SKL): total instructions in shared programs: 6403130 -> 6402380 (-0.01%) instructions in affected programs: 204084 -> 203334 (-0.37%) helped: 208 HURT: 0 total cycles in shared programs: 1915629582 -> 1918198408 (0.13%) cycles in affected programs: 1158892682 -> 1161461508 (0.22%) helped: 107 HURT: 86 shader-db results on i965 (KBL): total instructions in shared programs: 15284592 -> 15284568 (<.01%) instructions in affected programs: 81683 -> 81659 (-0.03%) helped: 24 HURT: 0 total cycles in shared programs: 375013622 -> 375013932 (<.01%) cycles in affected programs: 40169618 -> 40169928 (<.01%) helped: 13 HURT: 9 Reviewed-by: Jason Ekstrand <[email protected]>
* nir: Define shifts according to SM5 specification.Daniel Schürmann2019-02-251-4/+6
| | | | | | | SPIR-V shifts are undefined for values >= bitsize, but SM5 shifts are defined to only use the least significant bits. Reviewed-by: Jason Ekstrand <[email protected]>
* intel/eu: Add an EOT parameter to send_indirect_[split]_messageJason Ekstrand2019-02-254-19/+29
| | | | | | | For split indirect sends we have to put the EOT parameter in the extended descriptor as well as the instruction itself so just calling brw_inst_set_eot is insufficient. Moving the EOT handling handling into the send_indirect_[split]_message helper lets us handle it properly.
* d3d: meson: do not prefix user provided d3d-drivers-pathSergii Romantsov2019-02-251-1/+1
| | | | | | | | | | | | | | | | | The user can select the location where there d3d drivers are installed by the d3d-drivers-path meson option. By default path will be $prefix/$libdir/d3d. Currently we add $prefix to the user provided path. Resulting in an incorrect or even missing path. Based on logic of Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=109698 CC: Kenneth Graunke <[email protected]> CC: Emil Velikov <[email protected]> Signed-off-by: Sergii Romantsov <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* dri: meson: do not prefix user provided dri-drivers-pathSergii Romantsov2019-02-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | The user can select the location where there dri drivers are installed by the dri-drivers-path meson option. By default path will be $prefix/$libdir/dri. Currently we add $prefix to the user provided path. Resulting in an incorrect or even missing path. v2: fixed dri_search_path by default, rebased to master v3: new commit-message (Emil Velikov), cc mesa-stable Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=109698 CC: Rafael Antognolli <[email protected]> CC: Dylan Baker <[email protected]> Cc: 18.3 19.0 <[email protected]> Fixes: 306914db92e1 (meson: Add dridriverdir variable to dri.pc.) Signed-off-by: Sergii Romantsov <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* intel/aub_viewer: silence more compiler warningsLionel Landwerlin2019-02-251-2/+2
| | | | | | | format not a string literal and no format arguments. Signed-off-by: Lionel Landwerlin <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* intel/aub_viewer: silence compiler warningLionel Landwerlin2019-02-251-1/+1
| | | | | | | buffer_addr may be used uninitialized. Signed-off-by: Lionel Landwerlin <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* intel/aub_viewer: printout 48bits addressesLionel Landwerlin2019-02-251-14/+14
| | | | | Signed-off-by: Lionel Landwerlin <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* mesa/core: Enable EXT_depth_clamp for GLES >= 2.0Gert Wollny2019-02-252-4/+5
| | | | | | | | | | | | | | | | The extension NV_depth_clamp is written against OpenGL 1.2.1, and since GLES 2.0 is based on GL 2.0 there is no reason not to enable this extension also for GLES >= 2.0. v2: Use EXT_depth_clamp that has been proposed to Khronos v3: - Fix check for extension availability (Erik Faya-Lund) - Also fix the test in is_enabled v4: - Test both, ARB and EXT extension (Erik) v5: - Fix white space errors (Erik) Signed-off-by: Gert Wollny <[email protected]> Reviewed-by: Erik Faye-Lund <[email protected]>
* iris: Properly allow rendering to RGBX formats.Kenneth Graunke2019-02-251-2/+9
| | | | | | | | | | | | I was converting them at pipe_surface creation time, but not when answering queries about whether formats support rendering. This caused a lot of FBO incomplete errors for formats that ought to be supported. Fixes "Child of Light", which uses PIPE_FORMAT_R8G8B8X8_UNORM_SRGB. Also fixes Witcher 1 using wined3d (GL) according to Timur Kristóf. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=109738
* iris: Drop RGBX -> RGBA for storage image usagesKenneth Graunke2019-02-251-6/+3
| | | | GLSL doesn't expose RGB/RGBX image formats, so this isn't needed.
* mesa: Fix RGBBuffers for renderbuffers with sized internal formatsKenneth Graunke2019-02-251-1/+4
| | | | | | | | | | | | | | | For texture attachments, 'f' is texImg->_BaseFormat, but for renderbuffer attachments, 'f' is att->Renderbuffer->InternalFormat. InternalFormat may be something like GL_RGB8, which causes our (f == GL_RGB) check to fail. Switch to using a proper _BaseFormat, which drops the size. Fixes dEQP-GLES31.functional.draw_buffers_indexed.random. max_required_draw_buffers.15 on iris when combined with a driver fix. Reviewed-by: Tapani Pälli <[email protected]> Reviewed-by: Timur Kristóf <[email protected]>
* glsl: Fix function return typecheckingOscar Blumberg2019-02-251-1/+2
| | | | | | | | apply_implicit_conversion only converts and check base types but we need actual type equality for function returns, otherwise you can return a vec2 from a function declared as returning a float. Reviewed-by: Tapani Pälli <[email protected]>