summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/softpipe
AgeCommit message (Collapse)AuthorFilesLines
2014-06-02gallium: create TGSI_PROPERTY to disable viewport and clippingChristoph Bumiller1-0/+1
Marek v2: add a cap Signed-off-by: Marek Olšák <marek.olsak@amd.com>
2014-05-31softpipe: honor the render_condition_enable bit in blits.Roland Scheidegger1-0/+3
Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
2014-05-07gallium: add a cap for supporting 4-offset TG4 opcodesIlia Mirkin1-0/+1
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Reviewed-by: Roland Scheidegger <sroland@vmware.com>
2014-04-26gallium: add basic support for ARB_sample_shadingIlia Mirkin1-0/+1
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Reviewed-by: Marek Olšák <marek.olsak@amd.com> Reviewed-by: Roland Scheidegger <sroland@vmware.com>
2014-04-11softpipe: fix shadow samplingHeinrich Janzing1-68/+51
And remove nonsensical approximation of linear interpolation behavior for shadow samplers. Reviewed-by: Brian Paul <brianp@vmware.com> Tested-by: Brian Paul <brianp@vmware.com>
2014-04-11softpipe: add PIPE_CAP_MIN/MAX_TEXTURE_GATHER_OFFSET query casesBrian Paul1-0/+3
To silence compiler warnings. Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
2014-04-07gallium: add support for LODQ opcodes.Dave Airlie1-0/+1
This opcode provide support for GL_ARB_texture_query_lod, Signed-off-by: Dave Airlie <airlied@redhat.com> [imirkin: rebase, docs update] Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2014-04-03softpipe: remove no-op checks in sampler, sampler_view functionsBrian Paul1-14/+0
Reviewed-by: Roland Scheidegger <sroland@vmware.com> Reviewed-by: José Fonseca <jfonseca@vmware.com>
2014-04-02mesa/soft/llvmpipe: add fake MSAA supportDave Airlie1-0/+2
This adds a gallium cap that allows us to fake GL3.0 by not exposing MSAA on sw rendering. It also forces the extra extensions needed for GL3.2. Signed-off-by: Dave Airlie <airlied@redhat.com>
2014-03-07gallium: allow setting of the internal stream output offsetZack Rusin1-1/+1
D3D10 allows setting of the internal offset of a buffer, which is in general only incremented via actual stream output writes. By allowing setting of the internal offset draw_auto is capable of rendering from buffers which have not been actually streamed out to. Our interface didn't allow. This change functionally shouldn't make any difference to OpenGL where instead of an append_bitmask you just get a real array where -1 means append (like in D3D) and 0 means do not append. Signed-off-by: Zack Rusin <zackr@vmware.com> Reviewed-by: Roland Scheidegger <sroland@vmware.com> Reviewed-by: Jose Fonseca <jfonseca@vmware.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2014-03-03softpipe: use 64-bit arithmetic in softpipe_resource_layout()Brian Paul1-3/+3
To avoid 32-bit integer overflow for large textures. Note: we're already doing this in llvmpipe. Cc: "10.0" "10.1" <mesa-stable@lists.freedesktop.org> Reviewed-by: Roland Scheidegger <sroland@vmware.com>
2014-02-25gallium: the other drivers don't support ARB_buffer_storageMarek Olšák1-0/+1
Reviewed-by: Fredrik Höglund <fredrik@kde.org>
2014-02-25gallium: add texture gather support to gallium (v3)Dave Airlie1-0/+2
This adds support to gallium for a TG4 instruction, and two CAPs. The first CAP is required for GL_ARB_texture_gather. The second CAP is required to expose GL_ARB_gpu_shader5. However so far we haven't found any hardware that natively exposes the textureGatherOffsets feature from GL, so just lower it for now. If hardware appears for this we can add another CAP to allow TG4 to take 4 offsets. v2: add component selection src and a cap to say hw can do it. (st can use to help control GL_ARB_gpu_shader5/GLSL 4.00). Add docs. v3: rename to SM5, add docs. Reviewed-by: Roland Scheidegger <sroland@vmware.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2014-02-13gallium/vl: remove remaining softpipe video functionsChristian König2-36/+0
Unused and unmaintained for quite a while. Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
2014-02-09gallium: add geometry shader output limitsGrigori Goronzy1-0/+3
v2: adjust limits for radeonsi and llvmpipe v3: add documentation Cc: "10.1" <mesa-stable@lists.freedesktop.org> Signed-off-by: Marek Olšák <marek.olsak@amd.com>
2014-02-04gallium: remove PIPE_CAP_MAX_COMBINED_SAMPLERSMarek Olšák1-2/+0
This can be derived from the shader caps. All GPUs from ATI/AMD, NVIDIA, and INTEL have separate texture slots for each shader stage.
2014-01-29softpipe: Set PIPE_CAP_MIN_MAP_BUFFER_ALIGNMENT to 64Siavash Eliasi1-1/+2
v2: Fixed setting switch cases prior to PIPE_CAP_MIN_MAP_BUFFER_ALIGNMENT incorrectly. Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2014-01-29softpipe: Use alignment of 64 instead of 16 for buffer allocationSiavash Eliasi1-2/+2
v2: Changed allocation alignment in softpipe_displaytarget_layout. Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2014-01-23gallium: remove PIPE_CAP_SCALED_RESOLVEMarek Olšák1-2/+0
If any driver doesn't support this, it can use a blit after resolving the samples. Reviewed-by: Brian Paul <brianp@vmware.com>
2014-01-20softpipe: fix crash when accessing null colorbufferBrian Paul1-1/+4
Fixes piglit fbo-missing-attachment-blit test. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=73755 Reviewed-by: Roland Scheidegger <sroland@vmware.com>
2014-01-17s/Tungsten Graphics/VMware/José Fonseca43-101/+101
Tungsten Graphics Inc. was acquired by VMware Inc. in 2008. Leaving the old copyright name is creating unnecessary confusion, hence this change. This was the sed script I used: $ cat tg2vmw.sed # Run as: # # git reset --hard HEAD && find include scons src -type f -not -name 'sed*' -print0 | xargs -0 sed -i -f tg2vmw.sed # # Rename copyrights s/Tungsten Gra\(ph\|hp\)ics,\? [iI]nc\.\?\(, Cedar Park\)\?\(, Austin\)\?\(, \(Texas\|TX\)\)\?\.\?/VMware, Inc./g /Copyright/s/Tungsten Graphics\(,\? [iI]nc\.\)\?\(, Cedar Park\)\?\(, Austin\)\?\(, \(Texas\|TX\)\)\?\.\?/VMware, Inc./ s/TUNGSTEN GRAPHICS/VMWARE/g # Rename emails s/alanh@tungstengraphics.com/alanh@vmware.com/ s/jens@tungstengraphics.com/jowen@vmware.com/g s/jrfonseca-at-tungstengraphics-dot-com/jfonseca-at-vmware-dot-com/ s/jrfonseca\?@tungstengraphics.com/jfonseca@vmware.com/g s/keithw\?@tungstengraphics.com/keithw@vmware.com/g s/michel@tungstengraphics.com/daenzer@vmware.com/g s/thomas-at-tungstengraphics-dot-com/thellstom-at-vmware-dot-com/ s/zack@tungstengraphics.com/zackr@vmware.com/ # Remove dead links s@Tungsten Graphics (http://www.tungstengraphics.com)@Tungsten Graphics@g # C string src/gallium/state_trackers/vega/api_misc.c s/"Tungsten Graphics, Inc"/"VMware, Inc"/ Reviewed-by: Brian Paul <brianp@vmware.com>
2014-01-17softpipe: handle NULL color buffer pointersBrian Paul1-93/+96
Fixes regression from 9baa45f78b8ca7d66280e36009b6a685055d7cd6 Reviewed-by: Roland Scheidegger <sroland@vmware.com>
2014-01-08mesa: Work around internal compiler errorThomas Sondergaard1-2/+2
This small rearrangement avoids MSVC 2013 ICE. Also, this should be a better memory access order. Cc: "10.0" <mesa-stable@lists.freedesktop.org> Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2013-12-13swrast* (gallium, classic): add MESA_copy_sub_buffer support (v3)Dave Airlie1-2/+3
This patches add MESA_copy_sub_buffer support to the dri sw loader and then to gallium state tracker, llvmpipe, softpipe and other bits. It reuses the dri1 driver extension interface, and it updates the swrast loader interface for a new putimage which can take a stride. I've tested this with gnome-shell with a cogl hacked to reenable sub copies for llvmpipe and the one piglit test. I could probably split this patch up as well. v2: pass a pipe_box, to reduce the entrypoints, as per Jose's review, add to p_screen doc comments. v3: finish off winsys interfaces, add swrast classic support as well. Reviewed-by: Jose Fonseca <jfonseca@vmware.com> Signed-off-by: Dave Airlie <airlied@redhat.com> swrast: add support for copy_sub_buffer
2013-12-03gallium: add support for AMD_vertex_shader_layerMarek Olšák1-0/+2
2013-11-28gallium: new shader cap bit for the amount of sampler viewsRoland Scheidegger1-2/+3
Ever since introducing separate sampler and sampler view max this was really missing. Every driver but llvmpipe reports the same number as number of samplers for now, so nothing should break. Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
2013-11-16gallium/drivers: compact compiler flags into Automake.incEmil Velikov1-5/+2
* minimise flags duplication * distingush between VISIBILITY C and CXX flags * set only required flags - C and/or CXX v2: add LLVM_CFLAGS back to AM_CFLAGS (add missing backslash) Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2013-11-14softpipe: (trivial) fix debug codeRoland Scheidegger1-15/+10
The debug printfs wouldn't actually compile when enabled, so kill them off and insert some new one in another place, and make sure it keeps compiling by enclosing it in a if-0 clause.
2013-11-07draw,llvmpipe,util: add depth bias calculation for arb_depth_buffer_floatMatthew McClure1-15/+8
With this patch, the llvmpipe and draw modules will calculate the depth bias according to floating point depth buffer semantics described in the arb_depth_buffer_float specification, when the driver has a z buffer bound with a format type of UTIL_FORMAT_TYPE_FLOAT. By default, the driver will use the existing UNORM calculation for depth bias. A new function, draw_set_zs_format, was added to calculate the Minimum Resolvable Depth value and floating point depth sense for the draw module. Reviewed-by: Jose Fonseca <jfonseca@vmware.com> Reviewed-by: Roland Scheidegger <sroland@vmware.com>
2013-10-26gallium: add PIPE_CAP_MIXED_FRAMEBUFFER_SIZESIlia Mirkin1-0/+1
This CAP will determine whether ARB_framebuffer_object can be enabled. The nv30 driver does not allow mixing swizzled and linear zsbuf/cbuf textures. Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Signed-off-by: Marek Olšák <marek.olsak@amd.com>
2013-10-23gallium: new, unified pipe_context::set_sampler_views() functionBrian Paul1-31/+1
The new function replaces four old functions: set_fragment/vertex/ geometry/compute_sampler_views(). Note: at this time, it's expected that the 'start' parameter will always be zero. Reviewed-by: Roland Scheidegger <sroland@vmware.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com> Tested-by: Emil Velikov <emil.l.velikov@gmail.com>
2013-10-12softpipe: fix seamless cube filteringRoland Scheidegger1-48/+151
Fix coord wrapping (and face selection too) in case of edges. Unfortunately, the coord wrapping is way more complicated than what the code did, as it depends on the face and the direction where the texel falls off the face (the logic needed to get this right in fact seems utterly ridiculous). Also fix a bug in (y direction under/overflow) face selection. And get rid of complicated cube corner handling. Just like edge case, the coord wrapping was wrong and it seems very difficult to fix. I'm near certain it can't always work anyway (though ordinary seamless filtering on edge has actually a similar problem but not as severe) because we don't have per-pixel face, hence could have multiple corner texels which would make it very difficult to average the remaining texels correctly. Hence simply pick a texel which would only have fallen off one edge but not both instead, which is not quite accurate but actually I think should be enough to meet OpenGL (but not d3d10) requirements. v2: small fixes suggested by Brian, add some comments. Reviewed-by: Brian Paul <brianp@vmware.com>
2013-10-08gallium/swrast: don't export any private symbolsMarek Olšák1-1/+2
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
2013-10-03softpipe: remove old bind_*_sampler_states() functionsBrian Paul1-31/+0
2013-10-03softpipe: implement pipe_context::bind_sampler_states()Brian Paul1-0/+1
2013-10-01softpipe: consolidate C sources list into Makefile.sourcesEmil Velikov4-92/+37
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
2013-09-20gallium: add flush_resource context functionMarek Olšák1-0/+7
r600g needs explicit flushing before DRI2 buffers are presented on the screen. v2: add (stub) implementations for all drivers, fix frontbuffer flushing v3: fix galahad Signed-off-by: Marek Olšák <marek.olsak@amd.com>
2013-08-30softpipe: handle NULL sampler views for texture sampling / queriesRoland Scheidegger1-5/+25
Instead of crashing just return all zero. Reviewed-by: Jose Fonseca <jfonseca@vmware.com> Reviewed-by: Zack Rusin <zackr@vmware.com>
2013-08-30softpipe: check if so_target is NULL before accessing itRoland Scheidegger1-2/+5
No idea if this is working right but copied straight from llvmpipe. (Not only does this check the so_target but also use buffer->data instead of buffer for the mapping.) Just trying to get rid of a segfault testing something else... Reviewed-by: Jose Fonseca <jfonseca@vmware.com> Reviewed-by: Zack Rusin <zackr@vmware.com>
2013-08-27draw: clean up setting stream out information a bitRoland Scheidegger3-17/+20
In particular noone is interested in the vertex count, so drop that, and also drop the duplicated num_primitives_generated / so.primitives_storage_needed variables in drivers. I am unable for now to figure out if primitives_storage_needed in SO stats (used for d3d10) should increase if SO is disabled, though the equivalent num_primitives_generated used for OpenGL definitely should increase. In any case we were only counting when SO is active both in softpipe and llvmpipe anyway so don't pretend there's an independent num_primitives_generated counter which would count always. (This means the PIPE_QUERY_PRIMITIVES_GENERATED count will still be wrong just as before, should eventually fix this by doing either separate counting for this query or adjust the code so it always counts this even if SO is inactive depending on what's correct for d3d10.) Reviewed-by: Brian Paul <brianp@vmware.com>
2013-08-27softpipe: support nested/overlapping queries for all query typesRoland Scheidegger2-18/+17
There's just no way resetting the counters is working with nested/overlapping queries. Reviewed-by: Brian Paul <brianp@vmware.com>
2013-08-19vl: add entrypoint to get_video_paramChristian König1-1/+2
Signed-off-by: Christian König <christian.koenig@amd.com>
2013-08-19vl: rename pipe_video_decoder to pipe_video_codecChristian König1-1/+1
Signed-off-by: Christian König <christian.koenig@amd.com>
2013-08-08softpipe: fix the regressionsZack Rusin1-2/+0
softpipe has a really weird handling of the draw attrs, lets just not inject outputs in its data. Trivial.
2013-08-08softpipe: don't clamp reference value for shadow comparison for float formatsRoland Scheidegger1-12/+32
Clamping is only done for fixed-point formats as part of conversion to texture format. Reviewed-by: Zack Rusin <zackr@vmware.com>
2013-08-02draw: inject frontface info into wireframe outputsZack Rusin1-0/+2
Draw module can decompose primitives into wireframe models, which is a fancy word for 'lines', unfortunately that decomposition means that we weren't able to preserve the original front-face info which could be derived from the original primitives (lines don't have a 'face'). To fix it allow draw module to inject a fake face semantic into outputs from which the backends can figure out the original frontfacing info of the primitives. Signed-off-by: Zack Rusin <zackr@vmware.com> Reviewed-by: Roland Scheidegger <sroland@vmware.com> Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
2013-07-31softpipe: use new softpipe_resource_data() accessorBrian Paul3-4/+20
We should probably be using map()/unmap() when accessing resource data, but this is a little better. v2: assert that the resource is not a display target, per Jose. Reviewed-by: José Fonseca <jfonseca@vmware.com>
2013-07-31softpipe: don't ignore pipe_constant_buffer::buffer_offsetBrian Paul1-3/+5
This was never a problem since the Mesa state tracker always gives us a user-space constant buffer with buffer_offset=0. But if another state tracker ever gave us a "HW" constant buffer with non-zero buffer_offset we'd mis-render. Also, use the correct buffer size. And move an assertion to the top of the function. Reviewed-by: Marek Olšák <maraeo@gmail.com> Reviewed-by: José Fonseca <jfonseca@vmware.com>
2013-07-22gallium: Add PIPE_CAP_ENDIANNESSTom Stellard1-0/+2
Cc: mesa-stable@lists.freedesktop.org [ Francisco Jerez: Fix "PIPE_ENDIAN_SMALL" in the documentation, define PIPE_ENDIAN_NATIVE. ]
2013-07-12tgsi: rename the TGSI fragment kill opcodesBrian Paul1-1/+1
TGSI_OPCODE_KIL and KILP had confusing names. The former was conditional kill (if any src component < 0). The later was unconditional kill. At one time KILP was supposed to work with NV-style condition codes/predicates but we never had that in TGSI. This patch renames both opcodes: TGSI_OPCODE_KIL -> KILL_IF (kill if src.xyzw < 0) TGSI_OPCODE_KILP -> KILL (unconditional kill) Note: I didn't just transpose the opcode names to help ensure that I didn't miss updating any code anywhere. I believe I've updated all the relevant code and comments but I'm not 100% sure that some drivers had this right in the first place. For example, the radeon driver might have llvm.AMDGPU.kill and llvm.AMDGPU.kilp mixed up. Driver authors should review their code. Reviewed-by: Jose Fonseca <jfonseca@vmware.com>