summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/draw/draw_pt_fetch.c
Commit message (Collapse)AuthorAgeFilesLines
* s/Tungsten Graphics/VMware/José Fonseca2014-01-171-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* draw/translate: fix instancingZack Rusin2013-06-281-0/+2
| | | | | | | | | | | | | | | | | | We were incorrectly computing the buffer offset when using the instances. The buffer offset is always equal to: start_instance * stride + (instance_num / instance_divisor) * stride We were completely ignoring the start instance quite often producing instances that completely wrong, e.g. if start instance = 5, instance divisor = 2, then on the first iteration it should be: 5 * stride, not (5/2) * stride as we'd have currently, and if start instance = 1, instance divisor = 3, then on the first iteration it should be: 1 * stride, not 0 as we'd have. This fixes it and adjusts all the code to the changes. Signed-off-by: Zack Rusin <zackr@vmware.com>
* draw: don't crash on vertex buffer overflowZack Rusin2013-05-141-2/+2
| | | | | | | | | | | | | | We would crash when stride was bigger than the size of the buffer. The correct behavior is to just fetch zero's in this case. Unfortunatly with user_buffer's there's no way to validate the size because currently we're just not getting it. Adjust the draw interface to pass the size along the mapped buffer, which works perfectly for buffer backed vertex_buffers and, in future, it will allow us to plumb user_buffer sizes through the same interface. Signed-off-by: Zack Rusin <zackr@vmware.com> Reviewed-by: José Fonseca <jfonseca@vmware.com> Reviewed-by: Roland Scheidegger <sroland@vmware.com>
* draw: Properly limit vertex buffer fetches on draw arrays.José Fonseca2012-12-041-1/+1
| | | | | | | | | | | We need to clamp vertex buffer fetch based on its size, not based on the user specified max index hint. This matches draw_pt_fetch_run() above. NOTE: This is a candidate for the stable branches. Reviewed-by: Brian Paul <brianp@vmware.com>
* draw/softpipe: add clip vertex support. (v2)Dave Airlie2012-01-111-2/+2
| | | | | | | | | | | | | | | | softpipe always clipped using the position vector, however for unclipped vertices it stored the position in window coordinates, however when position and clipping are separated, we need to store the clip-space position and the clip-space vertex clip, so we can interpolate both separately. This means we have to take the clip space position and store it to use later. This allows softpipe to pass all the clip-vertex piglit tests. v2: fix llvm draw regression, the structure being passed into llvm needed updating, remove some hardcoded ints that should have been enums while there. Signed-off-by: Dave Airlie <airlied@redhat.com>
* draw: whitespace fixes, etc.Brian Paul2012-01-071-24/+26
|
* draw: fix missing include for u_format.Dave Airlie2012-01-071-0/+1
| | | | Signed-off-by: Dave Airlie <airlied@redhat.com>
* draw: don't translate non-floats to float.Dave Airlie2012-01-071-0/+22
| | | | | | | | translate signed/unsigned integers to coresponding uint/sint r32g32b32a32 types. This fixes a bunch of piglit tests. Signed-off-by: Dave Airlie <airlied@redhat.com>
* draw: fix piglit base vertex + user vertex array testsDave Airlie2012-01-061-1/+1
| | | | | | | | | | | | | This fixes draw-elements-base-vertex user_varrays draw-elements-instanced-base-vertex user_varrays for softpipe with no llvm support (DRAW_USE_LLVM=false) I'm not sure if this is the correct answer, but these tests were showing a max_index of 7, then trying to fetch up to 43, maybe it should be fixing max_index earlier somewhere to take care of this. Signed-off-by: Dave Airlie <airlied@redhat.com>
* draw: Prevent out-of-bounds vertex buffer access.José Fonseca2011-04-011-1/+1
| | | | Based on some code and ideas from Keith Whitwell.
* gallium: remove pipe_vertex_buffer::max_indexMarek Olšák2011-02-141-2/+2
| | | | | This is redundant to pipe_draw_info::max_index and doesn't really fit in the optimizations I plan.
* draw: initialize vertex headerZack Rusin2010-06-251-39/+5
|
* draw: Remove unnecessary headers.Vinson Lee2010-06-151-1/+0
|
* draw: Pass-through pipe_buffer::max_index to translate.José Fonseca2010-04-261-3/+6
| | | | | | | | | | max_index must be observed to prevent crashes due to bad index data. I've been using this patch for some time without regressions. Some places, where we use internal vertex buffer, it is not entirely clear what max_index should be, so passing just ~0 to avoid regressions for now.
* Merge branch 'mesa_7_7_branch'Brian Paul2010-01-221-1/+0
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/gallium/auxiliary/draw/draw_context.c src/gallium/auxiliary/draw/draw_pt_fetch_shade_pipeline.c src/gallium/auxiliary/pipebuffer/Makefile src/gallium/auxiliary/pipebuffer/SConscript src/gallium/auxiliary/pipebuffer/pb_buffer_fenced.c src/gallium/auxiliary/tgsi/tgsi_scan.c src/gallium/drivers/i915/i915_surface.c src/gallium/drivers/i915/i915_texture.c src/gallium/drivers/llvmpipe/lp_setup.c src/gallium/drivers/llvmpipe/lp_tex_sample_c.c src/gallium/drivers/llvmpipe/lp_texture.c src/gallium/drivers/softpipe/sp_prim_vbuf.c src/gallium/state_trackers/xorg/xorg_dri2.c src/gallium/winsys/drm/intel/gem/intel_drm_api.c src/gallium/winsys/drm/nouveau/drm/nouveau_drm_api.c src/gallium/winsys/drm/radeon/core/radeon_drm.c src/gallium/winsys/drm/vmware/core/vmw_screen_dri.c src/mesa/state_tracker/st_cb_clear.c
| * draw: Remove unnecessary headers.Vinson Lee2010-01-211-1/+0
| |
* | gallium: Handle InstanceID as a true 32-bit uint.Michal Krol2010-01-051-4/+9
| |
* | Add lame support for instanceID to draw module.Michal Krol2009-12-301-9/+23
| | | | | | | | It's all screaming for integer support -- fake it with float for now.
* | Implement instanced indexed draw.Michal Krol2009-12-301-0/+1
| |
* | Implement draw_arrays_instanced() in softpipe.Michal Krol2009-12-291-0/+3
| | | | | | | | | | Modify the translate module to respect instance divisors and accept instance id as a parameter to calculate input vertex offset.
* | gallium: more work for edgeflags changesRoland Scheidegger2009-12-141-14/+1
| | | | | | | | | | fixes, cleanups, etc. not working yet
* | gallium: first steps to treat edgeflags as regular vertex elementKeith Whitwell2009-12-091-20/+12
|/ | | | | | | | | | The idea here is to eliminate the set_edgeflags() call in pipe_context by treating edgeflags as a regular vertex element. Edgeflags provoke special treatment in hardware, which means we need to label them in some way, in this case we'll be passing them through the vertex shader and labelling the vertex shader output with a new TGSI semantic (TGSI_SEMANTIC_EDGEFLAG).
* gallium/draw: cope with unused vertex_elementsKeith Whitwell2009-05-051-1/+7
|
* draw: Fix vertex_header initialisation.Michal Krol2009-04-101-1/+1
|
* gallium: standardize on stride instead of pitch in the interfaceZack Rusin2009-01-271-2/+2
|
* gallium: refactor/replace p_util.h with util/u_memory.h and util/u_math.hBrian Paul2008-08-241-1/+1
| | | | Also, rename p_tile.[ch] to u_tile.[ch]
* Revert "draw: no need to rearrange most primitives in vcache for ↵Keith Whitwell2008-06-101-4/+1
| | | | | | flatshade-first" This reverts commit ad44e68706877ab06929747e7a82c718c1c27e02.
* draw: no need to rearrange most primitives in vcache for flatshade-firstKeith Whitwell2008-06-101-1/+4
| | | | | | | The driver/pipeline will still be applying flatshade-first state to the triangles emitted from vcache, so there's no need to rotate the vertices of most primitives. The only exception is POLYGON, as explained in the code.
* draw: mimize cost of translate key compares, use cache universallyKeith Whitwell2008-05-121-5/+2
|
* draw: fix translate double-free, minor cleanupsKeith Whitwell2008-05-091-1/+2
|
* Merge branch 'gallium-0.1' into gallium-vertex-linearKeith Whitwell2008-05-081-3/+5
|\
| * draw: only fill in / compare the part of the translate key we're using.Keith Whitwell2008-05-081-3/+5
| | | | | | | | | | It's quite a big struct & we examine it a lot (too much). Reduce the impact of this by just looking at the active part where possible.
* | implement linear emition and fetching and plug it in the varray pathsZack Rusin2008-05-081-0/+36
|/
* draw: default edgeflag should be oneKeith Whitwell2008-04-241-1/+1
|
* draw: handle edgeflags and reset-line-stipple againKeith Whitwell2008-04-241-0/+17
|
* Add translate cache to fetch_emit stage and add out of memoryZack Rusin2008-04-231-0/+5
| | | | checks to code creating the cache.
* Create a sharable translate_cache and use it.Zack Rusin2008-04-231-60/+8
|
* fix the simple hash finding function and use itZack Rusin2008-04-231-13/+4
|
* gallium: fix broken hashing for vertex translationBrian Paul2008-04-231-5/+13
| | | | | | | It seems we get hash collisions fairly easily and the code as it was didn't deal with that properly. I think we need a simpler hashing interface...
* Cache translate's structs for emits and fetches.Zack Rusin2008-04-221-8/+57
| | | | Results in a fair speed improvement.
* draw: squash a couple of memory leaksKeith Whitwell2008-04-211-0/+3
|
* draw: move incoming vertex state into draw->ptKeith Whitwell2008-04-191-10/+10
| | | | | This state is effectively private to the vertex processing part of the draw module.
* draw: always emit header in draw_pt_fetch.cKeith Whitwell2008-04-191-6/+2
|
* translate: add sse version based on old draw_vf_sse.cKeith Whitwell2008-04-181-1/+1
|
* draw: split off all the extra functionality in the vertex shaderKeith Whitwell2008-04-181-0/+175
This will at least allow us to make the initial gains to get decent vertex performance much more quickly & with higher confidence of getting it right. At some later point can look again at code-generating all the fetch/cliptest/viewport extras in the same block as the vertex shader. For now, just need to get some decent baseline performance.