summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* glsl: move array validation into its own functionTimothy Arceri2015-03-062-39/+55
| | | | | | V2: return true when var->type is unsized but max access is within valid range Reviewed-by: Mark Janes <[email protected]>
* i965: Split Gen4-5 BlitFramebuffer code; prefer BLT over Meta.Kenneth Graunke2015-03-051-1/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | A while back I switched intel_blit_framebuffer to prefer Meta over the BLT. This meant that Gen8 platforms would start using the 3D engine for blits, just like we do on Gen6-7.5. However, I hadn't considered Gen4-5 when making that change. The BLT engine appears to be substantially faster on 965GM than using Meta to drive the 3D engine. This isn't too surprising: original Gen4 doesn't support tile offsets (that came on G45), and the level/layer fields don't work for cubemap rendering, so for inconvenient miplevel alignments, we end up blitting or copying data to/from temporaries in order to render to it. We may as well just use the blitter. I chose to use the BLT on Gen4-5 because they use the same ring for both 3D and BLT; Gen6+ splits it out. Fixes regressions on 965GM due to botched tile offset code (we should fix those properly as well, but they're longstanding bugs - for now, put things back to the status quo). Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=89430 Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Topi Pohjolainen <[email protected]> Reviewed-by: Jordan Justen <[email protected]> Cc: "10.5" <[email protected]>
* ilo: add more convenient intel_bo_{ref,unref}()Chia-I Wu2015-03-068-47/+35
| | | | | They both check for NULL and intel_bo_ref() returns the referenced bo. They replace intel_bo_{reference,unreference}().
* ilo: add intel_bo_set_tiling()Chia-I Wu2015-03-066-80/+71
| | | | | Make intel_winsys_alloc_bo() always allocate a linear bo, and add intel_bo_set_tiling() to set the tiling. Document the purpose of tiling.
* ilo: replace intel_tiling_mode by gen_surface_tilingChia-I Wu2015-03-0610-136/+167
| | | | | | The former is used by the kernel driver to set up fence registers and to pass tiling info across processes. It lacks INTEL_TILING_W, which made our code less expressive.
* ilo: update genhw headersChia-I Wu2015-03-067-782/+986
| | | | The main change is non-inline <enum>s are now generated as C enums.
* Fix invalid extern "C" around header inclusion.Mark Janes2015-03-0526-38/+96
| | | | | | | | | | | System headers may contain C++ declarations, which cannot be given C linkage. For this reason, include statements should never occur inside extern "C". This patch moves the C linkage statements to enclose only the declarations within a single header. Reviewed-by: Jose Fonseca <[email protected]>
* i965: Tell intel_get_memcpy() which direction the memcpy() is going.Matt Turner2015-03-055-42/+106
| | | | | | | | | | | | | | | | | | | | | | The SSSE3 swizzling code was written for fast uploads to the GPU and assumed the destination was always 16-byte aligned. When we began using this code for fast downloads as well we didn't do anything to account for the fact that the destination pointer given by glReadPixels() or glGetTexImage() is not guaranteed to be suitably aligned. With SSSE3 enabled (at compile-time), some applications would crash when an SSE aligned-store instruction tried to store to an unaligned destination (or an assertion that the destination is aligned would trigger). To remedy this, tell intel_get_memcpy() whether we're uploading or downloading so that it can select whether to assume the destination or source is aligned, respectively. Cc: 10.5 <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=89416 Tested-by: Uriy Zhuravlev <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* mesa/x86: missing stdio inclusionsMark Janes2015-03-052-0/+4
| | | | | | | | Several patches added include statements where required by the m64 build. Some files are only compiled for m32, and require similar changes. Reviewed-by: Matt Turner <[email protected]>
* clover: Enable cl_khr_fp64 for devices that support doubles v4Tom Stellard2015-03-053-3/+25
| | | | | | | | | | | | | | | | | | | v2: - Report correct values for CL_DEVICE_NATIVE_VECTOR_WIDTH_DOUBLE and CL_DEVICE_PREFERRED_VECTOR_WIDTH_DOUBLE. - Only define cl_khr_fp64 if the extension is supported. - Remove trailing space from extension string. - Rename device query function from cl_khr_fp64() to has_doubles(). v3: - Return 0 for device::doubled_fp_confg() when doubles aren't supported. v4: - Remove device query for double fp_config. Reviewed-by: Francisco Jerez <[email protected]>
* xmlpool: make sure we ship options.hEmil Velikov2015-03-051-1/+1
| | | | | | | | | | | | The header is included in ../xmlpool.h. With the latter of which used directly in a number of places in mesa. Note that we can also add it (alongside t_option.h) to noinst_HEADERS, but neither solution fixes the issue that brough us here - namely: Do not regenerate the headers, if it already exists. Cc: "10.5" <[email protected]> Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* mapi: fix *glapi dependency trackingEmil Velikov2015-03-051-2/+2
| | | | | | | | | | | | I.e. add {shared-,}glapi/glapi_mapi_tmp.h to the SOURCES list. Otherwise there will be no knowledge that the file is required by others for the build. Thus autotools won't pick it up for the distribution tarball. v2: Don't forget about the static glapi. Spotted by Matt. Cc: "10.5" <[email protected]> Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* mesa: drop Makefile from get_hash.h dependency listEmil Velikov2015-03-051-1/+1
| | | | | | | | | Not required. Additionally this had the side effect of generating the file, despite it's existence. Cc: "10.5" <[email protected]> Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* mesa: fix dependency tracking of generated sourcesEmil Velikov2015-03-051-0/+2
| | | | | | | | | | | Some of the files generated were not in the SOURCES variable, thus although generated prior to compilation the dependency tracking was incomplete. The latter of which resulted in the files missing from the distribution tarball. Cc: "10.5" <[email protected]> Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* mesa: rename format_info.c to format_info.hEmil Velikov2015-03-055-7/+7
| | | | | | | | | | | | | The file is auto-generated, and #included by formats.c. Let's rename it to reflect the latter. This will also help up fix the dependency tracking by adding it to the _SOURCES variable, without the side effect of it being compiled (twice). v2: Update .gitignore to reflect the rename. Cc: "10.4, 10.5" <[email protected]> Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* mesa/main: update .gitignoreEmil Velikov2015-03-051-2/+0
| | | | | | | | | Drop the no longer present get_es{1,2}.c from the list. v2: Keep the format_info.c rename hunk out of this patch. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* egl/main: remove no-longer needed definition of stdint typesEmil Velikov2015-03-051-32/+0
| | | | | | | | | All the users directly include the header, plus we have a in-tree replacements for non C99 compilers which we already use. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Matt Turner <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* egl/drivers: include stdint.h where neededEmil Velikov2015-03-056-0/+7
| | | | | | | | | Currently these files are including it indirectly via eglcompiler.h The latter of which will be removed with follow up commits. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Matt Turner <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* egl/main: drop the declaration of PUBLIC keyword.Emil Velikov2015-03-051-14/+0
| | | | | | | | | | Should no longer be used. As many places indirectly include eglcompiler.h keep this change separate, so that it can be easily reverted, if needed. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Matt Turner <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* egl/main: no longer export internal functionEmil Velikov2015-03-0513-36/+36
| | | | | | | | | | | | With the split of the gallium egl module we had previously it required access to some of the internal functions. As the only build (automake) that did this no longer builds it we can now appropriately hide those functions. Cc: 10.5 <[email protected]> Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Matt Turner <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* egl/main: replace __FUNCTION__ with __func__Emil Velikov2015-03-052-11/+3
| | | | | | | | | | | The latter is a C99 standard, and our current wrapper c99_compat.h should handle non-compliant compilers. Drop the c99_compat.h inclusion from eglcompiler.h altogether, as it's no longer required. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Matt Turner <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* egl/main: replace INLINE with inlineEmil Velikov2015-03-0515-68/+82
| | | | | | | | | | Drop the custom keyword in favour of the C99 one. All the places using it now directly include c99_compat.h which should handle things on platforms which lack it. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Matt Turner <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mapi: remove u_thread.hBrian Paul2015-03-056-30/+19
| | | | | | | Just use c11 threads directly. Reviewed-by: Matt Turner <[email protected]> Reviewed-by: José Fonseca <[email protected]>
* mapi: use c11 call_once() instead of pthread_once()Brian Paul2015-03-051-2/+3
| | | | | Reviewed-by: Matt Turner <[email protected]> Reviewed-by: José Fonseca <[email protected]>
* mapi: THREADS was always defined, remove itBrian Paul2015-03-057-56/+13
| | | | | | | | THREADS was defined if HAVE_PTHREADS or _WIN32 was defined. That's always the case. The build would die in c11/threads.h otherwise. Reviewed-by: Matt Turner <[email protected]> Reviewed-by: José Fonseca <[email protected]>
* mesa: remove THREADS check, printf calls in debug.cBrian Paul2015-03-051-5/+0
| | | | | | | THREADS is going away in the next commit. Reviewed-by: Matt Turner <[email protected]> Reviewed-by: José Fonseca <[email protected]>
* mapi: rewrite u_current_init() function without u_thread_self()Brian Paul2015-03-052-27/+40
| | | | | | | | | | Remove u_thread_self() since u_thread.h is going away soon. Create a simple thread ID abstraction which wraps WIN32 or c11 threads. This also gets rid of the questionable casting of thrd_t to an unsigned long. Reviewed-by: Matt Turner <[email protected]> Reviewed-by: José Fonseca <[email protected]>
* mapi: fix preprocessor check in u_current_destroy()Brian Paul2015-03-051-1/+1
| | | | | | | So it matches the preprocessor check around the u_current_init_tsd() code. Reviewed-by: Matt Turner <[email protected]> Reviewed-by: José Fonseca <[email protected]>
* mapi: remove u_macros.hBrian Paul2015-03-056-17/+3
| | | | | | | Only U_STRINGIFY() is used in entry.c Reviewed-by: Matt Turner <[email protected]> Reviewed-by: José Fonseca <[email protected]>
* osmesa: include stdio.hBrian Paul2015-03-051-0/+1
| | | | | Acked-by: Matt Turner <[email protected]> Reviewed-by: José Fonseca <[email protected]>
* xlib: include stdio.hBrian Paul2015-03-054-1/+4
| | | | | Acked-by: Matt Turner <[email protected]> Reviewed-by: José Fonseca <[email protected]>
* st/osmesa: include stdio.hBrian Paul2015-03-051-0/+1
| | | | | Acked-by: Matt Turner <[email protected]> Reviewed-by: José Fonseca <[email protected]>
* st/xlib: include stdio.hBrian Paul2015-03-052-0/+2
| | | | | Acked-by: Matt Turner <[email protected]> Reviewed-by: José Fonseca <[email protected]>
* st/xlib: include stdio.hBrian Paul2015-03-051-0/+1
| | | | | Acked-by: Matt Turner <[email protected]> Reviewed-by: José Fonseca <[email protected]>
* st/mesa: include stdio.h where neededBrian Paul2015-03-052-0/+2
| | | | | Acked-by: Matt Turner <[email protected]> Reviewed-by: José Fonseca <[email protected]>
* swrast: include stdio.h where neededBrian Paul2015-03-051-0/+1
| | | | | Acked-by: Matt Turner <[email protected]> Reviewed-by: José Fonseca <[email protected]>
* nouveau: include stdio.h where neededBrian Paul2015-03-053-0/+3
| | | | | Acked-by: Matt Turner <[email protected]> Reviewed-by: José Fonseca <[email protected]>
* dri/common: include stdio.h where neededBrian Paul2015-03-052-0/+2
| | | | | Acked-by: Matt Turner <[email protected]> Reviewed-by: José Fonseca <[email protected]>
* glsl: include stdio.h where neededBrian Paul2015-03-052-0/+2
| | | | | Acked-by: Matt Turner <[email protected]> Reviewed-by: José Fonseca <[email protected]>
* mesa: include stdio.h where neededBrian Paul2015-03-0522-2/+25
| | | | | | | Instead of relying on glapi.h or some other header to provide it. Acked-by: Matt Turner <[email protected]> Reviewed-by: José Fonseca <[email protected]>
* mesa: include c11/threads.h in mtypes.hBrian Paul2015-03-051-0/+1
| | | | | | | | Let's directly include c11/threads.h instead of relying on glapi.h to provide it. Reviewed-by: Matt Turner <[email protected]> Reviewed-by: José Fonseca <[email protected]>
* meta: Fix the y offset for 1D_ARRAY in _mesa_meta_pbo_TexSubImageNeil Roberts2015-03-051-0/+8
| | | | | | | | | The yoffset needs to be interpreted as a slice offset for 1D array textures. This patch implements that by moving the yoffset into zoffset similar to how it moves the height into depth. Reviewed-by: Jason Ekstrand <[email protected]> Cc: "10.5" <[email protected]>
* meta: Allow GL_UN/PACK_IMAGE_HEIGHT in _mesa_meta_pbo_Get/TexSubImageNeil Roberts2015-03-051-12/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now that a layered source PBO is interpreted as a single tall 2D image it's quite easy to accept the image height packing option by just creating an image that is tall enough to include the image padding. I'm not sure whether the image height property should affect 1D_ARRAY textures. My intuition and interpretation of the GL spec (which is a bit vague) would be that it shouldn't. However the software fallback path in Mesa uses the property for packing but not for unpacking. The binary NVidia driver uses it for both. This patch doesn't use it for either case so it is different from the software fallback. There is some discussion about this here: http://lists.freedesktop.org/archives/mesa-dev/2015-February/077925.html This is tested by the texsubimage Piglit test with the array and pbo arguments. Previously this test was skipping this code path because it always sets the image height. I've also tested it by modifying the getteximage-targets test. It wasn't using this code path before because it was using the default texture object so this code couldn't successfully create a frame buffer. I also modified it to add some image padding with the image height in the PBO. Reviewed-by: Jason Ekstrand <[email protected]> Cc: "10.5" <[email protected]>
* Revert "common: Fix PBOs for 1D_ARRAY."Neil Roberts2015-03-051-36/+26
| | | | | | | | | | | | | | | | | | This reverts commit 546aba143d13ba3f993ead4cc30b2404abfc0202. I think the changes to the calls to glBlitFramebuffer from this patch are no different to what it was doing previously because it used to set height to 1 before doing the blits. However it was introducing some problems with the blit for layer 0 because this was no longer special cased. It didn't fix problems with the yoffset which needs to be interpreted as a slice offset. I think a better solution would be to modify the original if statement to cope with the yoffset. Conflicts: src/mesa/drivers/common/meta_tex_subimage.c Cc: "10.5" <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* glsl: Fix GCC unused-variable warning in release build.Vinson Lee2015-03-041-3/+1
| | | | | | | | | | | CXX ast_array_index.lo ast_array_index.cpp: In function ‘void update_max_array_access(ir_rvalue*, int, YYLTYPE*, _mesa_glsl_parse_state*)’: ast_array_index.cpp:86:30: warning: unused variable ‘interface_type’ [-Wunused-variable] const glsl_type *interface_type = ^ Signed-off-by: Vinson Lee <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* ilo: improve WA handling in rectlist pathChia-I Wu2015-03-044-38/+60
| | | | | | Add wrappers for 3DPRIMITIVE to make sure we clear current_pipe_control_dw1 and deferred_pipe_control_dw1 after it. Add missing gen7_wa_post_ps_and_later().
* ilo: clean up Gen7.5 WAsChia-I Wu2015-03-042-51/+43
| | | | | | | | | | | | These WAs gen7_wa_post_3dstate_push_constant_alloc_ps() gen7_wa_pre_vs() gen7_wa_pre_3dstate_sf_depth_bias() first half of gen7_wa_pre_depth() gen7_wa_post_ps_and_later() are Gen7-specific. Update copy-and-pasted gen8_wa_pre_depth() also.
* clover: Fix build since llvm r231270Tom Stellard2015-03-041-1/+1
|
* ilo: add ILO_DEBUG=hangChia-I Wu2015-03-055-4/+45
| | | | When set, detect and dump the hanging batch bufffer.
* ilo: add some more winsys functionsChia-I Wu2015-03-042-2/+66
| | | | | | Add intel_winsys_get_reset_stats(), intel_winsys_import_userptr(), and intel_bo_map_async(). The latter two are stubs, but we are not going to use them immediately either.