aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium
Commit message (Collapse)AuthorAgeFilesLines
* draw: Save original driver functions earlier.José Fonseca2014-01-232-14/+14
| | | | | | | | Otherwise they will be NULL when stage destroy is invoked prematurely, (i.e, on out of memory). Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]>
* svga: minor code movement in svga_tgsi_insn.cBrian Paul2014-01-231-47/+47
| | | | Reviewed-by: José Fonseca <[email protected]>
* svga: whitespace, formatting fixes in svga_state_framebuffer.cBrian Paul2014-01-231-31/+26
| | | | Reviewed-by: José Fonseca <[email protected]>
* svga: simplify common immediate value constructionBrian Paul2014-01-232-91/+115
| | | | | | | Use some new helper functions to make the code much more readable. And fix wrong value for XPD's w result. Reviewed-by: José Fonseca <[email protected]>
* svga: add comments, etc to svga_tgsi_insn.c codeBrian Paul2014-01-231-31/+163
| | | | | | To make things a little easier to understand for newcomers. Reviewed-by: José Fonseca <[email protected]>
* svga: assorted cleanups in shader codeBrian Paul2014-01-231-1/+0
| | | | Reviewed-by: José Fonseca <[email protected]>
* svga: rename shader_result -> variantBrian Paul2014-01-238-142/+158
| | | | | | | To be more consisten with other parts of gallium. Plus, update/add various comments. Reviewed-by: José Fonseca <[email protected]>
* radeon: More missing stdio.h includes.José Fonseca2014-01-232-0/+3
|
* os/os_thread: Revert pipe_barrier pre-processing logic.José Fonseca2014-01-231-1/+1
| | | | | Whitelist platforms instead of blacklisting, as several pthread implementations are missing pthread_barrier_t, in particular MacOSX.
* radeon: Adding missing stdio.h include.José Fonseca2014-01-231-0/+1
| | | | | | Became apparent with the C11 thread changes. Unfortunately I didn't have all dependencies to build the driver, and only noticed this issue on build server.
* gallium: Use C11 thread abstractions.José Fonseca2014-01-235-235/+37
| | | | | | | Note that PIPE_ROUTINE now returns an int. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* os: Remove pipe_static_condvar.José Fonseca2014-01-231-12/+0
| | | | | | Never used. Reviewed-by: Brian Paul <[email protected]>
* gallium/util: util_format_srgb should not return FORMAT_NONE for sRGB formatsMarek Olšák2014-01-231-0/+3
| | | | | | | | | This fixes a serious regression introduced in 4e549ddb500cf677b6fa16d9ebdfa67cc23da097. Cc: 9.2 10.0 <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* gallium: remove PIPE_CAP_SCALED_RESOLVEMarek Olšák2014-01-2312-14/+0
| | | | | | | If any driver doesn't support this, it can use a blit after resolving the samples. Reviewed-by: Brian Paul <[email protected]>
* radeonsi: use hardware scissors correctlyMarek Olšák2014-01-231-35/+20
| | | | | | | | | | | | Use the WINDOW and VPORT scissors for the framebuffer and scissor test, respectively. The other two scissors are disabled (they cover the max fb size). We actually have 16 VPORT scissors, which will map well to ARB_viewport_array. Also, we don't need to write SC_WINDOW_OFFSET with this commit, because it's disabled everywhere. Reviewed-by: Alex Deucher <[email protected]>
* radeonsi: handle R600_CONTEXT_PS_PARTIAL_FLUSH in si_emit_cache_flushMarek Olšák2014-01-231-1/+2
| | | | | | For consistency only, This is unused by radeonsi currently. Reviewed-by: Michel Dänzer <[email protected]>
* r600g,radeonsi: if discarding whole buffer range, discard whole resource insteadMarek Olšák2014-01-231-0/+8
| | | | | | | Also set the unsynchronized flag if the whole resource was discarded to avoid doing buffer-busy checks again. Reviewed-by: Michel Dänzer <[email protected]>
* gallium/u_upload_mgr: don't expose u_upload_flushMarek Olšák2014-01-232-22/+4
| | | | | | | It's unused and shouldn't be used at all in my opinion. If some driver doesn't support the unsynchronized flag, u_upload_mgr should avoid the synchronization by other means, e.g. by using the DONTBLOCK flag.
* gallium/hud: just unmap the upload vertex buffer instead of recreating itMarek Olšák2014-01-231-1/+1
|
* gallium/vl: use u_upload_mgr to upload vertices for vl_compositorMarek Olšák2014-01-232-32/+20
| | | | | | | This is the recommended way for streaming vertices. Always use this if you need to upload vertices every frame. Reviewed-by: Christian König <[email protected]>
* clover: Don't crash on NULL global buffer objects.Jan Vesely2014-01-221-11/+23
| | | | | | | | | | | | | | | | | | Specs say "If the argument is a buffer object, the arg_value pointer can be NULL or point to a NULL value in which case a NULL value will be used as the value for the argument declared as a pointer to __global or __constant memory in the kernel." So don't crash when somebody does that. v2: Insert NULL into input buffer instead of buffer handle pair Fix constant_argument too Drop r600 driver changes v3: Fix inserting NULL pointer Signed-off-by: Jan Vesely <[email protected]> Reviewed-by: Francisco Jerez <[email protected]>
* llvmpipe: dump geometry shaders when using LP_DEBUG=tgsiDave Airlie2014-01-221-1/+4
| | | | | | | for consistency with vs and fs dumpers. Reviewed-by: Brian Paul <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* svga: implement TGSI_PROPERTY_FS_COLOR0_WRITES_ALL_CBUFSBrian Paul2014-01-214-8/+47
| | | | | | | | | | | | Fixes several colorbuffer tests, including piglit "fbo-drawbuffers-none" for "gl_FragColor" and "glDrawPixels" cases. v2: rework patch to only avoid creating extra shader variants when TGSI_PROPERTY_FS_COLOR0_WRITES_ALL_CBUFS is not specified. Per Jose. Use a write_color0_to_n_cbufs key field to replicate color0 to N color buffers only when N > 0 and WRITES_ALL_CBUFS is set. Reviewed-by: José Fonseca <[email protected]>
* svga: rename color output variablesBrian Paul2014-01-213-9/+10
| | | | | | Just to be bit more readable. Reviewed-by: José Fonseca <[email protected]>
* svga: fix clearing for null color buffersBrian Paul2014-01-211-3/+3
| | | | | | Fixes piglit "fbo-drawbuffers-none glClear" test. Reviewed-by: José Fonseca <[email protected]>
* draw: fix points with negative w coords for d3d style point clippingRoland Scheidegger2014-01-211-2/+6
| | | | | | | | | | | | | Even with depth clipping disabled, vertices which have negative w coords must be discarded. And since we don't have a proper guardband implementation yet (relying on driver to handle all values except infs/nans in rasterization for such points) we need to kill them off manually (as they can end up with coordinates inside viewport otherwise). v2: use 0.0f instead of 0 (spotted by Brian). Reviewed-by: Jose Fonseca <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* draw: use some cast wrappers in draw_pt_fetch_shade_pipeline*.cBrian Paul2014-01-202-19/+29
| | | | Trivial.
* draw: whitespace and formatting fixes in draw_pt_fetch_shade_pipeline*.cBrian Paul2014-01-202-81/+105
| | | | Trivial.
* draw: fix incorrect vertex size computation in LLVM drawing codeBrian Paul2014-01-202-11/+30
| | | | | | | | | | | | | | We were calling draw_total_vs_outputs() too early. The call to draw_pt_emit_prepare() could result in the vertex size changing. So call draw_total_vs_outputs() after draw_pt_emit_prepare(). This fix would seem to be needed for the non-LLVM code as well, but it's not obvious. Instead, I added an assertion there to try to catch this problem if it were to occur there. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=72926 Cc: 10.0 <[email protected]> Reviewed-by: José Fonseca <[email protected]>
* draw: clean up d3d style point clippingRoland Scheidegger2014-01-205-25/+42
| | | | | | | | | | | | | | | | | | | | Instead of skipping x/y clipping completely if there's point_tri_clip points use guard band clipping. This should be easier (previously we could not disable generating the x/y bits in the clip mask for llvm path, hence requiring custom clip path), and it also allows us to enable this for tris-as-points more easily too (this would require custom tri clip filtering too otherwise). Moreover, some unexpected things could have happen if there's a NaN or just a huge number in some tri-turned-point, as the driver's rasterizer would need to deal with it and that might well lead to undefined behavior in typical rasterizers (which need to convert these numbers to fixed point). Using a guardband should hence be more robust, while "usually" guaranteeing the same results. (Only "usually" because unlike hw guardbands draw guardband is always just twice the vp size, hence small vp but large points could still lead to different results.) Unfortunately because the clipmask generated is completely unaffected by guard band clipping, we still need a custom clip stage for points (but not for tris, as the actual clipping there takes guard band into account). Reviewed-by: Jose Fonseca <[email protected]>
* softpipe: fix crash when accessing null colorbufferBrian Paul2014-01-201-1/+4
| | | | | | | Fixes piglit fbo-missing-attachment-blit test. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=73755 Reviewed-by: Roland Scheidegger <[email protected]>
* st/vdpau: s/surface/resource/ to fix compiler warningBrian Paul2014-01-201-1/+1
| | | | Reviewed-by: Christian König <[email protected]>
* i915,r200,radeon,vega: Change vendor from "VMware, Inc." to "Mesa Project".José Fonseca2014-01-202-2/+2
| | | | | | | | | | These are components which were originally developed by Tungsten Graphics, which was in turn acquired by VMware, but are de facto now being maintained by third-party contributors of the Mesa open-source community. This matches what's reported by swrast driver and a few other components. Suggested by Ian Romanick.
* st/vdpau: check surface params before creating surfacesIlia Mirkin2014-01-193-0/+21
| | | | | Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Christian König <[email protected]>
* st/vdpau: fix bogus error handling in output/bitmap creationIlia Mirkin2014-01-192-34/+35
| | | | | Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Christian König <[email protected]>
* st/vdpau: don't return a device if the screen doesn't support NPOTIlia Mirkin2014-01-191-0/+5
| | | | | | | | | | NV3x cards don't support NPOT textures. Technically this restriction could be worked around, but since it also doesn't expose any video decoding hw, just turn it off entirely. Signed-off-by: Ilia Mirkin <[email protected]> Cc: 10.0 <[email protected]> Reviewed-by: Christian König <[email protected]>
* pipe-loader: Fix buildArmin K2014-01-191-0/+1
| | | | | | | pipe_loader_drm.c: In function 'pipe_loader_drm_probe_fd': pipe_loader_drm.c:120:4: error: implicit declaration of function 'loader_get_pci_id_for_fd' [-Werror=implicit-function-declaration] Reviewed-by: Emil Velikov <[email protected]>
* nv50: drop obsolete check from error pathEmil Velikov2014-01-181-9/+7
| | | | | | | At 'out_err' the nv50_context has been calloc-ated. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]>
* nv50: assert before trying to out-of-bounds access framebuffer.cbufsEmil Velikov2014-01-181-0/+1
| | | | | Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]>
* nv50: assert before trying to out-of-bounds access samplersEmil Velikov2014-01-182-0/+4
| | | | | Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]>
* nv50: assert before trying to out-of-bounds access texturesEmil Velikov2014-01-183-0/+5
| | | | | Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]>
* nv50: pass vtxbuf index as unsignedEmil Velikov2014-01-181-1/+1
| | | | | | | | The index passed to the function is already unsigned, and internally we threat it as unsigned. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]>
* nv50: assert before trying to out-of-bounds access vtxbufEmil Velikov2014-01-183-1/+14
| | | | | Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]>
* nv50: typecast the result of ffs() to unsignedEmil Velikov2014-01-181-1/+1
| | | | | Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]>
* nv50: assert before trying to out-of-bounds access constbufEmil Velikov2014-01-183-0/+4
| | | | | Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]>
* nv50: access only the available amount of constbufEmil Velikov2014-01-181-1/+1
| | | | | | | | | | The textures array is defined as a number of NV50_MAX_PIPE_CONSTBUFS per shader stage. Currently the nv50 driver handles only 3 shader stages, thus we wreck chaos when accessing array-out-of-bounds. Cc: 9.1 9.2 10.0 <[email protected]> Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]>
* nv50: access only the available amount of texturesEmil Velikov2014-01-181-1/+1
| | | | | | | | | | | | The textures array is defined as a number of PIPE_MAX_SAMPLERS per shader stage. Currently nv50 driver handles only 3 shader stages, thus we wreck chaos when accessing array-out-of-bounds. Fixes a segfault in piglit/bin/arb_texture_buffer_object-data-sync -fbo -auto Cc: 9.1 9.2 10.0 <[email protected]> Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]>
* pipe-loader: add support for non-pci (platform) devicesEmil Velikov2014-01-183-0/+5
| | | | | | | | | Culled out of the "loader: refactor duplicated code into loader util lib" patch by Rob Clark. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Rob Clark <[email protected]> Reviewed-by: Kristian Høgsberg <[email protected]>
* pipe-loader: use loader util libEmil Velikov2014-01-182-81/+14
| | | | | | Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Rob Clark <[email protected]> Reviewed-by: Kristian Høgsberg <[email protected]>
* st/egl: use loader util libEmil Velikov2014-01-183-42/+6
| | | | | | Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Rob Clark <[email protected]> Reviewed-by: Kristian Høgsberg <[email protected]>