summaryrefslogtreecommitdiffstats
path: root/src/gallium
Commit message (Collapse)AuthorAgeFilesLines
* r300g/tests: Added missing fclose for FILE resource.Siavash Eliasi2014-02-281-0/+3
| | | | | Reviewed-by: Tom Stellard <thomas.stellard@amd.com> Reviewed-by: Kristian Høgsberg <krh@bitplanet.net>
* r600g/compute: PIPE_CAP_COMPUTE should be false for pre-evergreen GPUsTom Stellard2014-02-281-1/+3
| | | | | | | | | This prevents clover from using unsupported devices. Reviewed-by: Marek Olšák <marek.olsak@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> CC: "10.0 10.1" <mesa-stable@lists.freedesktop.org>
* winsys/svga: Avoid calling drm getparam for max surface size on older kernelsThomas Hellstrom2014-02-281-7/+8
| | | | | | | | | | | | | This avoids the kernel driver spewing out errors about the param not being supported. Also correct the max surface size used when the kernel does not support the query. Reported-by: Brian Paul <brianp@vmware.com> Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com> Reviewed-by: Charmaine Lee <charmainel@vmware.com> Cc: "10.1" <mesa-stable@lists.freedesktop.org>
* util/u_format: don't crash in util_format_translate if we can't do translationRoland Scheidegger2014-02-272-6/+17
| | | | | | | | | | | | Some formats can't be handled - in particular cannot handle ints/uints formats, which lack the pack_rgba_float/unpack_rgba_float functions. Instead of trying to call these (and crash) return an error (I'm not sure yet if we should try to translate such formats too here might not make much sense). v2: suggested by Jose, use separate checks for pack/unpack of rgba_8unorm and rgba_float functions (right now if one exists the other should as well). Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
* nouveau: add a nouveau_compiler binary to compile TGSI into shader ISAIlia Mirkin2014-02-263-0/+235
| | | | | | | This makes it easy to compare output between different cards, especially for ones that you don't have (and/or not in the current machine). Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
* nv30: remove nv30_context use from nvfx_*progIlia Mirkin2014-02-2613-107/+110
| | | | | | | This should pave the way to being able to use the compiler without a context. Also leads to cleaner code. Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
* nv30: remove unused sprite flipping parameterIlia Mirkin2014-02-263-5/+3
| | | | Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
* nv30: remove unused render_mode and hw_pointsprite_controlIlia Mirkin2014-02-262-8/+3
| | | | Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
* nv30: remove use_nv4x, it is identical to is_nv4xIlia Mirkin2014-02-264-16/+14
| | | | Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
* radeonsi: Prevent geometry shader from emitting too many verticesMichel Daenzer2014-02-271-0/+16
|
* ilo: create u_upload_mgr lastChia-I Wu2014-02-261-8/+11
| | | | | Similar to u_blitter, u_upload_mgr is now a client of the pipe context. Its creation needs to be delayed until the context has been (almost) initialized.
* Re-commit 'clover: Fix build with LLVM 3.5'Tom Stellard2014-02-251-1/+3
| | | | This was accidentally reverted in 9dfd7c5f75c806801b1b4b4d405899236c09ba75
* Revert "Merge branch 'master' of git+ssh://git.freedesktop.org/git/mesa/mesa"Timothy Arceri2014-02-261-3/+1
| | | | | This reverts commit 1b79582f322d4a89dd6d197c8d4962c788ae7f25, reversing changes made to 376a98d345dfc3da8d5b0f1e489196f861c4e754.
* clover: Fix build with LLVM 3.5Tom Stellard2014-02-251-1/+3
|
* nv50: enable txg where supportedIlia Mirkin2014-02-253-2/+8
| | | | Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
* nv50: enable cube map array texture supportIlia Mirkin2014-02-253-9/+7
| | | | Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
* libgl-xlib: add -Isrc/gallium/winsys flagBrian Paul2014-02-251-0/+1
| | | | | | So that sw/xlib/xlib_sw_winsys.h can be found. Fixes a build break. Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
* r600g,radeonsi: consolidate create_surface and surface_destroyMarek Olšák2014-02-256-85/+63
| | | | Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
* radeonsi: inline util_blitter_copy_textureMarek Olšák2014-02-251-3/+21
| | | | | | | | This will be used for changing texture properties without modifying pipe_resource like r600g, but not in this series. For now, this change allows consolidation of pipe_surface functions. Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
* radeonsi: remove useless psbox variable from resource_copy_regionMarek Olšák2014-02-251-3/+2
| | | | Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
* radeonsi: compute depth surface registers only onceMarek Olšák2014-02-251-44/+54
| | | | Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
* radeonsi: compute color surface registers only onceMarek Olšák2014-02-251-44/+55
| | | | | | Same as r600g. Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
* r600g: remove r600_resource.hMarek Olšák2014-02-255-48/+15
| | | | Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
* r600g: remove r600_surface::htile_enabledMarek Olšák2014-02-253-10/+4
| | | | | | v2: use one of the htile registers instead Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
* r600g: use r600_surface::db_z_infoMarek Olšák2014-02-251-10/+10
| | | | | | | | | | db_z_info was unused. This just renames the variable to match the register name. Now, db_depth_info is unused on Evergreen. Both variables will be needed on SI though. Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
* r600g,radeonsi: share r600_surfaceMarek Olšák2014-02-255-54/+50
| | | | | | I'm gonna use this in radeonsi. Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
* radeonsi: move PA_SU_POLY_OFFSET_DB_FMT_CNTL to framebuffer stateMarek Olšák2014-02-251-8/+21
| | | | | | It doesn't depend on anything else. Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
* gallium/upload_mgr: remove useless variable "size"Marek Olšák2014-02-251-6/+4
| | | | Reviewed-by: Fredrik Höglund <fredrik@kde.org>
* gallium/upload_mgr: don't unmap buffers if persistent mappings are supportedMarek Olšák2014-02-251-14/+51
| | | | Reviewed-by: Fredrik Höglund <fredrik@kde.org>
* gallium: the other drivers don't support ARB_buffer_storageMarek Olšák2014-02-259-0/+9
| | | | Reviewed-by: Fredrik Höglund <fredrik@kde.org>
* r300g,r600g,radeonsi: add support for ARB_buffer_storageMarek Olšák2014-02-256-0/+21
| | | | | | All GTT memory mappings are coherent and therefore can be persistent. Reviewed-by: Fredrik Höglund <fredrik@kde.org>
* gallium: add interface for persistent and coherent buffer mappingsMarek Olšák2014-02-255-3/+76
| | | | Required for ARB_buffer_storage.
* nv50: correctly calculate the number of vertical blocks during transfer mapEmil Velikov2014-02-251-1/+1
| | | | | | Cc: "10.0 10.1" <mesa-stable@lists.freedesktop.org> Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
* gallium: add texture gather support to gallium (v3)Dave Airlie2014-02-2517-2/+73
| | | | | | | | | | | | | | | | | | | | | This adds support to gallium for a TG4 instruction, and two CAPs. The first CAP is required for GL_ARB_texture_gather. The second CAP is required to expose GL_ARB_gpu_shader5. However so far we haven't found any hardware that natively exposes the textureGatherOffsets feature from GL, so just lower it for now. If hardware appears for this we can add another CAP to allow TG4 to take 4 offsets. v2: add component selection src and a cap to say hw can do it. (st can use to help control GL_ARB_gpu_shader5/GLSL 4.00). Add docs. v3: rename to SM5, add docs. Reviewed-by: Roland Scheidegger <sroland@vmware.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* clover: Pass buffer offsets to the driver in set_global_binding() v3Tom Stellard2014-02-244-10/+32
| | | | | | | | | | | | | | | The offsets will be stored in the handles parameter. This makes it possible to use sub-buffers. v2: - Style fixes - Add support for constant sub-buffers - Store handles in device byte order v3: - Use endian helpers Reviewed-by: Francisco Jerez <currojerez@riseup.net>
* radeonsi: Use SI_BIG_ENDIAN now that it existsTom Stellard2014-02-241-1/+1
| | | | Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
* r600g: Use util_cpu_to_le32() instead of bswap32() on big-endian systemsTom Stellard2014-02-243-3/+3
| | | | Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
* radeonsi: Use util_cpu_to_le32() instead of bswap32() on big-endian systemsTom Stellard2014-02-242-2/+2
| | | | Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
* util: Add util_cpu_to_le* helpersTom Stellard2014-02-241-0/+3
| | | | | Reviewed-by: Michel Dänzer <michel.daenzer@amd.com> Reviewed-by: Francisco Jerez <currojerez@riseup.net>
* util: Add util_bswap64() v3Tom Stellard2014-02-241-0/+16
| | | | | | | | | | | | v2: - Use __builtin_bswap64() - Remove unnecessary mask - Add util_le64_to_cpu() helper v3: - Remove unnecessary AC_SUBST Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
* configure.ac: Use AX_GCC_BUILTIN to check availability of __builtin_bswap32 v2Tom Stellard2014-02-241-1/+2
| | | | | | | v2: - Remove unnecessary AC_SUBST Reviewed-by: Matt Turner <mattst88@gmail.com>
* targets/opencl: resolve undefined symbols at link timeEmil Velikov2014-02-241-0/+1
| | | | | | | | Current automake build does not try to resolve undefined symbols thus we could end up with a broken library. Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Francisco Jerez <currojerez@riseup.net>
* gallium/targets: resolve undefined reference to pipe_loader_sw_probe_driEmil Velikov2014-02-243-0/+15
| | | | | | | | | | | | | With the introduction of the pipe_loader_sw_probe_dri helper we require the sw/dri winsys during linking stage despite it being unused by any of the targets. This will cause a minor increase in the resulting library which will be cleaned up via linker options with upcoming patches. v2: Link with libswdri.la only when available. Reported-and-tested-by: Tom Stellard <thomas.stellard@amd.com> (v1) Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
* pipe-loader: wrap pipe_loader_sw_probe_xlib within HAVE_PIPE_LOADER_XLIBEmil Velikov2014-02-247-7/+34
| | | | | | | | | | | | | | | | | | | The above function implies using the the xlib winsys, which has additional library dependencies that should not be forced. Make the software xlib pipe loader optional thus avoid all the dependency hell. A user that wishes to use the particular pipe-loader would need to set the following within configure.ac. enable_gallium_xlib_loader=yes v2: - Wrap sw/xlib/xlib_sw_winsys.h to handle compilation on systems lacking X11 headers. Spotted by Christian Prochaska. Tested-by: Tom Stellard <thomas.stellard@amd.com> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=75356 Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
* targets/gbm: exit gracefully if pipe_loader_drm_probe_fd is not availableEmil Velikov2014-02-241-3/+4
| | | | | | | | | | When one builds without gallium_drm_loader, the above function will not be available, thus we'll segfault in gallium_screen_create due to memory access violation. Tested-by: Tom Stellard <thomas.stellard@amd.com> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=75335 Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
* freedreno/a3xx/compiler: half-precision outputRob Clark2014-02-236-10/+130
| | | | | | | | | | | | | | | | | | | | Using generic shaders caused a measurable fps drop, which was isolated to use of full precision (vs half precision) output. This is an attempt to regain that lost performance by using half precision solid/blit shaders (when the output format is not float32). Note: for the built-in shaders, I would not expect them to be register starved. And in fact it is the solid frag shader that seems to have the biggest impact. So I suspect you get double the pixel pipe units (or half the cycles) when the output is half precision. So there may be some gain to using half precision output for application shaders as well, even though the rest of register usage is still full precision. But for half precision to work for more complex shaders, we need to deal with some constraints, like cat2 needing same precision for it's two src registers. So for now it is not enabled by default except for the built-in shaders. Signed-off-by: Rob Clark <robclark@freedesktop.org>
* freedreno/a3xx: add shader variantsRob Clark2014-02-2310-196/+283
| | | | | | | | | Start putting in place infrastructure to deal with multiple shader variants. Initially we'll use this for two sided color (frag) and binning pass (vert) shaders. Possibly need for others later (such as YUV vs RGB eglImage?). Signed-off-by: Rob Clark <robclark@freedesktop.org>
* freedreno/a3xx/compiler: collapse nop's with repeatRob Clark2014-02-232-0/+15
| | | | | | | | | Easier than making more extensive use of rpt, and the more compact shaders seem to bring some bit of performance boost. (Perhaps repeat flag benefits are more than just instruction cache, possibly it saves on instruction decode as well?) Signed-off-by: Rob Clark <robclark@freedesktop.org>
* freedreno/a3xx: drop hand-coded blit/solid shadersRob Clark2014-02-2310-287/+181
| | | | | | | | | Instead in the common code, construct these shaders from TGSI. For now we let a2xx keep it's hand coded shaders, as it's compiler isn't quite up to the job yet. All the same it is a net drop in code size and gets rid of special cases. Signed-off-by: Rob Clark <robclark@freedesktop.org>
* freedreno/lowering: cleanup apiRob Clark2014-02-235-24/+138
| | | | | | | | Make things configurable, and tweak the API a bit to avoid an extra tgsi_shader_scan(). Getting closer to something generic which can be moved out of freedreno and shaderd by other drivers. Signed-off-by: Rob Clark <robclark@freedesktop.org>