summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/util
Commit message (Collapse)AuthorAgeFilesLines
* util: add helper function util_dump_draw_infoMarek Olšák2012-01-052-0/+34
|
* 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]>
* 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
|
* gallium/util: fix argument cast in x32_s8_get_tile_rgba() callBrian Paul2012-01-041-1/+1
|
* 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]>
* 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.
* 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/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]>
* st/mesa: implement EXT_transform_feedback and ARB_transform_feedback2Marek Olšák2011-12-152-0/+9
|
* 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-155-1/+45
|
* gallium: interface changes necessary to implement transform feedback (v5)Marek Olšák2011-12-151-0/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* 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.
* 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-026-2/+161
| | | | | | | 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]>
* Remove windows kernel support code.José Fonseca2011-11-295-127/+3
| | | | | | Not actively used. Reviewed-by: Brian Paul <[email protected]>
* gallium/auxiliary: Remove os_stream.José Fonseca2011-11-294-96/+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-222-23/+23
|
* 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.
* 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-151-8/+24
| | | | | | | | | | | | | | 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]>
* util: Avoid signed/unsigned comparison in u_trim_pipe_prim().José Fonseca2011-11-141-1/+1
|
* util: check for null vertex buffer object in blit codeBrian Paul2011-11-111-6/+10
| | | | Don't crash if we fail to allocate a vertex buffer.
* llvmpipe/u_format: add support for EXT_texture_shared_exponent + ↵Dave Airlie2011-11-101-0/+5
| | | | | | | | | | | EXT_packed_float These two are fairly unique types so add specific cases for decoding them. Passes piglit fbo-clear-format and fbo-generatemipmap-format tests for these two extensions. Signed-off-by: Dave Airlie <[email protected]>
* util: add log2f for AndroidChia-I Wu2011-11-071-0/+11
| | | | | | | | | It is needed for nv50's new shader backend. With this change, both u_math.h and imports.h in core mesa define the same function. I have to #undef log2f here to avoid the conflict. Not sure if there is a better way to deal with the situation. Acked-by: José Fonseca <[email protected]>
* u_format: fix RGTC support in fits 8unorm.Dave Airlie2011-11-061-2/+7
| | | | | | Signed RGTC won't fit in a unorm, so don't allow them. Signed-off-by: Dave Airlie <[email protected]>
* st/mesa: set geometry shader to NULL when doing internal drawingMarek Olšák2011-11-042-0/+9
| | | | | | | The code expects the geometry shader to be NULL. We don't have geometry shaders now, but it's good to be prepared. v2: check for support in the cso context
* u_vbuf_mgr: avoid one call to pipe_resource_reference in most casesMarek Olšák2011-11-041-1/+2
|