summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* st/mesa: inline _mesa_create_context() into its only callerEmil Velikov2016-06-133-46/+6
| | | | | | | | Inline the function into it's only caller. This way it's more obvious how the classic and gallium drivers (st/mesa) use _mesa_initialize_context. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* st/mesa: remove unneeded break from st_api_create_context()Emil Velikov2016-06-131-1/+0
| | | | | | | | We have return on the previous line, thus the break will never be reached. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* st/mesa: use c99 initializer for st_gl_apiEmil Velikov2016-06-131-13/+13
| | | | | Signed-off-by: Emil Velikov <[email protected]> Acked-by: Ian Romanick <[email protected]>
* gallium: remove st_api::get_proc_address hookEmil Velikov2016-06-132-19/+0
| | | | | | | It has been unused for a long time, plus makes the gallium dri modules require an extra glapi symbol relative to their classic counterparts. Signed-off-by: Emil Velikov <[email protected]>
* mesa: remove _mesa_init_get_hash()Emil Velikov2016-06-133-70/+0
| | | | | | | | | | | | | | The actual code of the function print_table_stats() is guarded by a ifdef GET_DEBUG, which was not been defined in years. The last fix in 2013 (7db6b5aa91a) indicates that it's rarely used/tested. Since the issue has gone unnoticed for a whole year (broken with 2ad4a475474). Let's remove it for now. We can always revive it at a later stage. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* mesa: kill off _mesa_do_init_remap_table()Emil Velikov2016-06-131-18/+7
| | | | | | | ... and inline its contents in _mesa_init_remap_table(). Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* mesa: use native types when possibleEmil Velikov2016-06-131-5/+6
| | | | | | | | All of the functions and related data is internal, so there's no point if using the GL types. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* mesa: make _mesa_map_function_spec() staticEmil Velikov2016-06-132-6/+3
| | | | | | | Used only locally. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* mesa: remove used _mesa_get_function_spec() and gl_function_remapEmil Velikov2016-06-132-27/+0
| | | | | | | Final user was killed with last commit. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* mesa: remove unused _mesa_map_function_array()Emil Velikov2016-06-132-47/+0
| | | | | | | | Unused as of commit 5a175127f38 ("dri: Remove all extension enabling utility functions") and the patch before the previous patch. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* glapi: remap_helper.py: remove MESA_alt_functionsEmil Velikov2016-06-131-42/+0
| | | | | | | The final user was nuked with last commit. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* mesa: remove unused function _mesa_map_static_functions()Emil Velikov2016-06-132-23/+0
| | | | | | | | Unused as of commit 5a175127f38 ("dri: Remove all extension enabling utility functions") Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* dri/common: remove unused libdri_test_stubs.laEmil Velikov2016-06-133-104/+1
| | | | | | | | | | ... and associated file(s). No longer needed since commit 057259655e7 ("i965: Don't link libmesa or libdri_test_stubs into tests") Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* swr: automake: add missing -I flagEmil Velikov2016-06-131-0/+1
| | | | | | | | | | | | | When building from a release tarball (where the generated/built files are in srcdir) in an OOT fashion we need to have both builddir and srcdir in the includes list. Otherwise we'll error out, as the file (header gen_knobs.h in this case) won't be in the location where we are looking. Cc: "12.0" <[email protected]> Cc: Tim Rowley <[email protected]> Signed-off-by: Emil Velikov <[email protected]>
* automake: add SWR to `make distcheck' gallium driversEmil Velikov2016-06-131-1/+1
| | | | | | | | | Will allows us to catch missing files and build issues before getting the tarball out for general consumption. Cc: "12.0" <[email protected]> Cc: Tim Rowley <[email protected]> Signed-off-by: Emil Velikov <[email protected]>
* configure.ac: strip out the llvm-config -march/mtune flagsEmil Velikov2016-06-131-0/+3
| | | | | | | | | | | | | Otherwise drivers such as SWR that depend on providing their own values will fail to build. v2: Add -mcpu for good measure (Chuck) Cc: "11.2 12.0" <[email protected]> Cc: Tim Rowley <[email protected]> Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Chuck Atkins <[email protected]> Tested-by: Chuck Atkins <[email protected]>
* swr: Add missing headers for package inclusionChuck Atkins2016-06-131-1/+9
| | | | | CC: "12.0" <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* automake: get in-tree `make distclean' working again.Emil Velikov2016-06-131-1/+1
| | | | | | | | | | | | | | With earlier commit we've handled the `make distclean' out of tree build, yet we failed to attribute that for in-tree builds the test condition will return 1. Thus effectively the target will be considered as "failed". Fixes: b7f7ec78435 ("mesa: automake: distclean git_sha1.h when building OOT") Cc: <[email protected]> Tested-by: Andy Furniss <[email protected]> Reported-by: Andy Furniss <[email protected]> Signed-off-by: Emil Velikov <[email protected]>
* gallivm: Fix trivial sign warningsJan Vesely2016-06-138-21/+22
| | | | | | | v2: include whitespace fixes Signed-off-by: Jan Vesely <[email protected]> Reviewed-by: Jose Fonseca <[email protected]>
* st/va: use proper temp pipe_video_buffer templateJulien Isorce2016-06-131-4/+4
| | | | | | | | | | Instead of changing the format on the existing template which makes error handling not nice and confuses coverity. CoverityID: 1337953 Signed-off-by: Julien Isorce <[email protected]> Reviewed-by: Christian König <[email protected]>
* st/va: it is valid to release the VABuffer of an exported resourceJulien Isorce2016-06-131-7/+1
| | | | | | | | | | | | pipe_resource_reference(&res, NULL) will decrement reference counting, i.e. p_atomic_dec(res->count). But the va surface still has the initial reference since it has created the resource. So calling vaDestroyImage on a derived image calls VaDestroyBuffer but the decrementation won't reach 0. It is just wrong for vlVaDestroyBuffer to rely on the export_refcount flag. Finally the vaapi intel driver has the same logic. Signed-off-by: Julien Isorce <[email protected]> Reviewed-by: Christian König <[email protected]>
* glsl: fix component overlap validation for doublesTimothy Arceri2016-06-121-5/+5
| | | | | | | | | | | This change makes sure to remove arrays when checking if type is a double. The check for the end of the first slot of a multi-slot double is also fixed by bumping the check to 4 rather than 3. Previously we were we not reserving the last component. Reviewed-by: Kenneth Graunke <[email protected]>
* glsl: fix max varyings count for ARB_enhanced_layoutsTimothy Arceri2016-06-123-20/+43
| | | | | | | | | | | Since this extension allows more than one varying to share a single location we can't just count the number of slots a varying takes and add it to the total. Instead we now reuse the reserved varyings bitfield to determine how many slots are reserved for explicit locations instead. Reviewed-by: Kenneth Graunke <[email protected]>
* i965: Use the correct number of threads for compute shaders.Kenneth Graunke2016-06-121-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We were programming the number of threads per subslice, when we should have been programming the total number of threads on the GPU as a whole. Thanks to Curro and Jordan for helping track this down! On Skylake GT3e: - Improves performance in Unreal's Elemental Demo by roughly 1.5-1.7x. - Improves performance in Synmark's Gl43CSDof by roughly 3.7x. - Improves performance in Synmark's Gl43GSCloth by roughly 1.18x. On Broadwell GT2: - Improves performance in Unreal's Elemental Demo by roughly 1.2-1.5x. - Improves performance in Synmark's Gl43CSDof by roughly 2.0x. - Improves performance in Synmark's Gl43GSCloth by 1.47035% +/- 0.255654% (n=25). On Haswell GT3e: - Improves performance in Unreal's Elemental Demo (in GL 4.3 mode) by roughly 1.10x. - Improves performance in Synmark's Gl43CSDof by roughly 1.18x. - Decreases performance in Synmark's Gl43CSCloth by -1.99484% +/- 0.432771% (n=64). On Ivybridge GT2: - Improves performance in Unreal's Elemental Demo (in GL 4.2 mode) by roughly 1.03x. - Improves performance in Synmark's G/43CSDof by roughly 1.25x. - No change in Synmark's Gl43CSCloth (n=28). Cc: "12.0" <[email protected]> Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Francisco Jerez <[email protected]> Reviewed-by: Jordan Justen <[email protected]>
* i965: Assert that the scratch spaces are in range.Kenneth Graunke2016-06-121-0/+14
| | | | | | | | | | | | | | | I don't know that anything actually guarantees this, but if we exceed the limits, we may end up overflowing and trashing random buffers that happen to be nearby in the VMA space, leading to rendering corruption, hangs, or worse. We should really fix this properly. However, the pitfall has existed for ages, so for now we should at least detect it. Cc: "12.0" <[email protected]> Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Francisco Jerez <[email protected]> Reviewed-by: Jordan Justen <[email protected]>
* i965: Fix CS scratch size calculations on Ivybridge and Baytrail.Kenneth Graunke2016-06-122-2/+10
| | | | | | | | | These are linear, not powers of two, and much more limited. Cc: "12.0" <[email protected]> Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Francisco Jerez <[email protected]> Reviewed-by: Jordan Justen <[email protected]>
* i965: Fix Haswell CS per-thread scratch space encoding.Kenneth Graunke2016-06-122-3/+25
| | | | | | | | | | | | | | | | | | | | | | Most scratch stages use power of two sizes, in kilobytes, where 0 means 1kB. But compute shaders on Haswell have a minimum of 2kB, and use a representation where 0 = 2kB. This meant that we were effectively telling the hardware to allocate each thread twice as much space as we meant to, while simultaneously not allocating that much space in the buffer, leading to overflows. Note that the existing code is completely wrong for Ivybridge, but that will take additional work to sort out, so I've left it as is for now. A subsequent commit will take care of that. Together with the previous patches, this fixes rendering corruption on Synmark's Gl43CSDof on Haswell. Cc: "12.0" <[email protected]> Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Francisco Jerez <[email protected]> Reviewed-by: Jordan Justen <[email protected]>
* i965: Account for poor address calculations in Haswell CS scratch size.Kenneth Graunke2016-06-121-1/+20
| | | | | | | | | | | | | | | | Curro figured this out by investigating the simulator. Apparently there's also a workaround in the Windows driver. I'm not sure it's actually documented anywhere. We were underallocating the scratch buffer by a factor of 128/70. v2: Rename threads_per_subslice to scratch_ids_per_subslice (suggested by Jordan Justen). Cc: "12.0" <[email protected]> Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Francisco Jerez <[email protected]> Reviewed-by: Jordan Justen <[email protected]>
* i965: Allocate scratch space for the maximum number of compute threads.Kenneth Graunke2016-06-121-1/+3
| | | | | | | | | | | | | | | | | | | | We were allocating enough space for the number of threads per subslice, when we should have been allocating space for the number of threads in the entire GPU. Even though we currently run with a reduced thread count (due to a bug), we might still overflow the scratch buffer because the address calculation is based on the FFTID, which can depend on exactly which threads, EUs, and threads are executing. We need to allocate enough for every possible thread that could run. Fixes rendering corruption in Synmark's Gl43CSDof on Gen8+. Earlier platforms need additional bug fixes. Cc: "12.0" <[email protected]> Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Francisco Jerez <[email protected]> Reviewed-by: Jordan Justen <[email protected]>
* i965: Set subslice_total on Gen7/7.5 platforms.Kenneth Graunke2016-06-121-1/+4
| | | | | | | | | | | | We'll use this for compute shader thread counts and scratch space calculations shortly. Note that subslices are referred to as "half slices" on Ivybridge. Cc: "12.0" <[email protected]> Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Francisco Jerez <[email protected]> Reviewed-by: Jordan Justen <[email protected]>
* i965: Fix shared local memory size for Gen9+.Kenneth Graunke2016-06-124-27/+37
| | | | | | | | | | | | | | | | | | | | | Skylake changes the representation of shared local memory size: Size | 0 kB | 1 kB | 2 kB | 4 kB | 8 kB | 16 kB | 32 kB | 64 kB | ------------------------------------------------------------------- Gen7-8 | 0 | none | none | 1 | 2 | 4 | 8 | 16 | ------------------------------------------------------------------- Gen9+ | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | The old formula would substantially underallocate the amount of space. This fixes GPU hangs on Skylake when running with full thread counts. v2: Fix the Vulkan driver too, use a helper function, and fix the table in the comments and commit message. Cc: "12.0" <[email protected]> Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Francisco Jerez <[email protected]> Reviewed-by: Jordan Justen <[email protected]>
* nv50: reinstate dedicated constbuf push pathIlia Mirkin2016-06-115-29/+50
| | | | | | | | | | | | | | | | | This was disabled due to occasionally incorrect behavior when trying to upload data. It later became apparent that nvc0 also had a similar but slightly different issue, which was resolved in commit e50c01d5. This takes the same logic as nvc0 and applies it to nv50 (which has somewhat different interfaces). Unfortunately I did not note down precisely what was broken with UBOs when removing the support from nv50, but I've tested a bunch of local traces, and none of them appear to regress. This should hopefully improve performance when UBOs are used, but this was not directly verified. Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Samuel Pitoiset <[email protected]>
* nv50: enable indirect addressing of fragment shader inputsIlia Mirkin2016-06-112-1/+2
| | | | Signed-off-by: Ilia Mirkin <[email protected]>
* mesa: add drawbuffer argument to ClearNamedFramebufferfiIlia Mirkin2016-06-103-3/+4
| | | | | | | | | | | This was fixed in revision 47 of the ARB_dsa spec in Oct 22, 2015. Since it's horrible to have differing APIs across library versions, we should attempt to minimize the impact by backporting it as far as possible and hope no one notices. Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]> Cc: "11.2 12.0" <[email protected]>
* GL: update glcorearb.h to svn 32433Ilia Mirkin2016-06-101-38/+70
| | | | | | | | This brings in the fixed glClearNamedFramebufferfi definition, as well as a lot of GLsizei -> GLsizeiptr changes. Signed-off-by: Ilia Mirkin <[email protected]> Cc: "11.2 12.0" <[email protected]>
* GL: update glext to svn 32957Ilia Mirkin2016-06-101-5/+82
| | | | | | | | This brings in defines from GL_EXT_window_rectangles and fixes the glClearNamedFramebufferfi definition. Signed-off-by: Ilia Mirkin <[email protected]> Cc: "11.2 12.0" <[email protected]>
* docs: GL_ARB_copy_image done for softpipe, llvmpipeBrian Paul2016-06-101-1/+1
| | | | Signed-off-by: Brian Paul <[email protected]>
* llvmpipe: turn on pipe cap for GL_ARB_copy_image supportBrian Paul2016-06-101-1/+2
| | | | Reviewed-by: Charmaine Lee <[email protected]>
* llvmpipe: don't use 3-component formats, except 32-bit x 3 formatsBrian Paul2016-06-101-11/+12
| | | | | | | | | | | This basically disallows all 8-bit x 3 and 16-bit x 3 formats for textures and render targets. Some 3-component formats were already disallowed before. This avoids problems with GL_ARB_copy_image. v2: the previous version of this patch disallowed all 3-component formats Reviewed-by: Charmaine Lee <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]>
* softpipe: turn on pipe cap for GL_ARB_copy_image supportBrian Paul2016-06-101-1/+2
| | | | Reviewed-by: Charmaine Lee <[email protected]>
* softpipe: don't use 3-component formatsBrian Paul2016-06-101-0/+18
| | | | | | | | | | | | | | | Mesa and gallium don't have a complete set of matching 3-component texture formats. For example, 8-bit sRGB unorm. To fully support the GL_ARB_copy_image extension we need to have support for all of these formats: RGB8_UNORM, RGB8_SNORM, RGB8_SRGB, RGB8_UINT, and RGB8_SINT using the same component order. Since we don't have that, disable the 3-component formats for now. v2: Simplify 3-component format check, per Marek. Also check that target != PIPE_BUFFER. Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Charmaine Lee <[email protected]>
* st/mesa: tweak surface format mapping tableBrian Paul2016-06-101-9/+11
| | | | | | | | | | | 1. Try to choose R8G8B8A8 unorm/srgb formats before others in an effort to try to match component ordering for UINT/SINT/etc. 2. If we can't get a format such as PIPE_FORMAT_A16_UNORM, try PIPE_FORMAT_R16G16B16A16_UNORM before shallower formats. Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Charmaine Lee <[email protected]>
* util: update util_resource_copy_region() for GL_ARB_copy_imageBrian Paul2016-06-101-20/+95
| | | | | | | This primarily means added support for copying between compressed and uncompressed formats. Reviewed-by: Charmaine Lee <[email protected]>
* gallium: Fix region overlap conditions for rectangles with a shared edgeAnuj Phogat2016-06-101-4/+4
| | | | | | | | | | | | | | | | | | | | | >From OpenGL 4.0 spec, section 4.3.2 "Copying Pixels": "The pixels corresponding to these buffers are copied from the source rectangle bounded by the locations (srcX0, srcY 0) and (srcX1, srcY 1) to the destination rectangle bounded by the locations (dstX0, dstY 0) and (dstX1, dstY 1). The lower bounds of the rectangle are inclusive, while the upper bounds are exclusive." So, the rectangles sharing just an edge shouldn't overlap. ----------- | | ------- --- | | | | | | ------- --- Cc: "12.0" <[email protected]> Signed-off-by: Anuj Phogat <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* mesa: Fix region overlap conditions for rectangles with a shared edgeAnuj Phogat2016-06-101-4/+4
| | | | | | | | | | | | | | | | | | | | | | >From OpenGL 4.0 spec, section 4.3.2 "Copying Pixels": "The pixels corresponding to these buffers are copied from the source rectangle bounded by the locations (srcX0, srcY 0) and (srcX1, srcY 1) to the destination rectangle bounded by the locations (dstX0, dstY 0) and (dstX1, dstY 1). The lower bounds of the rectangle are inclusive, while the upper bounds are exclusive." So, the rectangles sharing just an edge shouldn't overlap. ----------- | | ------- --- | | | | | | ------- --- Cc: "12.0" <[email protected]> Signed-off-by: Anuj Phogat <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* gallivm: more 64-bit integer prep work.Dave Airlie2016-06-111-8/+8
| | | | | | | This converts one other place to using the new helper. Reviewed-by: Nicolai Hähnle <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radeonsi: convert to 64-bitness checks instead of doubles.Dave Airlie2016-06-113-31/+33
| | | | | | | | This converts to testing for 64-bit types and renames some things in anticipation of 64-bit integer support. Reviewed-by: Nicolai Hähnle <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* gallivm: make non-float return code bitcast consistent.Dave Airlie2016-06-111-12/+6
| | | | | | | | This just uses the same form across the fetches. Reviewed-by: Roland Scheidegger <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* gallium/gallivm: use 64-bit test instead of doubles.Dave Airlie2016-06-111-37/+36
| | | | | | | | | This just makes some generic code that currently emits double suitable for emitting 64-bit values. Reviewed-by: Roland Scheidegger <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* gallium/tgsi: add 64-bitness type check function.Dave Airlie2016-06-111-0/+7
| | | | | | | | | Currently this just doubles, but we'll convert users to this so making adding 64-bit integers easier. Reviewed-by: Roland Scheidegger <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]> Signed-off-by: Dave Airlie <[email protected]>