summaryrefslogtreecommitdiffstats
path: root/src/gallium
Commit message (Collapse)AuthorAgeFilesLines
* u_blitter: don't create illegal shaders for 1D/3D/RECT/CUBE MSAADave Airlie2013-03-041-0/+5
| | | | | Reviewed-by: Marek Olšák <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* vdpau-softpipe: Build correct source file - vl_winsys_xsp.cJakub Bogusz2013-03-031-1/+1
| | | | | | Copy-and-paste problem introduced by commit 7f24483e. Reviewed-by: Matt Turner <[email protected]>
* r600g: Check comp_mask before merging export instructionsVincent Lejeune2013-03-031-0/+1
| | | | | Fixes a llvm uncovered (rare) bug where consecutive exports were merged even if they have incompatible mask.
* r600g: fix check_and_set_bank_swizzle for caymanVadim Girlin2013-03-031-7/+3
| | | | | Tested-by: Vincent Lejeune <vljn at ovi.com> Reviewed-by: Vincent Lejeune <vljn at ovi.com>
* tgsi: add texel offsets and derivatives to sampler interfaceRoland Scheidegger2013-03-023-80/+194
| | | | | | | | | | | | | | | | | | | | | | | | Something I never got around to implement, but this is the tgsi execution side for implementing texel offsets (for ordinary texturing) and explicit derivatives for sampling (though I guess the ordering of the components for the derivs parameters is debatable). There is certainly a runtime cost associated with this. Unless there are different interfaces used depending on the "complexity" of the texture instructions, this is impossible to avoid. Offsets are always active (I think checking if they are active or not is probably not worth it since it should mostly be an add), whereas the sampler_control is extended for explicit derivatives. For now softpipe (the only user of this) just drops all those new values on the floor (which is the part I never implemented...). Additionally this also fixes (discovered by accident) inconsistent projective divide for the comparison coord - the code did do the projection for shadow2d targets, but not shadow1d ones. This also drops checking for projection modifier on array targets, since they aren't possible in any extension I know of (hence we don't actually know if the array layer should also be divided or not). Reviewed-by: Brian Paul <[email protected]>
* draw: additional fix for the no-position case with llvmRoland Scheidegger2013-03-021-20/+20
| | | | | | | | Similar fix to what is done for the non-llvm case, we could otherwise still hit the stages (near certainly with gs) which crash. It is probably a much better idea to skip trying to draw at that point anyway. Reviewed-by: Brian Paul <[email protected]>
* draw: fix no position output in non-llvm pipeline.Roland Scheidegger2013-03-021-19/+19
| | | | | | | | | | It seems easiest (and best) if we simply skip all the later stages (after stream output). (This is different to the llvm case at least for now where we will simply try to render garbage, though both behaviors should be correct.) Fixes piglit glsl-1.40-tf-no-position with softpipe. Reviewed-by: Brian Paul <[email protected]>
* draw/llvm: skip clipping and viewport transform if there's no position outputRoland Scheidegger2013-03-021-26/+31
| | | | | | | | | | | | | With glsl 1.40 writing position is not required (useful for transform feedback, though in fact it's still possible to rasterize such geometry even if the results aren't too well defined). Prevents crashes in that case. Fixes piglit glsl-1.40-tf-no-position. Not quite sure this is 100% correct as it also skips clipdistance clipping which could still work (but not sure if the result would really be needed?) Reviewed-by: Jose Fonseca <[email protected] Reviewed-by: Brian Paul <[email protected]>
* llvmpipe: don't assert on illegal surface creation.Roland Scheidegger2013-03-022-4/+4
| | | | | | | | | | | | Since c8eb2d0e829d0d2aea6a982620da0d3cfb5982e2 llvmpipe checks if it's actually legal to create a surface. The opengl state tracker doesn't quite obey this so for now just warn instead of assert. Also warn instead of disabled assert when creating sampler views (same reasoning). Addresses https://bugs.freedesktop.org/show_bug.cgi?id=61647. Reviewed-by: Jose Fonseca <[email protected]>
* llvmpipe: bump glsl version to 140Roland Scheidegger2013-03-022-12/+5
| | | | | | | | | | | | | texel offsets should have been the last missing feature for 130, and in fact 140 as well (last there were texture buffers). In any case we still don't do OpenGL 3.0 (missing MSAA which will be difficult, plus EXT_packed_float, ARB_depth_buffer_float and EXT_framebuffer_sRGB). v2: bump to 140 instead - we have everything except we crash when not writing to gl_Position (but softpipe crashes as well) so let's just say this is a bug instead. Also (by Dave Airlie's suggestion) update llvm-todo.txt. Reviewed-by: Jose Fonseca <[email protected]>
* gallivm: add support for texel offsets for ordinary texturing.Roland Scheidegger2013-03-023-53/+210
| | | | | | | | | | | | | | | | | | This was previously only handled for texelFetch (much easier). Depending on the wrap mode this works slightly differently (for somewhat efficient implementation), hence have to do that separately in all roughly 137 places - it is easy if we use fixed point coords for wrapping, however some wrapping modes are near impossible with fixed point (the repeat stuff) hence we have to normalize the offsets if we can't do the wrapping in unnormalized space (which is a division which is slow but should still be much better than the alternative, which would be integer modulo for wrapping which is just unusable). This should still give accurate results in all cases that really matter, though it might be not quite conformant behavior for some apis (but we have much worse problems there anyway even without using offsets). (Untested, no piglit test.) Reviewed-by: Jose Fonseca <[email protected]>
* svga: always link with C++Brian Paul2013-03-011-5/+1
| | | | | | | | | Even when we don't have LLVM since there's other C++ code in the resulting DRI driver object. Note: This is a candidate for the stable branches. Reviewed-by: Matt Turner <[email protected]>
* winsys/radeon: Only add bo to hash table when creating flinkMartin Andersson2013-03-011-4/+4
| | | | | | | | | | | | | The problem is that we mix bo handles and flinked names in the hash table. Because kms type handles are not flinked they should not be added to the hash table. If we do that we will sooner or later get a situation where we will overwrite a correct entry because the bo handle was the same as a flinked name. Note: this is a candidate for the stable branches. Reviewed-by: Jerome Glisse <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
* r600g: enable CP DMA on 6xxAlex Deucher2013-03-011-1/+1
| | | | | | Tested across several 6xx parts, no piglit regressions. Signed-off-by: Alex Deucher <[email protected]>
* r600g: don't require dword alignment with CP DMA for buffer transfersMarek Olšák2013-03-015-11/+9
| | | | | | which is a leftover from the days when we used streamout to copy buffers Tested-by: Andreas Boll <[email protected]>
* r600g: always map uninitialized buffer range as unsynchronizedMarek Olšák2013-03-016-0/+45
| | | | | | | | | | Any driver can implement this simple and efficient optimization. Team Fortress 2 hits it always. The DISCARD_RANGE codepath is not even used with TF2 anymore, so we avoid a ton of useless buffer copies. Tested-by: Andreas Boll <[email protected]> NOTE: This is a candidate for the 9.1 branch.
* gallium/util: add helper code for 1D integer rangeMarek Olšák2013-03-011-0/+89
| | | | | | | | | | Reviewed-by: Brian Paul <[email protected]> v2: cosmetic changes based on Brian's review Tested-by: Andreas Boll <[email protected]> NOTE: This is a candidate for the 9.1 branch. (the next patch depends on it)
* r600g: cleanup deprecated register tablesMarek Olšák2013-03-013-45/+14
| | | | | | These registers are either already emitted elsewhere or moved to start_cs. Tested-by: Andreas Boll <[email protected]>
* r600g: unify vgt statesMarek Olšák2013-03-015-26/+9
| | | | | | | The states were split because we thought it caused a hardlock. Now we know the hardlock was caused by something else and has since been fixed. Tested-by: Andreas Boll <[email protected]>
* r600g: flush and invalidate htile cache when appropriateMarek Olšák2013-03-016-1/+21
| | | | | | Tested-by: Andreas Boll <[email protected]> NOTE: This is a candidate for the 9.1 branch.
* r600g: atomize streamout enablingMarek Olšák2013-03-019-87/+96
| | | | | | | | | | | | This doesn't fix any issue we know of, but there indeed is a week spot in draw_vbo where streamout can fail. After streamout is enabled, the need_cs_space call can flush the context, which causes the streamout to be disabled right after it was enabled and bad things happen. One way to fix it is to atomize the beginning part, so that no context flush can happen between streamout enabling and the first drawing. Tested-by: Andreas Boll <[email protected]>
* r600g: use async DMA with a non-zero src offsetMarek Olšák2013-03-011-1/+1
| | | | | | | | probably a typo Tested-by: Andreas Boll <[email protected]> NOTE: This is a candidate for the 9.1 branch.
* r600g: pad the DMA CS to a multiple of 8 dwordsMarek Olšák2013-03-011-2/+14
| | | | | | Tested-by: Andreas Boll <[email protected]> NOTE: This is a candidate for the 9.1 branch.
* clover: Fix build with LLVM 3.3 v2Tom Stellard2013-02-282-9/+40
| | | | | | | | v2: - Fix order that the clang libraries are passed to the linker to avoid missing symbol errors. Acked-by: Francisco Jerez <[email protected]>
* r600g: workaround hyperz lockup on evergreenJerome Glisse2013-02-284-2/+23
| | | | | | | | | | | This work around disable hyperz if write to zbuffer is disabled. Somehow using hyperz when not writting to the zbuffer trigger GPU lockup. See : https://bugs.freedesktop.org/show_bug.cgi?id=60848 Candidate for 9.1 Signed-off-by: Jerome Glisse <[email protected]>
* llvmpipe: check buffers in llvmpipe_is_resource_referenced.Roland Scheidegger2013-02-283-8/+24
| | | | | | | | | | | Now that buffers can be used as textures or render targets make sure they aren't skipped. Fix suggested by Jose Fonseca. v2: added a couple of assertions so we can actually guarantee we check the resources and don't skip them. Also added some comments that this is actually a lie due to the way the opengl buffer api works.
* llvmpipe: support rendering to buffer render targets.Roland Scheidegger2013-02-284-47/+61
| | | | | | | | | | Unfortunately not usable from OpenGL, and no cap bit. Pretty similar to a 1d texture, though allows specifying a start element. v2: also fix up renderbuffer width (which will get promoted to fb width) to be the number of elements Reviewed-by: Jose Fonseca <[email protected]>
* util: fix issues with util_clear_render_target.Roland Scheidegger2013-02-281-9/+46
| | | | | | | | For PIPE_BUFFER we need coord adjustments for the transfer. And for pure integer formats util_pack_color just crashes, need to handle that differently due to clear colors being ints/uints. Reviewed-by: Jose Fonseca <[email protected]>
* softpipe/draw/tgsi: simplify driver/tgsi sampler interfaceRoland Scheidegger2013-02-2815-189/+249
| | | | | | | | | | | | | | | Use a single sampler adapter instead of per-sampler-unit samplers, and just pass along texture unit and sampler unit in the calls. The reason is that for dx10-style sample opcodes pre-wired samplers including all the texture state aren't really feasible (and for sample_i/sviewinfo we don't even have samplers). Of course right now softpipe doesn't actually do anything more than just look up all its pre-wired per-texunit/per-samplerunit sampler as it did before so this doesn't really achieve much except one more function call, however this is now all softpipe's fault (fixing that in a way which doesn't suck is still an unsolved problem). Reviewed-by: Jose Fonseca <[email protected]>
* gallivm: fix mis-matching AOS instruction emissionMaxence Le Doré2013-02-271-1/+1
| | | | Signed-off-by: José Fonseca <[email protected]>
* radeonsi: Fix memory leak in si_set_constant_buffer.Vinson Lee2013-02-261-0/+1
| | | | | | | | Fixes resource leak defect reported by Coverity. Signed-off-by: Vinson Lee <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Alex Deucher <[email protected]>
* st/vega: Fix memory leak in combine_shaders.Vinson Lee2013-02-261-1/+3
| | | | | | | Fixes resource leak defect reported by Coverity. Signed-off-by: Vinson Lee <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* r600g: add missing emit_flush for R600_CONTEXT_FLUSH_AND_INV caseAlex Deucher2013-02-261-0/+1
| | | | | | | | We set the cp_coher_cntl bits but never emit them. Signed-off-by: Alex Deucher <[email protected]> Reviewed-by: Jerome Glisse <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* r600g: synchronize streamout buffers on r6xx too (v3)Alex Deucher2013-02-261-1/+1
| | | | | | | | | | | Streamout buffers need to be synchronized on r6xx as well. v2: Add DEST flush as well. v3: drop DEST flush Signed-off-by: Alex Deucher <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* winsys/null: fix var typo templet->templatBrian Paul2013-02-261-1/+1
|
* svga: fix comment typosBrian Paul2013-02-261-1/+1
|
* r300g: implement 3D transfersMarek Olšák2013-02-261-2/+18
| | | | Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=61351
* gallium/util: add helper util_max_layer from r600gMarek Olšák2013-02-267-47/+31
|
* llvmpipe: (trivial) get rid of old function prototypes.Roland Scheidegger2013-02-251-7/+0
| | | | | llvmpipe_init_screen/context_texture_funcs have long been replaced with the respective "resource" funcs.
* draw: make sure pipeline is revalidated when sampler views or samplers change.Roland Scheidegger2013-02-252-1/+6
| | | | | | | | | | | Since with llvm execution parts of sampler view and sampler state is baked into the shader, we need to revalidate otherwise the wrong shader might get used. (Not completely sure but I think this would not be required for non-llvm case, along with everything else in these functions.) This caused bugs in piglit arb_texture_buffer_object-formats, because we never noticed that the view format changed. Reviewed-by: Jose Fonseca <[email protected]>
* llvmpipe: support GL_ARB_texture_buffer_object/GL_ARB_texture_buffer_rangeRoland Scheidegger2013-02-2512-115/+191
| | | | | | | | | | | | | | | | | | | | This also fixes not honoring first/last_layer view parameters for array textures, plus not honoring last_level view parameter for all textures (neither is really used by OpenGL). This mostly passes piglit arb_texture_buffer_object tests (it needs, however, glsl 140 version override, plus GL 3.1 override, the latter only because mesa does not allow ARB_tbo in non-core contexts). Most arb_texture_buffer_object tests pass, with the exception of arb_texture_buffer_object-formats. With "arb" parameter it passes most weirdo formats before it segfaults in the state tracker, this looks to be some issue with using legacy formats in core context (fails the same in softpipe). With "core" parameter it passes with "fs", however fails with "vs" (for most formats). This will be fixed later (debugging shows we're completely missing the shader recompile depending on format). v2: based on Jose's feedback, fix comments, variable/function names. Reviewed-by: Jose Fonseca <[email protected]>
* vl: Fix off-by-one error in device_name_length allocation.Vinson Lee2013-02-231-2/+1
| | | | | | | | Fixes out-of-bounds write reported by Coverity. Signed-off-by: Vinson Lee <[email protected]> Reviewed-by: Christian König <[email protected]> Reviewed-by: Michel Dänzer <[email protected]>
* llvmpipe: Fix creation of shared and scanout textures.John Kåre Alsaker2013-02-231-1/+3
| | | | | | NOTE: This is a candidate for the stable branches. Signed-off-by: José Fonseca <[email protected]>
* util/u_blitter: Set pipe_sampler_state::normalized_coords correctly.José Fonseca2013-02-231-4/+22
| | | | | | | | | We might want to revisit the normalized_coords semantics, but this is the current expected behavior. Fixes fdo bug 61091. Reviewed-by: Brian Paul <[email protected]>
* svga: remove some extraneous whitespaceBrian Paul2013-02-231-8/+0
|
* util/dump: Use static assertion to detect string table size mismatches.José Fonseca2013-02-231-1/+18
| | | | | | | | Suggested by Brian Paul. Could probably be extended to other enums. Reviewed-by: Brian Paul <[email protected]>
* st/xvmc/tests: Ensure colorkey is initialized.Vinson Lee2013-02-221-0/+4
| | | | | | | Fixes uninitialized scalar variable defect reported by Coverity. Signed-off-by: Vinson Lee <[email protected]> Reviewed-by: Christian König <[email protected]>
* st/vdpau: Fix memory leak in vlVdpBitmapSurfaceCreate.Vinson Lee2013-02-221-0/+1
| | | | | | | Fixes resource leak defect reported by Coverity. Signed-off-by: Vinson Lee <[email protected]> Reviewed-by: Christian König <[email protected]>
* st/vdpau: Fix memory leak in vlVdpOutputSurfaceCreate.Vinson Lee2013-02-221-0/+1
| | | | | | | Fixes resource leak defect reported by Coverity. Signed-off-by: Vinson Lee <[email protected]> Reviewed-by: Christian König <[email protected]>
* llvmpipe: rename polygon offset fields to something more specificBrian Paul2013-02-222-8/+11
| | | | Reviewed-by: Jose Fonseca <[email protected]>