summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary
Commit message (Collapse)AuthorAgeFilesLines
* vl: call decode_bitstream only onceChristian König2011-12-263-5/+9
| | | | | | | Submit all bitstreams at once to decode_bitstream. Signed-off-by: Christian König <[email protected]> Signed-off-by: Maarten Lankhorst <[email protected]>
* vl: Fix inverted logic in vlc checksMaarten Lankhorst2011-12-241-4/+4
| | | | | Reported-by: Andy Furniss <[email protected]> Signed-off-by: Maarten Lankhorst <[email protected]>
* vl: improve vlc functions and handlingMaarten Lankhorst2011-12-232-59/+156
| | | | | | | | | | | | | | Only initialize vlc in MPEG2 decoding once for all slices, add more sanity checks to vlc decoding functions, support multiple vlc input buffer, improve documentation of the vlc functions. v2: also implement multiple inputs for the vlc functions v3: some bug fixes for buffer size and alignment corner cases v4: rework of the patch, some more improvements Signed-off-by: Maarten Lankhorst <[email protected]> Signed-off-by: Christian König <[email protected]>
* gallivm: Close a memory leakLauri Kasanen2011-12-221-0/+1
| | | | | | | | | | | | | | | | Hi all This fixes a memory leak of 32 bytes on exit. From 924f8fdccb41b011f372bc57252005bcdb096105 Mon Sep 17 00:00:00 2001 From: Lauri Kasanen <[email protected]> Date: Thu, 22 Dec 2011 21:28:33 +0200 Subject: [PATCH] gallivm: Close a memory leak As reported by "valgrind --leak-check=full glxgears". Signed-off-by: Lauri Kasanen <[email protected]> Signed-off-by: José Fonseca <[email protected]>
* vl: Remove unused declarationMaarten Lankhorst2011-12-201-1/+1
| | | | | | | csc is not used for rgba and gives a warning. Signed-off-by: Maarten Lankhorst <[email protected]> Signed-off-by: Christian König <[email protected]>
* vl: Use pipe clear_render_target instead of util_clear_render_targetMaarten Lankhorst2011-12-201-2/+2
| | | | | | | Mapping to software and uploading again clearing is killing performance. Signed-off-by: Maarten Lankhorst <[email protected]> Signed-off-by: Christian König <[email protected]>
* softpipe: fix shadow1d tests.Dave Airlie2011-12-191-1/+13
| | | | | | | This fixes the piglit glsl-1.10 shadow1D related tests. Signed-off-by: Dave Airlie <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* softpipe: fix shadow 2d texture array samplingDave Airlie2011-12-191-1/+10
| | | | | | | | | The 4th texcoord is used in this case for the comparison. This fixes piglit glsl-fs-shadow2DArray* on softpipe. Signed-off-by: Dave Airlie <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* gallium/draw: fix two side handlingDave Airlie2011-12-191-18/+9
| | | | | | | | | | | | The code didn't handle the case where front wasn't specified in the vertex shader outputs, but back was. In that case we were doing a copy from back to non-existant front, this code checks we have existant front/backs and only does the copy when they both exist. Signed-off-by: Dave Airlie <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* softpipe: fix texture sampling from 1D texture arrayDave Airlie2011-12-191-0/+13
| | | | | | | | | This is the first part of a fix to piglit glsl-fs-shadow1DArray also fix the passing of unused r[2] in the normal 1D case. Signed-off-by: Dave Airlie <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* gallivm: Fix build with llvm-3.1svn.Vinson Lee2011-12-162-1/+15
| | | | | | | | | llvm-3.1svn r145714 moved global variables into a new TargetOptions class. TargetMachine constructor now needs a TargetOptions object as well. Signed-off-by: Vinson Lee <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* gallium: fix a crash in drivers that don't support stream outputFredrik Höglund2011-12-151-1/+2
|
* st/mesa: implement EXT_transform_feedback and ARB_transform_feedback2Marek Olšák2011-12-154-0/+118
|
* u_blitter: implement copy_buffer using stream outputMarek Olšák2011-12-152-2/+96
|
* u_blitter: restore stream output targetsMarek Olšák2011-12-152-0/+36
|
* gallium: utility helper functions for stream outputMarek Olšák2011-12-157-7/+66
|
* gallium: interface changes necessary to implement transform feedback (v5)Marek Olšák2011-12-157-9/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Namely: - EXT_transform_feedback - ARB_transform_feedback2 - ARB_transform_feedback_instanced The old interface was not useful for OpenGL and had to be reworked. This interface was originally designed for OpenGL, but additional changes have been made in order to make st/d3d1x support easier. The most notable change is the stream-out info must be linked with a vertex or geometry shader and cannot be set independently. This is due to limitations of existing hardware (special shader instructions must be used to write into stream-out buffers), and it's also how OpenGL works (stream outputs must be specified prior to linking shaders). Other than that, each stream output buffer has a "view" into it that internally maintains the number of bytes which have been written into it. (one buffer can be bound in several different transform feedback objects in OpenGL, so we must be able to have several views around) The set_stream_output_targets function contains a parameter saying whether new data should be appended or not. Also, the view can optionally be used to provide the vertex count for draw_vbo. Note that the count is supposed to be stored in device memory and the CPU never gets to know its value. OpenGL way | Gallium way ------------------------------------ BeginTF = set_so_targets(append_bitmask = 0) PauseTF = set_so_targets(num_targets = 0) ResumeTF = set_so_targets(append_bitmask = ~0) EndTF = set_so_targets(num_targets = 0) DrawTF = use pipe_draw_info::count_from_stream_output v2: * removed the reset_stream_output_targets function * added a parameter append_bitmask to set_stream_output_targets, each bit specifies whether new data should be appended to each buffer or not. v3: * added PIPE_CAP_STREAM_OUTPUT_PAUSE_RESUME for ARB_tfb2, note that the draw-auto subset is always required (for d3d10), only the pause/resume functionality is limited if the CAP is not advertised v4: * update gallium/docs v5: * compactified struct pipe_stream_output_info, updated dump/trace
* g3dvl/compositor: improve dirty area handlingChristian König2011-12-142-42/+70
| | | | | | | Take viewport and scissors into account and make the dirty area a parameter instead of a member. Signed-off-by: Christian König <[email protected]>
* gallium: implement ARB_conservative_depthMarek Olšák2011-12-103-0/+22
| | | | This adds a new TGSI property to represent the GLSL layout qualifier in TGSI.
* util: Add strings.h include on unicesJosé Fonseca2011-12-091-0/+4
| | | | | Fixes -Wimplicit-function-declaration for ffs with GCC. Spotted/tested by Kai Wasserbäch.
* llvmpipe: Trim the fragment shader cached based on LLVM IR instruction count.José Fonseca2011-12-082-0/+29
| | | | | | | | | | | | Number of fragment shader variants is not very representative of the memory used by LLVM, neither is number of shader instructions, as often texture sampling constitutes most of the generated code. This change adds an additional trim criteria: least recently used fragment shader variants will be freed until the total number of LLVM IR instruction falls below a specified threshold. Reviewed-by: Brian Paul <[email protected]>
* llvmpipe,draw,gallivm: Ensure we don't walk beyond the end of the shader ↵José Fonseca2011-12-081-2/+7
| | | | | | | | | | | variant list. u_simple_list.h uses a sentinel element, and not a NULL element. So ensure list is not empty when reducing the list of shader variants. Something I noticed while trying to free variants more aggressively. Reviewed-by: Brian Paul <[email protected]>
* util: add casts in fprintf() calls to silence warningsBrian Paul2011-12-031-4/+6
| | | | And wrap to 80 columns.
* gallium: add PIPE_FORMAT_ETC1_RGB8Chia-I Wu2011-12-027-2/+162
| | | | | | | The format is defined by GL_OES_compressed_ETC1_RGB8_texture. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Jose Fonseca <[email protected]>
* u_vbuf: Silence uninitialized variable warnings.Vinson Lee2011-12-011-0/+2
| | | | | | | | | | Fixes these GCC warnings. u_vbuf.c: In function ‘u_vbuf_draw_begin’: u_vbuf.c:839:20: warning: ‘max_index’ may be used uninitialized in this function [-Wuninitialized] u_vbuf.c:838:20: warning: ‘min_index’ may be used uninitialized in this function [-Wuninitialized] Signed-off-by: Vinson Lee <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* gallium/cell: Remove the driver.Kai Wasserbäch2011-11-294-1514/+2
| | | | | | | Complicates Gallium3D development and doesn't seem to have active users. Signed-off-by: Kai Wasserbäch <[email protected]> Signed-off-by: José Fonseca <[email protected]>
* Remove windows kernel support code.José Fonseca2011-11-2910-420/+9
| | | | | | Not actively used. Reviewed-by: Brian Paul <[email protected]>
* gallium/auxiliary: Remove os_stream.José Fonseca2011-11-2911-753/+91
| | | | | | XP kernel mode was the only subsystem lacking stdio FILES. Reviewed-by: Brian Paul <[email protected]>
* gallium: add B10G10R10A2_UINT formatDave Airlie2011-11-271-0/+1
| | | | | | This format is used for ARB_texture_rgb10_a2ui extension. Signed-off-by: Dave Airlie <[email protected]>
* u_vbuf_mgr: rename to u_vbufMarek Olšák2011-11-223-24/+24
|
* u_vbuf_mgr: better way to find a free VB slot + check errors earlyMarek Olšák2011-11-221-41/+62
|
* u_vbuf_mgr: remove a useless variableMarek Olšák2011-11-221-4/+4
|
* u_vbuf_mgr: remove redundant memsetMarek Olšák2011-11-221-3/+1
|
* u_vbuf_mgr: don't reference non-native vertex buffers as nativeMarek Olšák2011-11-221-1/+2
| | | | | also don't mark them as 'user', because they will be uploaded through the translate fallback anyway.
* u_vbuf_mgr: rename translate_vb_slot -> fallback_vb_slotMarek Olšák2011-11-221-15/+14
|
* gallium: separate out floating-point CAPs into its own enumMarek Olšák2011-11-221-1/+1
| | | | | | | | | | | | | | | The motivation behind this is to add some self-documentation in the code about how each CAP can be used. The idea is: - enum pipe_cap is only valid in get_param - enum pipe_capf is only valid in get_paramf Which CAPs are floating-point have been determined based on how everybody except svga implemented the functions. svga have been modified to match all the other drivers. Besides that, the floating-point CAPs are now prefixed with PIPE_CAPF_.
* gallium: remove PIPE_CAP_GLSL and enable GLSL unconditionallyMarek Olšák2011-11-221-1/+0
| | | | | Only i965g does not enable GLSL, but that driver has been unmaintained and bitrotting for quite a while anyway.
* gallium: add PIPE_SHADER_CAP_OUTPUT_READVadim Girlin2011-11-211-1/+0
| | | | | | | It's intended to indicate whether the driver/hardware supports reading of the values written into shader outputs. Signed-off-by: Vadim Girlin <[email protected]>
* u_vbuf_mgr: correctly compute max vertex count from hw buffersMarek Olšák2011-11-202-26/+34
| | | | | | | | And update r300g. This is different from util_draw_max_index in how it obtains vertex elements and that it doesn't have to call util_format_description due to additional precomputed data in vertex elements.
* u_vbuf_mgr: correctly obtain min/max_index for uploads and translateMarek Olšák2011-11-201-7/+146
| | | | | | This forks vbo_get_minmax_index. We need to know the index range when translating non-native vertices into native ones. There is no other way around it.
* u_vbuf_mgr: add set_index_buffer functionMarek Olšák2011-11-202-0/+18
| | | | It will use the index buffer soon.
* u_vbuf_mgr: add commentsMarek Olšák2011-11-201-5/+15
|
* u_vbuf_mgr: don't upload user buffers which have been uploaded by translateMarek Olšák2011-11-201-19/+33
|
* util/draw: replace assertions with conditionals in util_draw_max_index()Brian Paul2011-11-152-13/+39
| | | | | | | | | | | | | | Don't assert/die if a VBO is too small. Return zero instead. For debug builds, emit a warning message since this is an unusual situation that might indicate that there's a bug in the app. Note that util_draw_max_index() now returns max_index+1 instead of max_index. This lets us return zero to indicate that one of the VBOs is too small to draw anything. Fixes a failure with the new piglit vbo-too-small test. Reviewed-by: José Fonseca <[email protected]>
* gallium: add TGSI_SEMANTIC_VERTEXIDChristoph Bumiller2011-11-144-0/+6
|
* util: Avoid signed/unsigned comparison in u_trim_pipe_prim().José Fonseca2011-11-141-1/+1
|
* draw: Handle failure to allocate aligned_constant_storage.José Fonseca2011-11-141-3/+9
| | | | | | | | Also, actually update const_storage_size, therefore avoiding to unnecessarily reallocate aligned_constant_storage every single time draw_vs_set_constants() is called. Reviewed-by: Brian Paul <[email protected]>
* gallivm: Remove duplicate statement.José Fonseca2011-11-141-2/+0
| | | | | | ary_ge_arx_arz is already set earlier. Reviewed-by: Brian Paul <[email protected]>
* gallivm: Include stddef.h before the LLVM C++ headers.José Fonseca2011-11-142-0/+4
| | | | | Necessary with build against LLVM 2.6, with recent gcc, as LLVM headers depend on ptrdiff_t but don't properly include stddef.h
* draw: handle out of memory conditionsBrian Paul2011-11-111-3/+5
| | | | | If the vbuf backend fails to allocate a vertex buffer, don't crash or assert.