summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/softpipe
Commit message (Collapse)AuthorAgeFilesLines
* gallium: interface changes necessary to implement transform feedback (v5)Marek Olšák2011-12-153-12/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* gallium: disable stream output in drivers that support itMarek Olšák2011-12-153-2/+9
| | | | I am going to make interface changes and I don't want to break compilation.
* softpipe: s/int/unsigned/ to be consistent in alpha test codeBrian Paul2011-11-231-2/+2
|
* softpipe: remove pointless break stmtBrian Paul2011-11-231-1/+0
|
* gallium: separate out floating-point CAPs into its own enumMarek Olšák2011-11-221-7/+7
| | | | | | | | | | | | | | | 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-2/+0
| | | | | Only i965g does not enable GLSL, but that driver has been unmaintained and bitrotting for quite a while anyway.
* Remove tgsi_sse2.José Fonseca2011-11-088-266/+1
| | | | tgsi_exec is simple. llvm is fast. tgsi_sse2 ends up being neither.
* softpipe: don't clamp or do logical operations on floating-point buffers.Morgan Armand2011-11-081-22/+54
| | | | Signed-off-by: Brian Paul <[email protected]>
* softpipe: fix memory leaksMorgan Armand2011-11-072-1/+7
| | | | | | This series of patches is a splitted version of my previous one, as suggested by Brian. Signed-off-by: Brian Paul <[email protected]>
* softpipe: implement/fix TIMESTAMP queriesChristoph Bumiller2011-10-201-3/+8
|
* softpipe: remove unused vars in softpipe_clear()Brian Paul2011-10-181-3/+0
|
* softpipe: fix regression with tex tile cache since integer support.Dave Airlie2011-10-121-2/+3
| | | | | | | | Don't use the uint/int paths for ZS formats for tex tile cache. fixes: https://bugs.freedesktop.org/show_bug.cgi?id=41695 Signed-off-by: Dave Airlie <[email protected]>
* softpipe: add integer supportDave Airlie2011-10-115-44/+146
| | | | | | | This adds support to the clear and tile caches for integer storage and clearing, avoiding any floating paths. Signed-off-by: Dave Airlie <[email protected]>
* gallium: rename ZS stencil type to UINT (v2)Dave Airlie2011-10-111-11/+11
| | | | | | | | | | these are never USCALED, always UINT in reality. taken from some work by Christoph Bumiller v2: fixup formatting of table + tabs Signed-off-by: Dave Airlie <[email protected]>
* softpipe: fix Z interpolation invariance bugBrian Paul2011-10-041-1/+10
| | | | | | | | | We want quad/pixel Z values to be interpolated exactly the same for multi-pass algorithms. Because of how the optimized Z-test code is written, we can't cull the first quad in a run even if it's totally killed. See the comment for more info. NOTE: This is a candidate for the 7.11 branch.
* softpipe: add check for DO_PSTIPPLE_IN_HELPER_MODULEBrian Paul2011-10-041-0/+2
| | | | | We only want to generate the fragment shader variant that does stippling if DO_PSTIPPLE_IN_HELPER_MODULE is being used.
* gallium: add PIPE_CAP_CONDITIONAL_RENDERMarek Olšák2011-09-301-0/+2
| | | | | | | We were checking whether render_condition is set. That was not reliable, because it's always set with trace and noop regardless of driver support. Reviewed-by: Brian Paul <[email protected]>
* gallium: add and use PIPE_SHADER_CAP_MAX_TEXTURE_SAMPLERSMarek Olšák2011-09-301-10/+11
| | | | | | | | | This removes: - PIPE_CAP_MAX_TEXTURE_IMAGE_UNITS - PIPE_CAP_MAX_VERTEX_TEXTURE_UNITS in favor of the that new per-shader cap. Reviewed-by: Brian Paul <[email protected]>
* gallium: remove PIPE_CAP_TEXTURE_MIRROR_REPEATMarek Olšák2011-09-301-2/+0
| | | | | | | | | | All drivers support it (well, except Cell). The boolean option is going away from core Mesa too. This is a follow-up to Ian Romanick's patch "mesa: Remove ARB_texture_mirrored_repeat extension enable flag". Reviewed-by: Brian Paul <[email protected]>
* gallium: move border color to be a color unionDave Airlie2011-09-271-4/+4
| | | | | | | | | | EXT_texture_integer also specifies border color should be a color union, the values are used according to the texture sampler format. (update docs) Signed-off-by: Dave Airlie <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* softpipe: Use memory allocation macros.José Fonseca2011-09-252-3/+3
| | | | Fixes segfault with memory debugging on.
* gallium: move clear paths from rgba to a pointer to a color union (v2)Dave Airlie2011-09-182-4/+6
| | | | | | | | | | | | | | | This moves the gallium interface for clears from using a pointer to 4 floats to a pointer to a union of float/unsigned/int values. Notes: 1. the value is opaque. 2. only when the value is used should it be interpretered according to the surface format it is going to be used with. 3. float clears on integer buffers and vice-versa are undefined. v2: fixed up vega and graw, dropped hunks that shouldn't have been in patch. Signed-off-by: Dave Airlie <[email protected]>
* softpipe: use pipe_get_tile_rgba_format()Brian Paul2011-09-161-5/+6
| | | | | | | | | | | Pass an explicit surface format as we do with pipe_put_tile_rgba_format(). This fixes the piglit fbo-srgb-blit test. With GL_EXT_framebuffer_sRGB we override the resource's format with an explicit format (linear vs. sRGB). We need to do so both when getting and putting tiles. Fixes https://bugs.freedesktop.org/show_bug.cgi?id=40402 Reviewed-by: Dave Airlie <[email protected]>
* softpipe: use util_format_is_depth_or_stencil()Brian Paul2011-09-161-7/+1
| | | | Reviewed-by: Dave Airlie <[email protected]>
* softpipe: use consistent indentation in sp_quad_blend.cBrian Paul2011-09-151-183/+183
|
* softpipe: fix blending for luminance/intensity surfacesBrian Paul2011-09-151-65/+96
| | | | | | | | | | | | | | If we're drawing to a luminance, luminance/alpha or intensity surface we have to adjust (rebase) the fragment/quad colors before writing them to the tile cache. The tile cache always stores RGBA colors but if we're caching a L/A surface (for example) we need to be sure that R=G=B so that subsequent reads from the surface cache appear to return L/A We previously had a special case for RGB (no alpha) surfaces. This change generalizes that for the other base formats. Fixes https://bugs.freedesktop.org/show_bug.cgi?id=40408, but sRGB formats are still failing. That'll be addressed in a later patch.
* softpipe: implement blend color clampingBrian Paul2011-09-143-29/+117
| | | | | | | | | Per the GL spec, clamp incoming colors prior to blending depending on whether the destination buffer stores normalized (non-float) values. Note that the constant blend color needs to be clamped too (we always get the unclamped color from Mesa). Fixes https://bugs.freedesktop.org/show_bug.cgi?id=40412
* gallium: add PIPE_CAP_MAX_TEXTURE_ARRAY_LAYERSMarek Olšák2011-09-101-2/+2
| | | | v2: remove PIPE_CAP_ARRAY_TEXTURES in favor of the new CAP.
* gallium: add caps for MIN/MAX texel offsets.Dave Airlie2011-09-021-0/+4
| | | | | | | | As per Brian's suggestion, add caps for drivers that support texture offsets to advertise a min/max via TGSI, also use it in the state tracker. Signed-off-by: Dave Airlie <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* tgsi: add support for texture offsets to the TGSI IR. (v2)Dave Airlie2011-09-021-5/+12
| | | | | | | | | | | | | This adds tokens for texture offsets, to store 4 * swizzled vec 3 for use in TXF and other opcodes. It also contains TGSI exec changes for softpipe to use this code, along with GLSL->TGSI support for TXF. v2: add some more comments, add back padding I removed. Signed-off-by: Dave Airlie <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* g3dvl: Rework the decoder interface part 2/5Christian König2011-08-261-0/+2
| | | | | | | | Implement PIPE_CAP_NUM_BUFFERS_DESIRED giving the decoder control over the number of buffers a state tracker should allocate. Signed-off-by: Christian König <[email protected]> Reviewed-by: Younes Manton <[email protected]>
* softpipe: add const qualifier to silence warningsBrian Paul2011-08-251-1/+1
|
* softpipe: implement TXF support via get_texel callbackDave Airlie2011-08-251-0/+69
| | | | | | | | | | | This just calls the texel fetch functions directly bypassing the sampling, notes: 1: loops inside switch should be more optimal. 2: borders can be sampled though only up to border depth, outside that its undefined. Signed-off-by: Dave Airlie <[email protected]>
* softpipe: add get_dims callback for TXQ support. (v2)Dave Airlie2011-08-251-0/+40
| | | | | | | | | | | This adds the get_dims callback that is called from the tgsi exec_txq. It returns values as per EXT_gpu_program4. v2: fix one indent + use a switch (slighty modified from Brian) Signed-off-by: Dave Airlie <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* android: build softpipeChia-I Wu2011-08-211-0/+67
| | | | This builds the static library libmesa_pipe_softpipe from softpipe.
* softpipe: fix an obvious copy-paste error in get_query_resultMarek Olšák2011-08-161-1/+1
| | | | Reviewed-by: Brian Paul <[email protected]>
* softpipe: When doing write_all_cbufs, don't stomp over the color.Eric Anholt2011-07-281-4/+12
| | | | | | | We have to make it through this loop processing the color multiple times, so we can't go overwriting it on our first color buffer. Reviewed-by: Brian Paul <[email protected]>
* gallium/softpipe: Don't clobber dest color/alpha before masking.Younes Manton2011-07-231-89/+96
| | | | | | | | | The blend_quad function clobbers the actual render target color/alpha values while applying the destination blend factor, which results in restoring the wrong value during the masking stage for write-disabled channels. Reviewed-by: Brian Paul <[email protected]>
* Merge branch 'gallium-polygon-stipple'Brian Paul2011-07-2116-148/+383
|\
| * softpipe: use the polygon stipple utility moduleBrian Paul2011-07-219-14/+131
| | | | | | | | | | | | | | | | | | | | This is an alternative to the draw module's polygon stipple stage. The softpipe implementation here is just a test. The advantange of using the new polygon stipple utility module (with other drivers) is we can avoid software vertex processing in the draw module and get much better performance. Polygon stipple doesn't require special vertex processing like the other draw module stage.
| * softpipe: implement fragment shader variantsBrian Paul2011-07-2113-117/+251
| | | | | | | | We'll need shader variants to accomodate the new polygon stipple utility.
| * softpipe: use tgsi_shader_info fields for fragcoord origin, center, etc.Brian Paul2011-07-214-17/+5
| |
| * softpipe: remove obsolete commentBrian Paul2011-07-211-4/+0
| |
| * softpipe: rename a functionBrian Paul2011-07-211-7/+7
| |
* | softpipe: fix various warnings about int/float/double conversions, etcBrian Paul2011-07-131-15/+15
| |
* | softpipe: Remove sp_video_context.c from SConscript.Vinson Lee2011-07-131-1/+0
| | | | | | | | | | | | sp_video_context.c was added to SConscript in commit ed24e19070b7dff12670151b2d184f31c845ccae (pipe-video merge) but no file of that name was added.
* | [g3dvl] add some more PIPE_VIDEO_CAPsChristian König2011-07-121-0/+6
| |
* | Merge remote-tracking branch 'origin/master' into pipe-videoChristian König2011-07-111-5/+6
|\ \ | | | | | | | | | | | | | | | Conflicts: src/gallium/drivers/r600/r600_pipe.c src/gallium/drivers/r600/r600_state_inlines.h
| * | softpipe: add missing stencil format case in convert_quad_stencil()Brian Paul2011-07-061-0/+1
| | | | | | | | | | | | | | | | | | Part of the fix for https://bugs.freedesktop.org/show_bug.cgi?id=38729 NOTE: This is a candidate for the 7.11 branch
| * | softpipe: minor clean-ups in sp_quad_depth_test.cBrian Paul2011-07-061-5/+5
| |/