summaryrefslogtreecommitdiff
path: root/src/gallium/auxiliary/draw/draw_context.h
AgeCommit message (Collapse)Author
2010-11-30gallivm/llvmpipe: squash merge of the llvm-context branchBrian Paul
This branch defines a gallivm_state structure which contains the LLVMBuilderRef, LLVMContextRef, etc. All data structures built with this object can be periodically freed during a "garbage collection" operation. The gallivm_state object has to be passed to most of the builder functions where LLVMBuilderRef used to be used. Conflicts: src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c src/gallium/drivers/llvmpipe/lp_state_setup.c
2010-10-12draw/llvmpipe: replace DRAW_MAX_TEXTURE_LEVELS with PIPE_MAX_TEXTURE_LEVELSBrian Paul
There's no apparent reason for the former to exist. And they didn't even have the same value.
2010-09-17gallium: rework handling of sprite_coord_enable stateBrian Paul
Implement the pipe_rasterizer_state::sprite_coord_enable field in the draw module (and softpipe) according to what's specified in the documentation. The draw module can now add any number of extra vertex attributes to a post-transformed vertex and generate texcoords for those attributes per sprite_coord_enable. Auto-generated texcoords for sprites only worked for one texcoord unit before. The frag shader gl_PointCoord input is now implemented like any other generic/texcoord attribute. The draw module now needs to be informed about fragment shaders since we need to look at the fragment shader's inputs to know which ones need auto-generated texcoords. Only softpipe has been updated so far.
2010-09-14gallium: introduce get_shader_param (ALL DRIVERS CHANGED) (v3)Luca Barbieri
Changes in v3: - Also change trace, which I forgot about Changes in v2: - No longer adds tessellation shaders Currently each shader cap has FS and VS versions. However, we want a version of them for geometry, tessellation control, and tessellation evaluation shaders, and want to be able to easily query a given cap type for a given shader stage. Since having 5 duplicates of each shader cap is unmanageable, add a new get_shader_param function that takes both a shader cap from a new enum and a shader stage. Drivers with non-unified shaders will first switch on the shader and, within each case, switch on the cap. Drivers with unified shaders instead first check whether the shader is supported, and then switch on the cap. MAX_CONST_BUFFERS is now per-stage. The geometry shader cap is removed in favor of checking whether the limit of geometry shader instructions is greater than 0, which is also used for tessellation shaders. WARNING: all drivers changed and compiled but only nvfx tested
2010-08-25draw: specialized cliptesting routinesKeith Whitwell
2010-08-25gallium: Use draw_set_index_buffer and others.Chia-I Wu
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.
2010-08-25draw: Add draw_set_index_buffer and others.Chia-I Wu
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.
2010-07-15draw: move prototype, update commentBrian Paul
2010-07-06draw: implement vertex texture sampling using llvmZack Rusin
2010-06-11gallium/softpipe/draw: support samplers in geometry shadersZack Rusin
2010-06-08gallium: basic and initial implementation of the stream output interfaceZack Rusin
aka transform feedback
2010-04-21gallium/draw: fix point sprite handlingBrian Paul
New draw API function to indicate whether or not to convert points to quads for sprite rasterization. Fix point-to-quad conversion regression in the wide-point stage. We need to check the pipe_rasterizer_state::point_quad_rasterization flag.
2010-04-20Merge branch 'gallium-index-bias'José Fonseca
2010-04-19draw llvm: fix constructor messZack Rusin
use just one constructor to figure out whether to use llvm.
2010-04-19draw: Implement index bias.José Fonseca
2010-04-19Merge branch '7.8'Brian Paul
Conflicts: src/gallium/auxiliary/draw/draw_context.c src/gallium/auxiliary/draw/draw_pipe_aaline.c src/gallium/drivers/llvmpipe/lp_context.c
2010-04-19gallium/draw: use correct rasterization state for wide/AA points/linesBrian Paul
When points or lines are decomposed into triangles, we need to be sure to disable polygon culling, stippling, "un-filled" modes, etc. This patch sets the rasterization state to disable those things prior to drawing points/lines with triangles, then restores the previous state afterward. The new piglit point-no-line-cull test checks this problem & solution.
2010-04-11scons: Make LLVM a black-white dependency.José Fonseca
Now that draw depends on llvm it is very difficult to correctly handle broken llvm installations. Either the user requests LLVM and it needs to supply a working installation. Or it doesn't, and it gets no LLVM accelerate pipe drivers.
2010-04-07llvmpipe: Fix USE_DRAW_LLVM build. Use lp_build_engine.José Fonseca
2010-02-22gallium/draw: initial code to properly support llvm in the draw moduleZack Rusin
code generate big chunks of the vertex pipeline in order to speed up software vertex processing.
2010-01-28gallium: Enable multiple constant buffers for vertex and geometry shaders.Michal Krol
2010-01-05Merge branch 'master' into instanced-arraysMichal Krol
Conflicts: src/gallium/auxiliary/tgsi/tgsi_dump.c src/gallium/include/pipe/p_shader_tokens.h
2009-12-29Implement draw_arrays_instanced() in softpipe.Michal Krol
Modify the translate module to respect instance divisors and accept instance id as a parameter to calculate input vertex offset.
2009-12-25gallium: add geometry shader support to galliumZack Rusin
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).
2008-12-10Merge commit 'origin/gallium-0.1' into gallium-0.2Brian Paul
2008-12-10gallium: added draw_set_mrd() function to fix polygon offsetBrian Paul
The Minimum Resolvable Depth factor depends on the driver and can't just be computed from the number of Z buffer bits. Glean's polygon offset test now passes with softpipe. Still need to determine the MRD factor for other gallium drivers, if they use the draw module's polygon offset stage...
2008-12-10draw: add const qualifiersKeith Whitwell
2008-12-04gallium: added draw_texture_samplers() to support texture fetches from ↵Brian
vertex shaders This may only be practical for the softpipe driver at this time.
2008-10-07draw: add switch for drivers to force vertex data passthroughKeith Whitwell
2008-08-25gallium: added const qualifiers on some draw funcsBrian
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-04-22draw: allow drivers to query pipeline state more easilyKeith Whitwell
Also, provide a separate flag to say whether the driver can handle clipping/rhw tasks, in addition to the API flag which indicates they have already been done.
2008-04-21draw: propogate lots of errorsKeith Whitwell
2008-04-21draw: propogate errors out of aapoint stageKeith Whitwell
2008-04-21draw: propogate errors out of aaline stageKeith Whitwell
2008-04-21gallium: Centralize SSE usage logic.José Fonseca
2008-04-19draw: remove named clipmask flags, tidy up pt middle endsKeith Whitwell
2008-04-04gallium: Handle client-supplied edgeflags.Keith Whitwell
Also, implement support in the draw module. We were hardwiring these to one for quite a long time... Currently using a draw_set_edgeflags() function, may be better to push the argument into the draw_arrays() function. TBD.
2008-03-29gallium: Set vertex state/buffers en-mass.Brian Paul
2008-03-14gallium: add explicit control for point sprites (convert points to textured ↵Brian
quads) New draw_enable_point_sprites() function. Fixes spriteblast.c demo
2008-03-13gallium: added draw_enable_line_stipple() functionBrian
Allows drivers that implement line stipple to turn off this drawing stage.
2008-03-10draw: placeholder/prototype code for a passthrough draw pathKeith Whitwell
2008-02-28gallium: split draw_wide_prim stage into separate point/line stages.Brian Paul
This fixes a validation/code-path problem. Enabling the stage for the sake of wide points also inadvertantly caused wide lines to be converted to tris when we actually want them passed through, such as for the AA line stage. This is just cleaner now. Also, replace draw_convert_wide_lines() with draw_wide_line_threshold() as was done for points. Allows for 1-pixel lines to be converted too if needed.
2008-02-27gallium: added draw_num_vs_outputs() to query number of post-transform ↵Brian
vertex attribs
2008-02-26gallium: updated prototype (missed in prev commit)Brian
2008-02-21gallium: new draw stage for polygon stipple.Brian
For hardware without native polygon stipple. Create a 32x32 alpha texture that encodes the stipple pattern. Modify the user's fragment program to sample the texture (with gl_FragCoord) and kill the fragment according to the texel value. Temporarily enabled in softpipe driver, replacing the sp_quad_stipple.c step.
2008-02-21gallium: new AA point drawing stageBrian
AA points are drawn by converting the point to a quad, then modifying the user's fragment shader to compute a coverage value. The final fragment color's alpha is modulated by the coverage value. Fragments outside the point's radius are killed.
2008-02-18gallium: antialiased line drawingBrian
New draw/prim stage: draw_aaline. When installed, lines are replaced by textured quads to do antialiasing. The current user-defined fragment shader is modified to do a texture fetch and modulate fragment alpha.