summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/draw
Commit message (Collapse)AuthorAgeFilesLines
* draw: specialized cliptesting routinesKeith Whitwell2010-08-2511-205/+267
|
* draw: Remove UNDEFINED_VERTEX_ID checks in emit pathes.Chia-I Wu2010-08-253-28/+0
| | | | | | UNDEFINED_VERTEX_ID is used by draw_pipe_vbuf to decide whether a vertex has been emitted or not. The non-pipeline pathes do not use it (they tell the frontend the max vertex count when prepare() is called).
* gallium: Use draw_set_index_buffer and others.Chia-I Wu2010-08-253-59/+4
| | | | | | Update all drivers to use draw_set_index_buffer, draw_set_mapped_index_buffer, and draw_vbo. Remove draw_set_mapped_element_buffer and draw_set_mapped_element_buffer_range.
* draw: Add draw_set_index_buffer and others.Chia-I Wu2010-08-255-31/+104
| | | | | | | | | This commit adds draw_set_index_buffer, draw_set_mapped_index_buffer, and draw_vbo. The idea behind the new functions is that an index buffer should be a state. draw_arrays and draw_set_mapped_element_buffer are preserved, but the latter will be removed soon.
* draw: reduce the size of the llvm variant keyKeith Whitwell2010-08-224-38/+100
|
* draw: Don't assert if indices point outside vertex buffer.José Fonseca2010-08-221-2/+7
| | | | | | | | | | | | This is valid input, and asserting here does causes the test suites that verify this to crash. Also, the assert was wrongly accepting the case max_index == vert_info->count which, IIUC, is the first vertex outside the buffer. Assuming the vert_info->count is precise (which often is not the case).
* draw_llvm: fix segfaults on non-SSE2 CPUs where it is disabled (v2)Luca Barbieri2010-08-163-17/+32
| | | | | | | | | | | | | | | Changes in v2: - Change function name Currently draw_llvm refuses to create itself on non-SSE2 CPUs due to an alleged LLVM bug. However, this is implemented improperly, because other parts of draw still attempt to access draw->llvm, resulting in segfaults. Instead, put the check in debug_get_option_draw_use_llvm, check that before calling draw_llvm_create, and then check whether draw->llvm is non-null everywhere else.
* drwa: Fix polygon edge flags.Chia-I Wu2010-08-161-1/+1
| | | | | Fix a copy-and-paste error introduced by f141abdc8fdbff41e16b0ce53fa3fa8fba32a7f9.
* draw: No need to make max_vertices even.Chia-I Wu2010-08-166-30/+0
| | | | | | | | | Triangle strip alternates the front/back orientation of its triangles. max_vertices was made even so that varray never splitted a triangle strip at the wrong positions. It did not work with triangle strips with adjacencies. And it is no longer relevant with vsplit.
* draw: Remove DRAW_PIPE_MAX_VERTICES and DRAW_PIPE_FLAG_MASK.Chia-I Wu2010-08-166-30/+19
| | | | | The higher bits of draw elements are no longer used for the stipple or edge flags.
* drwa: Add PRIMITIVE macro to vsplit.Chia-I Wu2010-08-162-20/+31
| | | | | PRIMITIVE is used by the indexed path to flush the entire primitive with custom vertex count checks. It replaces the existing fast path.
* draw: last_vertex_last is always true for GS and SO.Chia-I Wu2010-08-162-9/+3
| | | | | That is, OpenGL decomposition rule is assumed. There should be a pipe_context state to specify the rules.
* draw: Remove varray and vcache.Chia-I Wu2010-08-167-1278/+2
| | | | They have been deprecated by vsplit.
* draw: Replace vcache by vsplit.Chia-I Wu2010-08-163-26/+4
| | | | | | | vcache decomposes primitives while vsplit splits primitives. Splitting is generally easier to do and is faster. More importantly, vcache depends on flatshade_first to decompose. The outputs may have incorrect vertex order which is significant to GS.
* draw: Replace varray by vsplit.Chia-I Wu2010-08-162-8/+9
| | | | | vsplit is a superset of varray. It sets the split flags comparing to varray.
* draw: Add vsplit frontend.Chia-I Wu2010-08-164-1/+693
| | | | | | | | vsplit is based on varray. It sets the split flags when a primitive is splitted. It also has support for indexed primitives. For indexed primitives, unlike vcache, vsplit splits the primitives instead of decomposes them.
* draw: Add new util function draw_pt_trim_count.Chia-I Wu2010-08-163-10/+9
| | | | draw_pt_trim_count is renamed from trim in draw_pt.c.
* draw: Simplify frontend interface a little.Chia-I Wu2010-08-165-21/+11
| | | | | The run method is simplified to take the start vertex and the vertex count.
* draw: Add prim flags to middle ends.Chia-I Wu2010-08-167-26/+46
| | | | | Update the middle end interface to pass the primitive flags from the frontends to the pipeline. No frontend sets the flags yet.
* draw: Add flags to draw_prim_info.Chia-I Wu2010-08-169-11/+36
| | | | | | | | | A primitive may be splitted in frontends. The splitted primitives should convey certain flag bits so that the decomposer can correctly decide the stipple or edge flags. This commit adds flags to draw_prim_info and updates the decomposer to honor the flags. Frontends and middle ends will be updated later.
* draw: Remove unused variable.José Fonseca2010-08-081-4/+2
|
* draw: Use the correct type for integersnobled2010-08-081-4/+2
| | | | | | | | Two integers were being operated on as a vector of floats in draw_llvm_generate(). This bug got uncovered by fixing this bug: http://bugs.freedesktop.org/29407
* draw: Add an assertion to varray's version of trim().Chia-I Wu2010-08-071-1/+6
| | | | | | Assert that "first" is always smaller than "count" and add reasoning. It would be better to simply fix trim(), but it is used in tight loops right now.
* draw: Fix draw_pt_split_prim for primitives with adjacency.Chia-I Wu2010-08-071-3/+3
| | | | Some primitives with adjacency have their "incr" wrong.
* draw: Assert that only the first vetex may have flags set.Chia-I Wu2010-08-071-13/+23
| | | | | | 642d5ba79abc6a231a5fdabb3454b9b082b0d7f8 removed flags masking for vertices other than the first one. Add assertions to be on the safe side.
* draw: Avoid mixed declarations and code.Chia-I Wu2010-08-063-4/+4
| | | | | | | Do not expand LOCAL_VARS to void expression. Otherwise, declarations and code will be mixed when more variables are declared in FUNC_ENTER. This fixes fdo bug #29416.
* draw: Remove unnecessary vertex flag ANDs.Chia-I Wu2010-08-061-19/+15
| | | | | Vertex flags are a contract between vcache and the pipeline. They are set only for the first vertex of a primitive.
* draw: Mask out vertex flags in GS and stream output.Chia-I Wu2010-08-062-2/+2
| | | | This fixes out-of-bound access to the vertices.
* draw: Include draw_decompose_tmp.h in draw_pt_decompose.h.Chia-I Wu2010-08-062-296/+36
| | | | Use draw_decompose_tmp.h to replace pipeline primitive decomposer.
* draw: Include draw_decompose_tmp.h in draw_so_emit_tmp.h.Chia-I Wu2010-08-062-138/+38
| | | | Use draw_decompose_tmp.h to replace stream out primitive decomposer.
* draw: Include draw_decompose_tmp.h in draw_gs_tmp.h.Chia-I Wu2010-08-062-171/+39
| | | | Use draw_decompose_tmp.h to replace GS primitive decomposer.
* draw: Include draw_decompose_tmp.h in draw_pt_vcache_tmp.h.Chia-I Wu2010-08-062-252/+92
| | | | | | Use draw_decompose_tmp.h to replace vcache primitive decomposer. As the new decomposer supports primitives with adjacency, vcache_triangle_adj and vcache_line_adj (and their variants that have flags) are added.
* draw: Add draw_decompose_tmp.h.Chia-I Wu2010-08-061-0/+425
| | | | | | | Including draw_decompose_tmp.h defines a primitive decomposer. It is intended to replace the existing vcache/so/gs/pipe decomposers. This is based on draw_pt_vcache_tmp.h.
* draw: Fix return type of draw_translate_vinfo_size.Vinson Lee2010-08-041-1/+1
| | | | Fixes typo from commit b609cfc7c9c38f26e7e6d6f7dd5dd6d38f4ed209.
* draw: Fix the edge flags of flatshade_first polygons.Chia-I Wu2010-08-041-4/+4
| | | | | | | This bug can be triggered by rendering polygons with glProvokingVertexEXT(GL_FIRST_VERTEX_CONVENTION_EXT); glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
* draw: check for instance divisors in vcache_check_run()Brian Paul2010-08-031-0/+22
| | | | | | | | | | When we have instance divisors we don't really know which vertex elements we'll be fetching ahead of time. This fixes a bug in instanced drawing which was exposed by the new draw_vbo() code because of max_index not being ~0 as often as it used to be. The test for max_index >= DRAW_PIPE_MAX_VERTICES often hid this problem before.
* draw: added a commentBrian Paul2010-08-031-0/+1
|
* draw: use instance divisor in draw_print_arrays()Brian Paul2010-08-031-0/+5
|
* draw: add assertion, rearrange debug codeBrian Paul2010-08-031-4/+10
|
* draw: fix warning in sse code.Dave Airlie2010-08-021-0/+1
| | | | Not sure if this will actually fix the issue, but it fixes the warning.
* draw: actually a noop, rather than not implementedZack Rusin2010-07-301-1/+4
| | | | we just have nothing to do in it right now
* llvmpipe: Fix implicit declaration of lp_func_delete_body warnings.Vinson Lee2010-07-301-0/+1
|
* llvmpipe: delete function bodies after generating machine codeZack Rusin2010-07-301-0/+2
|
* draw: do bounds checking of array elements (debug only)Brian Paul2010-07-291-9/+26
| | | | | | | | | Make sure that all the element indexes actually lie inside the vertex buffer. Also, rename pipe_run() to pipe_run_elts() to be more specific. And assert/check the vertex count for the non-indexed case.
* draw: assorted clean-ups in clipper codeBrian Paul2010-07-291-20/+20
|
* gallium: implement bounds checking for constant buffersBrian Paul2010-07-2911-17/+54
| | | | | | Plumb the constant buffer sizes down into the tgsi interpreter where we can do bounds checking. Optional debug code warns upon out-of-bounds reading. Plus add a few other assertions in the TGSI interpreter.
* draw: add vertex buffer offset in draw_print_arrays()Brian Paul2010-07-291-0/+1
|
* draw: Also emit EMMS on generated LLVM IR.José Fonseca2010-07-291-0/+11
|
* draw: Fix VMware spelling.Vinson Lee2010-07-283-3/+3
|
* draw: add small ybias factor for drawing wide pointsBrian Paul2010-07-231-0/+1
| | | | Fixes minor rasterization error detected by some tests.