summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* intel/nir: Use the correct scalar stage for consumers when linkingJason Ekstrand2018-08-011-1/+1
| | | | | Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* nir/meson: fix c vs cpp args for nir testDylan Baker2018-08-011-1/+1
| | | | | | | Fixes: d1992255bb29054fa51763376d125183a9f602f3 ("meson: Add build Intel "anv" vulkan driver") Signed-off-by: Dylan Baker <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* gallium: fix ddebug on windowsDylan Baker2018-08-011-1/+5
| | | | | | | | | By including the proper headers for getpid and for mkdir. Fixes: 6ff0c6f4ebcb87ea6c6fe5a4ba90b548f666067d ("gallium: move ddebug, noop, rbug, trace to auxiliary to improve build times") Signed-off-by: Dylan Baker <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* util: move process.[ch] to u_process.[ch]Dylan Baker2018-08-017-8/+8
| | | | | | | | | | | | | On windows process.h is a system provided header, and it's required in include/c11/threads_win32.h. This header interferes with searching for that header, and results in windows build warnings with scons, but errors in meson which doesn't allow implicit function declarations. Just rename process to u_process, which follows the style of utils anyway. Fixes: 2e1e6511f76370870b5cde10caa9ca3b6d0dc65f ("util: extract get_process_name from xmlconfig.c") Signed-off-by: Dylan Baker <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* ac,radeonsi: reduce optimizations for complex compute shaders on older APUs (v2)Marek Olšák2018-08-016-13/+68
| | | | | | | | To make dEQP-GLES31.functional.ssbo.layout.random.all_shared_buffer.23 finish sooner on the older CPUs. (otherwise it gets killed and we fail the test) Acked-by: Dave Airlie <[email protected]>
* v3d: Actually put the "%s" in the snprintf.Eric Anholt2018-08-011-1/+1
| | | | | | | | I missed an important part when porting the change over, fixing my compiler warning but breaking -Werror=format-security. Fixes: e6ff5ac4468e ("v3d: use snprintf(..., "%s", ...) instead of strncpy") Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=107443
* vc4: Fix automake linking error.Juan A. Suarez Romero2018-08-011-0/+9
| | | | | | | | | | | | | | | CXXLD gallium_dri.la ../../../../src/gallium/drivers/vc4/.libs/libvc4.a(vc4_cl_dump.o): In function `vc4_dump_cl': src/gallium/drivers/vc4/vc4_cl_dump.c:45: undefined reference to `clif_dump_init' src/gallium/drivers/vc4/vc4_cl_dump.c:82: undefined reference to `clif_dump_destroy' ../../../../src/broadcom/cle/.libs/libbroadcom_cle.a(cle_libbroadcom_cle_la-v3d_decoder.o): In function `v3d_field_iterator_next': src/broadcom/cle/v3d_decoder.c:902: undefined reference to `clif_lookup_bo' Fixes: e92959c4e0 ("v3d: Pass the whole clif_dump structure to v3d_print_group().") Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=107423 CC: Eric Anholt <[email protected]> Acked-by: Eric Anholt <[email protected]> Reviewed-by: Andres Gomez <[email protected]>
* intel: tools: aubwrite: split gen[89] from gen10+Lionel Landwerlin2018-08-015-186/+416
| | | | | | | | | | | Gen10+ has an additional bit in MI_BATCH_BUFFER_END to signal the end of the context image. We select the largest size for the context image regardless of the generation. Signed-off-by: Lionel Landwerlin <[email protected]> Reviewed-by: Rafael Antognolli <[email protected]>
* python: Use the unicode_escape codecMathieu Bridon2018-08-012-2/+2
| | | | | | | | | | | | Python 2 had string_escape and unicode_escape codecs. Python 3 only has the latter. These work the same as far as we're concerned, so let's use the future-proof one. However, the reste of the code expects unicode strings, so we need to decode them again. Signed-off-by: Mathieu Bridon <[email protected]> Reviewed-by: Dylan Baker <[email protected]>
* python: Explicitly add the 'L' suffix on Python 3Mathieu Bridon2018-08-011-1/+10
| | | | | | | | | | | | | | | Python 2 had two integer types: int and long. Python 3 dropped the latter, as it made the int type automatically support bigger numbers. As a result, Python 3 lost the 'L' suffix on integer litterals. This probably doesn't make much difference when compiling the generated C code, but adding it explicitly means that both Python 2 and 3 generate the exact same C code anyway, which makes it easier to compare and check for discrepencies when moving to Python 3. Signed-off-by: Mathieu Bridon <[email protected]> Reviewed-by: Dylan Baker <[email protected]>
* python: Explicitly use byte stringsMathieu Bridon2018-08-011-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | In both Python 2 and 3, zlib.Compress.compress() takes a byte string, and returns a byte string as well. In Python 2, the script was working because: 1. string literalls were byte strings; 2. opening a file in unicode mode, reading from it, then passing the unicode string to compress() would automatically encode to a byte string; On Python 3, the above two points are not valid any more, so: 1. zlib.Compress.compress() refuses the passed unicode string; 2. compressed_data, defined as an empty unicode string literal, can't be concatenated with the byte string returned by compress(); This commit fixes this by explicitly using byte strings where appropriate, so that the script works on both Python 2 and 3. Signed-off-by: Mathieu Bridon <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* python: Use open(), not file()Mathieu Bridon2018-08-011-1/+3
| | | | | | | | | | | | The latter is a constructor for file objects, but when actually opening a file, using the former is more idiomatic. In addition, file() is not a builtin any more in Python 3, so this makes the script compatible with both Python 2 and Python 3. Signed-off-by: Mathieu Bridon <[email protected]> Reviewed-by: Eric Engestrom <[email protected]> Reviewed-by: Dylan Baker <[email protected]>
* python: Open file in binary modeMathieu Bridon2018-08-011-1/+1
| | | | | | | | | | | | | | | | | | The XML parser wants byte strings, not unicode strings. In both Python 2 and 3, opening a file without specifying the mode will open it for reading in text mode ('r'). On Python 2, the read() method of the file object will return byte strings, while on Python 3 it will return unicode strings. Explicitly specifying the binary mode ('rb') makes the behaviour identical in both Python 2 and 3, returning what the XML parser expects. Signed-off-by: Mathieu Bridon <[email protected]> Reviewed-by: Eric Engestrom <[email protected]> Reviewed-by: Dylan Baker <[email protected]>
* python: Don't abuse hex()Mathieu Bridon2018-08-011-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | The hex() builtin returns a string containing the hexa-decimal representation of an integer. When the argument is not an integer, then the function calls that object's __hex__() method, if one is defined. That method is supposed to return a string. While that's not explicitly documented, that string is supposed to be a valid hexa-decimal representation for a number. Python 2 doesn't enforce this though, which is why we got away with returning things like 'NIR_TRUE' which are not numbers. In Python 3, the hex() builtin instead calls an object's __index__() method, which itself must return an integer. That integer is then automatically converted to a string with its hexa-decimal representation by the rest of the hex() function. As a result, we really can't make this compatible with Python 3 as it is. The solution is to stop using the hex() builtin, and instead use a hex() object method, which can return whatever we want, in Python 2 and 3. Signed-off-by: Mathieu Bridon <[email protected]> Reviewed-by: Eric Engestrom <[email protected]> Reviewed-by: Dylan Baker <[email protected]>
* python: Better get character ordinalsMathieu Bridon2018-08-011-2/+2
| | | | | | | | | | | | | | | | | In Python 2, iterating over a byte-string yields single-byte strings, and we can pass them to ord() to get the corresponding integer. In Python 3, iterating over a byte-string directly yields those integers. Transforming the byte string into a bytearray gives us a list of the integers corresponding to each byte in the string, removing the need to call ord(). This makes the script compatible with both Python 2 and 3. Signed-off-by: Mathieu Bridon <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* loader_dri3: Handle mismatched depth 30 formats for Prime renderoffload.Mario Kleiner2018-08-012-1/+83
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Detect if the display (X-Server) gpu and Prime renderoffload gpu prefer different channel ordering for color depth 30 formats ([X/A]BGR2101010 vs. [X/A]RGB2101010) and perform format conversion during the blitImage() detiling op from tiled backbuffer -> linear buffer. For this we need to find the visual (= red channel mask) for the X-Drawable used to display on the server gpu. We use the same proven logic for finding that visual as in commit "egl/x11: Handle both depth 30 formats for eglCreateImage()". This is mostly to allow "NVidia Optimus" at depth 30, as Intel/AMD gpu's prefer xRGB2101010 ordering, whereas NVidia gpu's prefer xBGR2101010 ordering, so we can offload to nouveau without getting funky colors. Tested on Intel single gpu, NVidia single gpu, Intel + NVidia prime offload with DRI3/Present. Note: An unintended but pleasant surprise of this patch is that it also seems to make the modesetting-ddx of server 1.20.0 work at depth 30 on nouveau, at least with unredirected "classic" X rendering, and with redirected desktop compositing under XRender accel, and with OpenGL compositing under GLX. Only X11 compositing via OpenGL + EGL still gives funky colors. modesetting-ddx + glamor are not yet ready to deal with nouveau's ABGR2101010 format, and treat it as ARGB2101010, also exposing X-visuals with ARGB2101010 style channel masks. Seems somehow this triggers the logic in this patch on modesetting-ddx + depth 30 + DRI3 buffer sharing and does the "wrong" channel swizzling that then cancels out the "wrong" swizzling of glamor and we end up with the proper pixel formatting in the scanout buffer :). This so far tested on a NVA5 Tesla card under KDE5 Plasma as shipping with Ubuntu 16.04.4 LTS. Signed-off-by: Mario Kleiner <[email protected]> Cc: Ilia Mirkin <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* egl/x11: Handle both depth 30 formats for eglCreateImage(). (v4)Mario Kleiner2018-08-014-9/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We need to distinguish if the backing storage of a pixmap is XRGB2101010 or XBGR2101010, as different gpu hw supports different formats. NVidia hw prefers XBGR, whereas AMD and Intel are happy with XRGB. Use the red channel mask of the first depth 30 visual of the x-screen to distinguish which hw format to choose. This fixes desktop composition of color depth 30 windows when the X11 compositor uses EGL. v2: Switch from using the visual of the root window to simply using the first depth 30 visual for the x-screen, as testing shows that each driver only exports either xrgb ordering or xbgr ordering for the channel masks of its depth 30 visuals, so this should be unambiguous and avoid trouble if X ever supports depth 30 pixmaps on screens with a non-depth 30 root window visual. This per Michels suggestion. v3: No change to v2, but spent some time testing this more on AMD hw, with my software hacked up to intentionally choose pixel formats/visual with the non-preferred xBGR2101010 ordering on the ati-ddx, also with a standard non-OpenGL X-Window with depth 30 visual, to make sure that things show up properly with the right colors on the screen when going through EGL+OpenGL based compositing on KDE-5. Iow. to confirm that my explanation to the v2 patch on the mailing list of why it should work and the actual practice agree (or possibly that i am good at fooling myself during testing ;). v4: Drop the local `red_mask` and just `return visual->red_mask`/ `return 0`, as suggested by Eric Engestrom. Rebased onto current master, to take the cleanup via the new function dri2_format_for_depth() into account. Signed-off-by: Mario Kleiner <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* gbm: Add support for 10bpp BGR formatsDaniel Stone2018-08-011-0/+8
| | | | | | | | | | Add support for XBGR2101010 and ABGR2101010 formats. Signed-off-by: Daniel Stone <[email protected]> Reviewed-by: Mario Kleiner <[email protected]> Tested-by: Mario Kleiner <[email protected]> Tested-by: Ilia Mirkin <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* egl/wayland: Add 10bpc BGR configsDaniel Stone2018-08-011-0/+12
| | | | | | | | | | Add support for XBGR2101010 and ABGR2101010. Signed-off-by: Daniel Stone <[email protected]> Reviewed-by: Eric Engestrom <[email protected]> Reviewed-by: Mario Kleiner <[email protected]> Tested-by: Mario Kleiner <[email protected]> Tested-by: Ilia Mirkin <[email protected]>
* intel/compiler: implement 8-bit constant loadIago Toral Quiroga2018-08-011-0/+5
| | | | | | Fixes VK-GL-CTS CL#2567 Reviewed-by: Jason Ekstrand <[email protected]>
* intel/compiler: add setup_imm_(u)b helpersIago Toral Quiroga2018-08-012-0/+22
| | | | | | | | The hardware doesn't support byte immediates, so similar to setup_imm_df() for doubles, these helpers work by loading the constant value into a VGRF. Reviewed-by: Jason Ekstrand <[email protected]>
* glsl: fix function inlining with opaque parametersRhys Perry2018-08-011-8/+44
| | | | | | Signed-off-by: Rhys Perry <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Signed-off-by: Marek Olšák <[email protected]>
* glsl, glsl_to_tgsi: fix sampler/image constantsRhys Perry2018-08-012-5/+41
| | | | | Signed-off-by: Rhys Perry <[email protected]> Signed-off-by: Marek Olšák <[email protected]>
* glsl: allow ?: operator with images and samplers when bindless is enabledRhys Perry2018-08-011-3/+5
| | | | | Signed-off-by: Rhys Perry <[email protected]> Signed-off-by: Marek Olšák <[email protected]>
* glsl_to_tgsi: allow bound samplers and images to be used as l-valuesRhys Perry2018-08-012-1/+55
| | | | | Signed-off-by: Rhys Perry <[email protected]> Signed-off-by: Marek Olšák <[email protected]>
* gallium: add new SAMP2HND and IMG2HND opcodesRhys Perry2018-08-015-2/+34
| | | | | | | | This commit does not add support for the opcodes in gallivm or tgsi_to_nir.c Signed-off-by: Rhys Perry <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Signed-off-by: Marek Olšák <[email protected]>
* virgl: enable FBFETCH if virglrenderer supports itErik Faye-Lund2018-08-012-1/+3
| | | | | | | | | | | | | | | | | This fixes the following dEQP-GLES31 cases from NotSupported to Pass for me: - dEQP-GLES31.functional.blend_equation_advanced.state_query.* - dEQP-GLES31.functional.blend_equation_advanced.basic.* - dEQP-GLES31.functional.blend_equation_advanced.srgb.* - dEQP-GLES31.functional.blend_equation_advanced.msaa.* - dEQP-GLES31.functional.blend_equation_advanced.barrier.* - dEQP-GLES31.functional.draw_buffers_indexed.overwrite_*advanced_blend_eq* - dEQP-GLES31.functional.state_query.indexed.blend_equation_advanced_* - dEQP-GLES31.functional.debug.negative_coverage.*.advanced_blend.* Signed-off-by: Erik Faye-Lund <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* virgl: add texture_barrier stubErik Faye-Lund2018-08-011-0/+7
| | | | | | | | | | | | | | | | In gallium, supporting FBFETCH means supporting non-coherent fetches, but in virglrenderer, due to technical reasons this is backed by coherent fetches instead. This means we don't need to do anything for the barriers. However, if we don't have a texture_barrier implementation, we get crashes because the non-coherent extensions is exposed. So, let's leave this as a NOP for now. [airlied: I've got a more complete impl of this somewhere, once we land the host side]. Reviewed-by: Dave Airlie <[email protected]> Signed-off-by: Erik Faye-Lund <[email protected]>
* virgl: enable robustness if the host exposes itDave Airlie2018-08-012-1/+3
| | | | Reviewed-by: Gurchetan Singh <[email protected]>
* virgl: Support ARB_framebuffer_no_attachmentsDave Airlie2018-08-014-1/+23
| | | | | | This uses new protocol to send the default sizes to the host. Reviewed-by: Gurchetan Singh <[email protected]>
* virgl: add initial ARB_compute_shader supportDave Airlie2018-08-017-7/+153
| | | | | | This hooks up compute shader creation and launch grid support. Reviewed-by: Gurchetan Singh <[email protected]>
* util: don't use __builtin_clz unconditionallyMarek Olšák2018-07-311-1/+11
| | | | | | This fixes the build if __builtin_clz is unsupported. Reviewed-by: Roland Scheidegger <[email protected]>
* ac/surface: fix MSAA corruption on Vega due to FMASK tile swizzleMarek Olšák2018-07-311-1/+1
| | | | | | | a needle in the haystack? Cc: 18.1 <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* v3d: use snprintf(..., "%s", ...) instead of strncpyEric Anholt2018-07-311-1/+1
| | | | | Fixes a compiler warning about terminator NUL, based on f836d799f906 ("intel/decoder: use snprintf(..., "%s", ...) instead of strncpy")
* v3d: Add support for the TMUWT instruction.Eric Anholt2018-07-315-3/+22
| | | | | | This instruction is used to ensure that TMU stores have been processed before moving on. In particular, you need any TMU ops to be done by the time the shader ends.
* radeonsi: report supported EQAA combinations from is_format_supportedMarek Olšák2018-07-311-16/+20
| | | | | | Framebuffer without attachments now supports 16 samples. Tested-by: Dieter Nützel <[email protected]>
* radeonsi: use storage_samples instead of color_samples in most placesMarek Olšák2018-07-3111-52/+34
| | | | | | | and use pipe_resource::nr_storage_samples instead of r600_texture::num_color_samples. Tested-by: Dieter Nützel <[email protected]>
* gallium: add storage_sample_count parameter into is_format_supportedMarek Olšák2018-07-3180-117/+244
| | | | Tested-by: Dieter Nützel <[email protected]>
* gallium: add pipe_resource::nr_storage_samples, and set it same as nr_samplesMarek Olšák2018-07-3130-27/+65
| | | | Tested-by: Dieter Nützel <[email protected]>
* gallium: add PIPE_CAP_FRAMEBUFFER_MSAA_CONSTRAINTSMarek Olšák2018-07-3118-0/+29
| | | | Tested-by: Dieter Nützel <[email protected]>
* st/mesa: implement ASTC 2D LDR fallback for all driversMarek Olšák2018-07-315-2/+80
| | | | | | | Tested-by: Mike Lothian <[email protected]> Tested-By: Gert Wollny<[email protected]> Tested-by: Dieter Nützel <[email protected]> Reviewed-By: Gert Wollny <[email protected]>
* st/mesa: add ETC2 & ASTC fast path for GetTex(Sub)ImageMarek Olšák2018-07-311-0/+41
| | | | | | | | | Not sure if GL/GLES can hit this path, but it's just decompression. Tested-by: Mike Lothian <[email protected]> Tested-By: Gert Wollny<[email protected]> Tested-by: Dieter Nützel <[email protected]> Reviewed-By: Gert Wollny <[email protected]>
* st/mesa: generalize fallback_copy_image for compressed texturesMarek Olšák2018-07-311-6/+11
| | | | | | | | | in order to support ASTC Tested-by: Mike Lothian <[email protected]> Tested-By: Gert Wollny<[email protected]> Tested-by: Dieter Nützel <[email protected]> Reviewed-By: Gert Wollny <[email protected]>
* st/mesa: generalize code for the compressed texture map/unmap fallbackMarek Olšák2018-07-312-23/+31
| | | | | | | | | in order to support ASTC Tested-by: Mike Lothian <[email protected]> Tested-By: Gert Wollny<[email protected]> Tested-by: Dieter Nützel <[email protected]> Reviewed-By: Gert Wollny <[email protected]>
* st/mesa: use st_compressed_format_fallback moreMarek Olšák2018-07-311-12/+4
| | | | | | | Tested-by: Mike Lothian <[email protected]> Tested-By: Gert Wollny<[email protected]> Tested-by: Dieter Nützel <[email protected]> Reviewed-By: Gert Wollny <[email protected]>
* st/mesa: generalize st_etc_fallback -> st_compressed_format_fallbackMarek Olšák2018-07-313-13/+17
| | | | | | | | | for ASTC support later Tested-by: Mike Lothian <[email protected]> Tested-By: Gert Wollny<[email protected]> Tested-by: Dieter Nützel <[email protected]> Reviewed-By: Gert Wollny <[email protected]>
* mesa: add ASTC 2D LDR decoderMarek Olšák2018-07-318-0/+2031
| | | | | | Tested-by: Mike Lothian <[email protected]> Tested-By: Gert Wollny <[email protected]> Tested-by: Dieter Nützel <[email protected]>
* virgl: also mark sampler views as dirtyGurchetan Singh2018-08-011-1/+2
| | | | | | | | | | | | | | | | When texture buffers are used as images in compute shaders, the guest never sees the modified data since the TBO is always marked as clean. Fixes most dEQP-GLES31.functional.image_load_store.buffer.* tests. Example test cases: dEQP-GLES31.functional.image_load_store.buffer.load_store.r32ui dEQP-GLES31.functional.image_load_store.buffer.qualifiers.coherent_r32f dEQP-GLES31.functional.image_load_store.buffer.format_reinterpret.rgba8_rgba8ui Note: virglrenderer side patch also needed to bind TBOs correctly Reviewed-by: Dave Airlie <[email protected]>
* virgl: add memory barrier supportDave Airlie2018-08-015-0/+29
| | | | Reviwed-by: Gert Wollny <[email protected]>
* virgl: add TXQS supportDave Airlie2018-08-012-1/+3
| | | | Reviwed-by: Gert Wollny <[email protected]>