Age | Commit message (Collapse) | Author |
|
|
|
Some pathological triangles cause a theoritically impossible number of
clipped vertices.
The clipper will still assert, but at least release builds will not
crash, while this problem is further investigated.
|
|
If a triangle was completely culled by clipping, we would still try to
fix up its provoking vertex.
|
|
|
|
|
|
As it was, we weren't obeying the draw->pipeline.point_sprite state.
Fixes point sprites in llvmpipe driver.
|
|
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.
|
|
|
|
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
|
|
|
|
Include tgsi_exec.h for TGSI_EXEC_NUM_TEMPS.
Include draw_vs.h for draw_vs_varient.
|
|
Include p_screen.h for completely type to pipe_screen.
|
|
|
|
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).
|
|
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.
|
|
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.
|
|
|
|
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).
|
|
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.
|
|
Fix a copy-and-paste error introduced by
f141abdc8fdbff41e16b0ce53fa3fa8fba32a7f9.
|
|
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.
|
|
The higher bits of draw elements are no longer used for the stipple or
edge flags.
|
|
PRIMITIVE is used by the indexed path to flush the entire primitive with
custom vertex count checks. It replaces the existing fast path.
|
|
That is, OpenGL decomposition rule is assumed. There should be a
pipe_context state to specify the rules.
|
|
They have been deprecated by vsplit.
|
|
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.
|
|
vsplit is a superset of varray. It sets the split flags comparing to
varray.
|
|
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_pt_trim_count is renamed from trim in draw_pt.c.
|
|
The run method is simplified to take the start vertex and the vertex
count.
|
|
Update the middle end interface to pass the primitive flags from the
frontends to the pipeline. No frontend sets the flags yet.
|
|
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.
|
|
|
|
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
|
|
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.
|
|
Some primitives with adjacency have their "incr" wrong.
|
|
642d5ba79abc6a231a5fdabb3454b9b082b0d7f8 removed flags masking for
vertices other than the first one. Add assertions to be on the safe
side.
|
|
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.
|
|
Vertex flags are a contract between vcache and the pipeline. They are
set only for the first vertex of a primitive.
|
|
This fixes out-of-bound access to the vertices.
|
|
Use draw_decompose_tmp.h to replace pipeline primitive decomposer.
|
|
Use draw_decompose_tmp.h to replace stream out primitive decomposer.
|
|
Use draw_decompose_tmp.h to replace GS primitive decomposer.
|
|
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.
|
|
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.
|
|
Fixes typo from commit b609cfc7c9c38f26e7e6d6f7dd5dd6d38f4ed209.
|
|
This bug can be triggered by rendering polygons with
glProvokingVertexEXT(GL_FIRST_VERTEX_CONVENTION_EXT);
glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
|
|
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.
|
|
|
|
|