summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary
Commit message (Collapse)AuthorAgeFilesLines
* util: add helper function util_dump_draw_infoMarek Olšák2012-01-052-0/+34
|
* translate: implement translation of 10_10_10_2 typesMarek Olšák2012-01-051-0/+148
| | | | | | | | | This is for GL_ARB_vertex_type_2_10_10_10_rev. I just took the code from u_format_table.c. It's based on pack_rgba_float. I had no other choice. The u_format hooks are not exactly compatible with translate. The cleanup of it is left for future work. Reviewed-by: Dave Airlie <[email protected]>
* translate: implement translation of (pure) integer formatsMarek Olšák2012-01-051-94/+252
| | | | | | | The conversion is limited to only a few cases, because converting to any other type shouldn't happen in any driver. Reviewed-by: Dave Airlie <[email protected]>
* u_format: implement fetch_rgba_uint and fetch_rgba_sint for integer formatsMarek Olšák2012-01-053-4/+32
| | | | | | | | | | | | | Fetching int as float and vice versa is not allowed. Fetching unsigned int as signed int and vice versa is not allowed either. Doing conversions like that isn't allowed for samplers in OpenGL. The three hooks could be consolidated into one fetch hook, which would fetch uint as uint32, sint as sint32, and everything else as float. The receiving parameter would be void*. This would be useful for implementing vertex fetches for shader model 4.0, which has untyped registers. Reviewed-by: Dave Airlie <[email protected]>
* gallium: remove deprecated PIPE_TRANSFER_DISCARDMarek Olšák2012-01-055-11/+11
| | | | PIPE_TRANSFER_DISCARD_RANGE is defined the same.
* u_vbuf: translate per-vertex, per-instance, and constant attribs separatelyMarek Olšák2012-01-051-104/+236
| | | | | | | We don't wanna convert per-instance or constant (zero-stride) attribs into ordinary vertex attribs. More importantly, the translation of instance attribs now finally works.
* u_vbuf: take start_instance into account when uploading instanced attribsMarek Olšák2012-01-051-2/+4
|
* u_upload_mgr: remove the 'flushed' parameterMarek Olšák2012-01-053-20/+8
| | | | | | Not used by anybody. Reviewed-by: Brian Paul <[email protected]>
* u_vbuf: don't map user buffers, just obtain a pointer to themMarek Olšák2012-01-051-6/+11
|
* u_vbuf: only map a subrange of buffers to translateMarek Olšák2012-01-051-9/+8
|
* gallium: fix behavior of pipe_buffer_map_rangeMarek Olšák2012-01-052-6/+5
| | | | | | | To match what transfer_map returns. Really, subtracting the offset leads to bugs if someone expects it to work exactly like transfer_map. Reviewed-by: Brian Paul <[email protected]>
* u_vbuf: remove the workaround for half floats and translateMarek Olšák2012-01-051-20/+1
|
* translate: implement translation of half floats in the generic codepathMarek Olšák2012-01-051-0/+21
|
* tgsi: consolidate TGSI string arrays in new tgsi_strings.hBrian Paul2012-01-057-232/+255
| | | | | | | | | | There was some duplication between the tgsi_dump.c and tgsi_text.c files. Also use some static assertions to help catch errors when adding new TGSI values. v2: put strings in tgsi_strings.c file instead of the .h file. Reviewed-by: Dave Airlie <[email protected]>
* gallium/util: fix argument cast in x32_s8_get_tile_rgba() callBrian Paul2012-01-041-1/+1
|
* vl/mpeg2: simple fix to get xine running againChristian König2012-01-041-4/+5
| | | | | | Otherwise xines xxmc plugin will just display green blocks. Signed-off-by: Christian König <[email protected]>
* tgsi/softpipe: disable FAST_MATHDave Airlie2012-01-031-1/+1
| | | | | | | In the interest of softpipe preferring correctness over speed and passing more piglit tests, set this to off by default. For speed you really want llvmpipe. Signed-off-by: Dave Airlie <[email protected]>
* softpipe: remove the 32bits limitation on depth(-stencil) formatsMorgan Armand2012-01-031-0/+28
| | | | | | | This patch remove the 32bits limitation. As a side effect, it bring the support for the GL_ARB_depth_buffer_float extension. No regression have been found on piglit, and all tests for GL_ARB_depth_buffer_float pass successfully. Signed-off-by: Dave Airlie <[email protected]>
* gallium: use Haiku provided debug_printf in OS.hAlexander von Gluck2012-01-031-1/+4
| | | | Signed-off-by: Brian Paul <[email protected]>
* vl: seperate shader buffers from componentsChristian König2012-01-027-64/+38
| | | | | | | | Buffers for shader based decoding can now be released without its component still being around. Signed-off-by: Christian König <[email protected]> Acked-by: Maarten Lankhorst <[email protected]>
* u_blitter: expose functions for setting default views and surfaces for copyingMarek Olšák2012-01-012-18/+65
| | | | | And more importantly, don't call u_sampler_view_default_template etc. it was a source of bugs.
* softpipe: reorder LIT to fix fp-lit-src-equals-dstDave Airlie2011-12-311-8/+8
| | | | | | | This reorders the LIT operation like the r600 one to fix the fp-lit-src-equals-dst piglit test. Signed-off-by: Dave Airlie <[email protected]>
* u_format: fix latc fetches.Dave Airlie2011-12-301-1/+6
| | | | | | | | | | This fixes the latc fetches for llvmpipe, fixes fbo-generatemipmap-formats GL_ARB_texture_compression fbo-generatemipmap-formats GL_ATI_texture_compression_3dc fbo-generatemipmap-formats GL_EXT_texture_compression_latc Signed-off-by: Dave Airlie <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* u_format/rgtc: fix alpha values in returned texels.Dave Airlie2011-12-301-1/+10
| | | | | | | This fixes fbo-generatemipmap-formats GL_EXT_texture_compression_rgtc on llvmpipe. Signed-off-by: Dave Airlie <[email protected]>
* u_format: fix inv_swizzles generationDave Airlie2011-12-301-1/+2
| | | | | | | | | | | | inv_swizzles is used in lp_tile_soa.py to create lp_tile_soa.c, we overwrite swizzles if they are already set. This results in the i8 format getting alpha instead of red, and the l8 format getting blue instead of red. Fixes fbo-alphatest-formats, fbo-alphatest-formats ARB_texture_float, and fbo-alphatest-formats EXT_texture_snorm on llvmpipe. Signed-off-by: Dave Airlie <[email protected]>
* gallium: use Mesa pthread_barrier_t on Haiku, as it is incomplete under HaikuAlexander von Gluck2011-12-271-1/+1
| | | | | Reviewed-by: Brian Paul <[email protected]> Signed-off-by: Brian Paul <[email protected]>
* gallium/u_pack: fix l8/i8 pack color ubDave Airlie2011-12-271-1/+1
| | | | | | | just noticed this in passing, not sure it actually fixes any issus. Signed-off-by: Dave Airlie <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* 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.