summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary
Commit message (Collapse)AuthorAgeFilesLines
* util: add dual blend helper function (v2)Dave Airlie2012-04-131-0/+26
| | | | | | | | This is just a function to tell if a certain blend mode requires dual sources. v2: move to inlines as per Brian's suggestion Signed-off-by: Dave Airlie <[email protected]>
* util: fix uninitialized tableDylan Noblesmith2012-04-131-4/+5
| | | | | | | | | | | | | | | | | | | Most of the 256 values in the 'generic_to_slot' table were supposed to be initialized with the default value 0xff, but were left at zero (from CALLOC_STRUCT()) instead. Noticed by clang: u_linkage.h:60:31: warning: argument to 'sizeof' in 'memset' call is the same expression as the destination; did you mean to provide an explicit length? [-Wsizeof-pointer-memaccess] memset(table, 0xff, sizeof(table)); ~~~~~ ^~~~~ Also fix a signed/unsigned comparison and a comment typo here. NOTE: This is a candidate for the 8.0 branch. Reviewed-by: Brian Paul <[email protected]>
* util: fix undefined behaviorDylan Noblesmith2012-04-131-5/+10
| | | | | | | | | container_of() can legally return anything, even invalid addresses that cause segfaults, when 'sample' is an uninitialized pointer. Bug exposed by clang. NOTE: This is a candidate for the 8.0 branch.
* cso: unreference saved vertex buffers when restoringMarek Olšák2012-04-121-0/+8
| | | | Reviewed-by: Brian Paul <[email protected]>
* tgsi: Fix conflict with fortify printf redirect in glibc.Johannes Obermayr2012-04-071-17/+17
| | | | | | | | | | | | | | | | Fixes clang error: tgsi/tgsi_dump.c:72:12: error: no member named '__printf_chk' in 'struct dump_ctx' ctx->printf( ctx, "%u", e ); ~~~ ^ /usr/include/bits/stdio2.h:109:3: note: expanded from macro 'printf' __printf_chk (__USE_FORTIFY_LEVEL - 1, __VA_ARGS__) ^ Idea stolen from: http://www.mail-archive.com/[email protected]/msg210998.html Reviewed-by: Brian Paul <[email protected]>
* gallivm: Updated lp_build_log2_approx to use a more accurate polynomial.James Benton2012-04-052-32/+41
| | | | | | | Tested with lp_test_arit with 100% passes and piglit tests with 100% pass for log but some tests still fail for pow. Signed-off-by: José Fonseca <[email protected]>
* gallivm: Updated lp_build_polynomial to compute odd and even terms ↵James Benton2012-04-051-7/+25
| | | | | | separately to decrease data dependency for faster runtime. Signed-off-by: José Fonseca <[email protected]>
* u_blitter: don't use user buffersMarek Olšák2012-04-031-18/+23
|
* gallivm: Pass in a MCInstrInfo to createMCInstPrinter on llvm-3.1.Vinson Lee2012-04-031-1/+7
| | | | | | | llvm-3.1svn r153860 makes MCInstrInfo available to the MCInstPrinter. Signed-off-by: Vinson Lee <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* gallivm: Maximum loop iterationsJames Benton2012-04-033-3/+45
| | | | | | | | Limits maximum loop iterations in a TGSI shader to prevent infinite loops from occurring, any iteration in any loop counts towards this limit Signed-off-by: José Fonseca <[email protected]>
* gallivm: Simplify/reorder minimax helper.José Fonseca2012-04-031-10/+15
|
* gallium/postprocess: document serious issue causing undefined behaviorMarek Olšák2012-03-301-0/+4
|
* gallium/util: add helper function util_query_clear_resultMarek Olšák2012-03-301-0/+30
|
* gallivm: Fix method overriding in raw_debug_ostream.Vinson Lee2012-03-281-3/+3
| | | | | | | Use matching type qualifers to avoid method hiding. Signed-off-by: Vinson Lee <[email protected]> Reviewed-by: José Fonseca <[email protected]>
* draw: fix missing immediates bug in polygon stipple codeBrian Paul2012-03-281-0/+5
| | | | | | | | The function that counts the number of TGSI immediates also needs to emit the immediates. This fixes assorted failures when using polygon stipple with fragment shaders that have their own immediates. NOTE: This is a candidate for the 8.0 branch.
* vl: move winsys helper out of winsys directoryChristian König2012-03-283-0/+639
| | | | | | | | | They aren't winsys of their own, just help dealing with them. v2: add some more comments in vl_winsys.h Signed-off-by: Christian König <[email protected]>
* gallivm: Use InitializeNativeTargetDisassembler().ojab2012-03-271-1/+3
| | | | | | To initialize only native LLVM Disassembler on LLVM >= 3.1. Signed-off-by: José Fonseca <[email protected]>
* gallivm: Fix createOProfileJITEventListener namespace with llvm-3.1.Vinson Lee2012-03-141-0/+4
| | | | | | | | | llvm-3.1svn r152620 refactored the OProfile profiling code. createOProfileJITEventListener was moved from the llvm namespace to the llvm::JITEventListener namespace. Signed-off-by: Vinson Lee <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* vl/mpeg12: make bitstream decoder more robustChristian König2012-03-092-1/+2
| | | | | | Just another xine workaround. Signed-off-by: Christian König <[email protected]>
* vl/video_buffer: add YUYV and UYVY supportChristian König2012-03-091-16/+59
| | | | | | | | | | This gets xine working with VDPAU. v2: some minor bugfixes. v3: create the resource with the subsampled format to avoid tilling problems Signed-off-by: Christian König <[email protected]>
* gallivm: add support for R8G8_R8B8 and G8R8_B8R8 formatsChristian König2012-03-091-0/+42
| | | | | | Just to keep lp_test_format happy. Signed-off-by: Christian König <[email protected]>
* gallium: add R8G8_R8B8 and G8R8_B8R8 formatsChristian König2012-03-093-0/+96
| | | | | | | v2: simplify implementation by using correct swizzle v3: fix mix with successor patch Signed-off-by: Christian König <[email protected]>
* u_format: fix a comment about subsampled formatsChristian König2012-03-091-1/+1
| | | | Signed-off-by: Christian König <[email protected]>
* vl/video_buffer: add YUVA and VUYA supportChristian König2012-03-081-0/+20
| | | | Signed-off-by: Christian König <[email protected]>
* svga: fix the rasterizer state resetsZack Rusin2012-03-071-0/+15
| | | | | | | | | | | draw module calls back into the driver and sets certain parts of the state to whatever it needs, unfortunately unless you get the ordering of calls to draw just right you'll end up reseting your own driver state. That's what was happening to us draw module would under certain conditions reset our own driver state. Reviewed-by: Brian Paul <[email protected]>
* gallivm: Pass in a MCRegisterInfo to MCInstPrinter on llvm-3.1.Vinson Lee2012-03-061-1/+12
| | | | | | | | llvm-3.1svn r152043 changes createMCInstPrinter to take an additional MCRegisterInfo argument. Signed-off-by: Vinson Lee <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* draw/llvm: add clip distance supportDave Airlie2012-03-061-46/+77
| | | | | | | | | | | | | | | | This add clipdistance support like the non-llvm draw paths, if we have a clip distance we compare with it instead of doing the dot4. We also have to put the have_clipvertex bit into the emitted vertex header. Fixes vs-clip-distance-all-planes-enabled, vs-clip-distance-const-reject, vs-clip-distance-enables, vs-clip-distance-implicitly-sized, vs-clip-distance-in-param, vs-clip-distance-uint-index. Signed-off-by: Dave Airlie <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* draw/llvm: fix storing of clipvertex and positions into pre_clip_pos (v2)Dave Airlie2012-03-061-8/+11
| | | | | | | | | This fixes the rest of the piglit clipvertex tests. v2: fixup comments. Signed-off-by: Dave Airlie <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* draw/llvm: fix clipvertex setting up clipmask. (v2)Dave Airlie2012-03-061-11/+30
| | | | | | | | | | | | We incorrectly setup clipmask for gl_ClipVertex, this fixes the clipmask setup. v2: fix comment Signed-off-by: Dave Airlie <[email protected]> Reviewed-by: Brian Paul <[email protected]> fix comment
* gallivm: fix floating type in lp_build_mod helperRoland Scheidegger2012-03-051-1/+1
| | | | untested, but cannot have worked before.
* vl: fix shader in/out numberingChristian König2012-03-035-10/+10
| | | | | | Fix all the other wrong numberings. Signed-off-by: Christian König <[email protected]>
* vl/compositor: fix shader in/out numberingChristian König2012-03-021-5/+5
| | | | | | | Michel pointed out that my assumption of a global index namespace is incorrect and breaks r300g. Signed-off-by: Christian König <[email protected]>
* vl/csc: simplify matrix handlingChristian König2012-03-024-69/+64
| | | | | | A csc matrix is only 4x3 not 4x4, also define a VDPAU compatible type for it. Signed-off-by: Christian König <[email protected]>
* vl/compositor: add support for per layer dst areasChristian König2012-03-022-39/+45
| | | | Signed-off-by: Christian König <[email protected]>
* vl/compositor: add per vertex color suportChristian König2012-03-022-31/+84
| | | | | | Used in subtitles, for example. Signed-off-by: Christian König <[email protected]>
* vl/compositor: replace pipe_video_rect with u_rectChristian König2012-03-022-31/+31
| | | | | | So we support things like flipping also. Signed-off-by: Christian König <[email protected]>
* vl/compositor: split shaders and stateChristian König2012-03-022-163/+240
| | | | Signed-off-by: Christian König <[email protected]>
* Revert "gallivm: Change getExtent and readByte to non-const with llvm-3.1."Vinson Lee2012-03-011-8/+0
| | | | | | | | | This reverts commit d5a6c172547d8964f4d4bb79637651decaf9deee. llvm-3.1svn r151687 makes MemoryObject accessor members const again. Signed-off-by: Vinson Lee <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* gallivm: Update comments and prototype of vector-selects.José Fonseca2012-03-011-20/+31
| | | | | No runtime behavior change. As vector selects are still not very well supported by LLVM.
* util: replace format equality test with compatibility test in blit codeBrian Paul2012-02-291-1/+21
| | | | | | | | | | This lets us use the resource_copy_region() path when blitting from R8G8B8A8 to R8G8B8x8, for example. v2: be smarter when src_format==dst_format Reviewed-by: Alex Deucher <[email protected]> Reviewed-by: José Fonseca <[email protected]>
* util: better comment for util_is_format_compatible()Brian Paul2012-02-291-2/+3
|
* util: fix assertions in u_blitter.c codeBrian Paul2012-02-291-11/+11
| | | | | | | Assertions of the form assert(a && b) should be written as separate assertions so that you can actually tell which part is false when there's a failure. Reviewed-by: Marek Olšák <[email protected]>
* gallivm: add major integer opcodes to the tgsi action handlerDave Airlie2012-02-281-1/+382
| | | | | | | | | | | | | | | This adds support for all the opcodes needed for native integer support with GLSL 1.20 enabled, and some of the ones for GLSL1.30 support. I've split them between non-cpu and cpu along the same lines Tom's code did for the other ones I think, but I'm open to review on which ones should go where. With instance ids fixed I get no regressions on my box here with LLVM 2.8, will test with later LLVMs as well. Signed-off-by: Dave Airlie <[email protected]>
* gallivm: drop deprecated opcodesDave Airlie2012-02-281-8/+0
| | | | | | These are integer opcodes not deprecated ones. Signed-off-by: Dave Airlie <[email protected]>
* gallivm: only do rcp/mul for floatingDave Airlie2012-02-281-1/+2
| | | | | | | rcp asserts on type.floating so don't go passing non-floating things into it. Signed-off-by: Dave Airlie <[email protected]>
* gallivm: add frem support to the lp_build_mod helper.Dave Airlie2012-02-281-1/+2
| | | | | | for completeness. Signed-off-by: Dave Airlie <[email protected]>
* gallivm: add bitarit xor and not ops.Dave Airlie2012-02-282-0/+49
| | | | Signed-off-by: Dave Airlie <[email protected]>
* gallivm: add integer and unsigned mod arit functions. (v2)Dave Airlie2012-02-282-0/+25
| | | | | | use a single entry point, as per Jose's suggestion. Signed-off-by: Dave Airlie <[email protected]>
* tgsi: remove trailing comma to silence warningBrian Paul2012-02-271-1/+1
|
* gallium/util: add fast path for buffers in u_default_transfer_inline_writeMarek Olšák2012-02-271-14/+23
| | | | v2: fix indentation, add assertions