summaryrefslogtreecommitdiff
path: root/src/mesa/state_tracker/st_draw.c
AgeCommit message (Collapse)Author
2009-12-09gallium: first steps to treat edgeflags as regular vertex elementKeith Whitwell
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).
2009-12-01mesa/st: avoid quadstrips if its easy to do soKeith Whitwell
Tristrips are easier for many drivers to handle.
2009-11-26Merge commit 'origin/st-shader-varients'Roland Scheidegger
Conflicts: src/mesa/state_tracker/st_atom_shader.c src/mesa/state_tracker/st_program.c
2009-11-15st/mesa: comments for st_draw.cBrian Paul
2009-11-15mesa/st: refactor vertex and fragment shader translationKeith Whitwell
Translate vertex shaders independently of fragment shaders. Previously tried to make fragment shader semantic indexes always start at zero and exclude holes. This was unnecessary but meant that vertex shader translation had to be adjusted to take this into account. Now use a fixed scheme for labelling special FS input semantics (color, etc), and another fixed scheme for the generics. With this, vertex shaders can be translated independently of the bound fragment shader, assuming mesa has done its own job and ensured that the vertex shader provides at least the inputs the fragment shader is looking for. The state-tracker didn't attempt to do anything about this previously, so it shouldn't be needed now.
2009-10-25i965g: more work on compiling, particularly the brw_draw filesKeith Whitwell
2009-09-24Merge branch 'mesa_7_5_branch' into mesa_7_6_branchBrian Paul
2009-09-23st/mesa: trim calculated userbuffer sizeKeith Whitwell
In get_array_bounds we were previously defining a user buffer sized as (nr_vertices * stride). The trouble is that if the vertex data occupies less than stride bytes, the extra tailing (stride - size) bytes may extend outside the memory actually allocated by the app and caused a segfault. To fix this, define a the buffer bounds to be: ptr .. ptr + (nr-1)*stride + element_size
2009-08-12vbo: Avoid extra validation of DrawElements.Eric Anholt
This saves mapping the index buffer to get a bounds on the indices that drivers just drop on the floor in the VBO case (cache win), saves a bonus walk of the indices in the CheckArrayBounds case, and other miscellaneous validation. On intel it's a particularly a large win (50-100% in my app) because even though we let the indices stay in both CPU and GPU caches, we still end up waiting for the GPU to be done with the buffer before reading from it. Drivers that want the min/max_index fields must now check index_bounds_valid and use vbo_get_minmax_index before using them.
2009-12-15Merge branch 'mesa_7_6_branch' into mesa_7_7_branchIan Romanick
Conflicts: src/gallium/drivers/softpipe/sp_quad_blend.c
2009-12-12st/mesa: Silence uninitialized variables warnings in st_draw.c.Vinson Lee
2009-06-22st/mesa: fix setup_edgeflags() regressionBrian Paul
stobj is now non-null for the default/null buffer object. Update the test to check the buffer ID to see if it's a real buffer object.
2009-05-21st: add support for GL_EXT_vertex_array_bgraBrian Paul
2009-03-09st: silence warningBrian Paul
2009-03-09st: use pointer_to_offset() cast wrapper to convert pointers to uintBrian Paul
Silences warnings with 64-bit builds. See comments for details.
2009-03-04gallium: Unify reference counting.Michel Dänzer
The core reference counting code is centralized in p_refcnt.h. This has some consequences related to struct pipe_buffer: * The screen member of struct pipe_buffer must be initialized, or pipe_buffer_reference() will crash trying to destroy a buffer with reference count 0. u_simple_screen takes care of this, but I may have missed some of the drivers not using it. * Except for rare exceptions deep in winsys code, buffers must always be allocated via pipe_buffer_create() or via screen->*buffer_create() rather than via winsys->*buffer_create().
2009-02-12mesa: consistantly use mesa memory-functions in gallium state trackerBrian Paul
Use _mesa_malloc(), _mesa_free(), etc everywhere, not malloc(), free(), etc. Still using CALLOC_STRUCT() at this point.
2009-02-09mesa: merge gallium-0.2 into gallium-master-mergeBrian Paul
Merge commit 'origin/gallium-0.2' into gallium-master-merge Conflicts: Makefile docs/relnotes-7.4.html docs/relnotes.html src/mesa/drivers/dri/i965/brw_wm.h src/mesa/main/imports.c src/mesa/main/mtypes.h src/mesa/main/texcompress.c src/mesa/main/texenvprogram.c src/mesa/main/version.h src/mesa/vbo/vbo_exec_api.c src/mesa/vbo/vbo_save_draw.c
2009-02-03mesa: fix offset problem with interleaved arraysAlan Hourihane
2009-01-27gallium: standardize on stride instead of pitch in the interfaceZack Rusin
2008-12-15Merge commit 'origin/gallium-0.1' into gallium-0.2Alan Hourihane
Conflicts: src/gallium/winsys/gdi/SConscript
2008-12-12mesa: move declarationAlan Hourihane
2008-12-12mesa: when we have interleaved arrays, check bounds for bothAlan Hourihane
VBO's and user space objects
2008-12-12gallium: fix refcount bug introduced in eb20e2984Keith Whitwell
2008-12-12st: reduce unnecessary calls to pipe->set_vertex_buffers()Keith Whitwell
2008-12-12st: move feedback draw function to new fileKeith Whitwell
2008-11-10Mesa: fix number of buffers in st_draw_vbo().Pekka Paalanen
The clean-up call to pipe->set_vertex_buffers() should use the same number of buffers as the first call. Signed-off-by: Pekka Paalanen <pq@iki.fi>
2008-11-05gallium: added check for degenerate drawing callsBrian Paul
2008-11-05gallium: if VERBOSE_GLSL flag is set, check for non-initialized uniforms at ↵Brian Paul
draw time This will warn the user that the shader being run may be using uninitialized uniform variables.
2008-10-07Mesa: fix the case where there are no vertex attributes.Stephane Marchesin
This is a backport of 8e8208d6db8b764568539784a6473d545dec2265 to gallium-0.1
2008-09-03gallium: Have pipe_buffer_* receive a pipe_screen instead of a pipe_context.José Fonseca
We want to use the pipe_buffer_* inlines everywhere, but a pipe context is not always available nor is it needed.
2008-08-27gallium: better support for user-space interleaved arraysBrian Paul
Basically, set up one user-space wrapper for all arrays instead of the individual arrays.
2008-08-27gallium: in st_draw_vbo() try to detect interleaved arrays in a single VBO.Brian Paul
2008-08-15gallium: in st_draw_vbo() use ctx->Current.Attrib[] values when arrays are ↵Brian Paul
missing/null fixes potential segfaults when vertex arrays are missing
2008-08-07mesa: pf_sprint_name->pf_name.José Fonseca
2008-07-10gallium: check for FEATURE_feedback and FEATURE_drawpix when creating/using ↵Brian Paul
the aux draw module
2008-07-07gallium: move assertion (though not really significant)Brian Paul
2008-07-07gallium: simplify/fix buffer_offset, src_offset computation for VBO arraysBrian Paul
Things broke when vertex position wasn't the first attribute.
2008-06-24mesa: Use appropriate unsigned/signed, float/integer types.José Fonseca
2008-06-23gallium: added support for fixed-point formats, drawingBrian Paul
2008-05-29draw: make sure constant buffer data is aligned before passing to aos.cKeith Whitwell
2008-05-29draw: draw_range_elements trialKeith Whitwell
2008-05-02Some changed for non-C99 compilersAlan Hourihane
2008-04-30gallium: use new buffer wrapper functions in p_inlines.hBrian Paul
This allows us to remove most of the direct references to winsys in the state tracker.
2008-04-25gallium: remove unused st_draw_vertices()Brian Paul
2008-04-24gallium: fix an edgeflags crashBrian Paul
2008-04-24gallium: initial edgeflags codeBrian Paul
2008-04-19draw: move incoming vertex state into draw->ptKeith Whitwell
This state is effectively private to the vertex processing part of the draw module.
2008-03-29gallium: Set vertex state/buffers en-mass.Brian Paul
2008-03-27gallium: replace PIPE_ATTRIB_MAX with PIPE_MAX_ATTRIBSBrian
The later follows the naming scheme of other limits. Keep the old definition until all possible usage is updated.