History log of /external/mesa3d/src/gallium/auxiliary/draw/draw_pt_so_emit.c
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
8575ddb64498cae60199b2c26c75de2616b57425 11-Dec-2015 Roland Scheidegger <sroland@vmware.com> draw: rename vertex header members

clip -> clip_vertex and pre_clip_pos -> clip_pos.
Looks more obvious to me what these values actually represent (so use
something resembling the vs output names).

Reviewed-by: Brian Paul <brianp@vmware.com
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
/external/mesa3d/src/gallium/auxiliary/draw/draw_pt_so_emit.c
a2a1a5805fd617e7f3cc8be44dd79b50da07ebb9 21-Jul-2015 Ilia Mirkin <imirkin@alum.mit.edu> gallium: replace INLINE with inline

Generated by running:
git grep -l INLINE src/gallium/ | xargs sed -i 's/\bINLINE\b/inline/g'
git grep -l INLINE src/mesa/state_tracker/ | xargs sed -i 's/\bINLINE\b/inline/g'
git checkout src/gallium/state_trackers/clover/Doxyfile

and manual edits to
src/gallium/include/pipe/p_compiler.h
src/gallium/README.portability

to remove mentions of the inline define.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Acked-by: Marek Olšák <marek.olsak@amd.com>
/external/mesa3d/src/gallium/auxiliary/draw/draw_pt_so_emit.c
d69fd5d940b7c0c4052fe542d5f2dcf6d2605e02 01-May-2014 José Fonseca <jfonseca@vmware.com> draw: Prevent signed/unsigned comparisons.

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
/external/mesa3d/src/gallium/auxiliary/draw/draw_pt_so_emit.c
dfa25ea5cd19d5a050a1c94bd7370a2259b9f007 07-Mar-2014 Zack Rusin <zackr@vmware.com> gallium: allow setting of the internal stream output offset

D3D10 allows setting of the internal offset of a buffer, which is
in general only incremented via actual stream output writes. By
allowing setting of the internal offset draw_auto is capable
of rendering from buffers which have not been actually streamed
out to. Our interface didn't allow. This change functionally
shouldn't make any difference to OpenGL where instead of an
append_bitmask you just get a real array where -1 means append
(like in D3D) and 0 means do not append.

Signed-off-by: Zack Rusin <zackr@vmware.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
/external/mesa3d/src/gallium/auxiliary/draw/draw_pt_so_emit.c
bd3909f265908e30ef0e569fab57e9a042750b3a 23-Aug-2013 Roland Scheidegger <sroland@vmware.com> draw: clean up setting stream out information a bit

In particular noone is interested in the vertex count, so drop that,
and also drop the duplicated num_primitives_generated /
so.primitives_storage_needed variables in drivers. I am unable for now to figure
out if primitives_storage_needed in SO stats (used for d3d10) should
increase if SO is disabled, though the equivalent num_primitives_generated
used for OpenGL definitely should increase. In any case we were only counting
when SO is active both in softpipe and llvmpipe anyway so don't pretend there's
an independent num_primitives_generated counter which would count always.
(This means the PIPE_QUERY_PRIMITIVES_GENERATED count will still be wrong just
as before, should eventually fix this by doing either separate counting for this
query or adjust the code so it always counts this even if SO is inactive depending
on what's correct for d3d10.)

Reviewed-by: Brian Paul <brianp@vmware.com>
/external/mesa3d/src/gallium/auxiliary/draw/draw_pt_so_emit.c
1c2e5c223da28cdffe156b6b430fcdf638909021 28-Jun-2013 Zack Rusin <zackr@vmware.com> draw/translate: fix instancing

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>
/external/mesa3d/src/gallium/auxiliary/draw/draw_pt_so_emit.c
a232afdbfbaac156e981f55b8bdeb305026cde84 03-May-2013 Zack Rusin <zackr@vmware.com> draw/pt: adjust overflow calculations

gallium lies. buffer_size is not actually buffer_size but available
size, which is 'buffer_size - buffer_offset' so by adding buffer
offset we'd incorrectly compute overflow.

Signed-off-by: Zack Rusin <zackr@vmware.com>
Reviewed-by: José Fonseca <jfonseca@vmware.com>
/external/mesa3d/src/gallium/auxiliary/draw/draw_pt_so_emit.c
a6e7c22664c2fe9a5d0dc2088c60047fb40938ed 27-Apr-2013 Zack Rusin <zackr@vmware.com> draw/so: fix overflow calculation

only report overflow for missing targets if they're actually being
used. if the targets are missing but are not being used by any
slot in the stream output declaration we should correctly just
ignore them.

Signed-off-by: Zack Rusin <zackr@vmware.com>
Reviewed-by: José Fonseca <jfonseca@vmware.com>
/external/mesa3d/src/gallium/auxiliary/draw/draw_pt_so_emit.c
0031cde1e199a82dfe4b754931fb0a5bdf5582f9 27-Apr-2013 Zack Rusin <zackr@vmware.com> draw/so: indicate overflow when buffer is missing

We were crashing if one of the buffers wasn't set, we should
just treat it as an overflow. It's useful when using so
statistics because it allows one to figure out how much data
would be generated by so without actually writing any of it.

Signed-off-by: Zack Rusin <zackr@vmware.com>
Reviewed-by: José Fonseca <jfonseca@vmware.com>
/external/mesa3d/src/gallium/auxiliary/draw/draw_pt_so_emit.c
53d36d5fb09cda39c8d3646cbccbd343b34bfb54 24-Apr-2013 Zack Rusin <zackr@vmware.com> draw/so: Fix overflow calculations

We weren't taking the buffer offset, destination offset or the
stride into consideration so we were frequently writing into
an overflown buffer.

Signed-off-by: Zack Rusin <zackr@vmware.com>
Reviewed-by: José Fonseca <jfonseca@vmware.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
/external/mesa3d/src/gallium/auxiliary/draw/draw_pt_so_emit.c
c1299204adc2c926b0ab089e3d49cae64688d39d 18-Apr-2013 Zack Rusin <zackr@vmware.com> draw/so: uses the correct index with the pre clipped coordinates

pre_clip_pos is a float[4] we just used (*float)[4] to be able to
jump within the array of vertex_headers with it. So if the idx
happened to be anything but 0, we'd actually read from some garbage
in memory. Change it to just be a simple pointer instead of casting
it to something that it's not. As suggested by Jose.

Signed-off-by: Zack Rusin <zackr@vmware.com>
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
/external/mesa3d/src/gallium/auxiliary/draw/draw_pt_so_emit.c
822c21c7763afde4d4a94af3935b4b629d4eb34a 29-Mar-2013 Zack Rusin <zackr@vmware.com> draw/so: maintain an exact number of written vertices

It's quite helpful during the rendering when we know
exactly the count of the vertices available in the
buffer.

Signed-off-by: Zack Rusin <zackr@vmware.com>
Reviewed-by: José Fonseca <jfonseca@vmware.com>
/external/mesa3d/src/gallium/auxiliary/draw/draw_pt_so_emit.c
6a9d7659d68c8678f4e469b15c15ff0f10075746 13-Mar-2013 Brian Paul <brianp@vmware.com> draw: init pre_clip_pos = NULL to fix optimized build warning
/external/mesa3d/src/gallium/auxiliary/draw/draw_pt_so_emit.c
42c1b33f6d5ee1ab4ab7fdc8a7ab2c1dcd9e43e6 12-Mar-2013 Zack Rusin <zackr@vmware.com> draw/so: Fix stream output with geometry shaders

If geometry shader is present its stream output info should
be used instead of the vs and we shouldn't use the pre-clipped
corrdinates.

Signed-off-by: Zack Rusin <zackr@vmware.com>
Reviewed-by: José Fonseca <jfonseca@vmware.com>
/external/mesa3d/src/gallium/auxiliary/draw/draw_pt_so_emit.c
9e41b0badbab97c9db03d5825f91533c69e4f9f9 13-Dec-2012 Dave Airlie <airlied@redhat.com> draw/llvmpipe: fix transform feedback position + enable other extensions

This builds on the previous draw/softpipe patch.

So llvmpipe does streamout calls after clip/viewport stages,
but we have the pre-clip position stored for later use, so
when we are doing transform feedback, and its the position vertex
grab the vertex from the stored pre clip position.

The perfect fix is too probably add a codegen transform feedback
stage in between shader and clip stages, but this is good enough
for now.

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
/external/mesa3d/src/gallium/auxiliary/draw/draw_pt_so_emit.c
55d37eb40edff67fa12d1729165b292b914d8e51 12-Dec-2012 Dave Airlie <airlied@gmail.com> draw: add support for later transform feedback extensions

This adds support to draw for the new features of transform feedback.

a) fix count_from_stream_output, using max_index+1 for now but it looks
like it should be valid as its derived from the vertex elements/vbo.

b) fix striding and dst offsets in output buffers - was just wrong before.

c) fix crash if tfb is suspended (so.num_targets == 0)

This also enables the new features on softpipe. It should be possible
to enable them on llvmpipe as well after this commit, but would need
to schedule piglit runs.

Signed-off-by: Dave Airlie <airlied@redhat.com>
/external/mesa3d/src/gallium/auxiliary/draw/draw_pt_so_emit.c
2449695e822421fdcaf1c66dffc12d7d705ea69d 17-Dec-2011 Marek Olšák <maraeo@gmail.com> gallium: improve the pipe_stream_output_info struct (v2)

There are 3 changes:

1) stride is specified for each buffer, not just one, so that drivers don't
have to derive it from the outputs

2) new per-output property dst_offset, which specifies the offset
into the buffer in dwords where the output should be stored,
so that drivers don't have to compute the offsets manually;
this will also be useful for gl_SkipComponents
from ARB_transform_feedback3

3) register_mask is removed, instead, there is start_component
and num_components; register_mask with non-consecutive 1s
doesn't make much sense (some hardware cannot do packing of components)

Christoph Bumiller: fixed nvc0.

v2: resolve merge conflicts in Draw and clean it up
/external/mesa3d/src/gallium/auxiliary/draw/draw_pt_so_emit.c
8597c986d739212024bcb663470b929095230a12 10-Jan-2012 Brian Paul <brianp@vmware.com> draw: remove unused 'so' variable in draw_pt_so_emit()
/external/mesa3d/src/gallium/auxiliary/draw/draw_pt_so_emit.c
ec8cbd79ac4065111365a6720c9564de56855cc8 04-Jan-2012 Dave Airlie <airlied@redhat.com> draw/softpipe: EXT_transform_feedback support (v2)

This replaces the current code with an implementation compatible with
the new gallium interface. I've left some of the remains of the interface
intact so llvmpipe keeps building correctly, and I'll take a look at fixing
llvmpipe up later.

v2: fixup as per Brian's review

Signed-off-by: Dave Airlie <airlied@redhat.com>
/external/mesa3d/src/gallium/auxiliary/draw/draw_pt_so_emit.c
861a029ddb31e91bb4d8e18ab708d0d172f63aad 15-Dec-2011 Marek Olšák <maraeo@gmail.com> gallium: interface changes necessary to implement transform feedback (v5)

Namely:
- EXT_transform_feedback
- ARB_transform_feedback2
- ARB_transform_feedback_instanced

The old interface was not useful for OpenGL and had to be reworked.

This interface was originally designed for OpenGL, but additional
changes have been made in order to make st/d3d1x support easier.

The most notable change is the stream-out info must be linked
with a vertex or geometry shader and cannot be set independently.
This is due to limitations of existing hardware (special shader
instructions must be used to write into stream-out buffers),
and it's also how OpenGL works (stream outputs must be specified
prior to linking shaders).

Other than that, each stream output buffer has a "view" into it that
internally maintains the number of bytes which have been written
into it. (one buffer can be bound in several different transform
feedback objects in OpenGL, so we must be able to have several views
around) The set_stream_output_targets function contains a parameter
saying whether new data should be appended or not.

Also, the view can optionally be used to provide the vertex
count for draw_vbo. Note that the count is supposed to be stored
in device memory and the CPU never gets to know its value.

OpenGL way | Gallium way
------------------------------------
BeginTF = set_so_targets(append_bitmask = 0)
PauseTF = set_so_targets(num_targets = 0)
ResumeTF = set_so_targets(append_bitmask = ~0)
EndTF = set_so_targets(num_targets = 0)
DrawTF = use pipe_draw_info::count_from_stream_output

v2: * removed the reset_stream_output_targets function
* added a parameter append_bitmask to set_stream_output_targets,
each bit specifies whether new data should be appended to each
buffer or not.
v3: * added PIPE_CAP_STREAM_OUTPUT_PAUSE_RESUME for ARB_tfb2,
note that the draw-auto subset is always required (for d3d10),
only the pause/resume functionality is limited if the CAP is not
advertised
v4: * update gallium/docs
v5: * compactified struct pipe_stream_output_info, updated dump/trace
/external/mesa3d/src/gallium/auxiliary/draw/draw_pt_so_emit.c
c3fee80f2b35f6a7e48d6015bfc759c66b7e1a2c 07-Aug-2010 Chia-I Wu <olv@lunarg.com> draw: Remove DRAW_PIPE_MAX_VERTICES and DRAW_PIPE_FLAG_MASK.

The higher bits of draw elements are no longer used for the stipple or
edge flags.
/external/mesa3d/src/gallium/auxiliary/draw/draw_pt_so_emit.c
f1fc444bb05421404f42e8d08e9085c6fb6ce7a9 04-Aug-2010 Chia-I Wu <olv@lunarg.com> draw: Mask out vertex flags in GS and stream output.

This fixes out-of-bound access to the vertices.
/external/mesa3d/src/gallium/auxiliary/draw/draw_pt_so_emit.c
94d256591d83ac1330f7237e865784618d124d09 01-Aug-2010 Chia-I Wu <olv@lunarg.com> draw: Include draw_decompose_tmp.h in draw_so_emit_tmp.h.

Use draw_decompose_tmp.h to replace stream out primitive decomposer.
/external/mesa3d/src/gallium/auxiliary/draw/draw_pt_so_emit.c
91862051f98e646647906bb15aec5c5d537f87e4 17-Jun-2010 Zack Rusin <zackr@vmware.com> draw: validate stream output buffers

fixes a crash.
/external/mesa3d/src/gallium/auxiliary/draw/draw_pt_so_emit.c
c85971da31276f17f90fe7d7596c24b5daa204f9 17-Jun-2010 Zack Rusin <zackr@vmware.com> draw: fix some unsigned issue

spotted by Vinson
/external/mesa3d/src/gallium/auxiliary/draw/draw_pt_so_emit.c
638a80bc075a4b58123cb9ba03993bd8bfd024cd 16-Jun-2010 Zack Rusin <zackr@vmware.com> draw: make sure we correctly iterate over output buffers on stream out

we kept overwriting the first attribute of a vertex in a single-stream-
out-buffer case
/external/mesa3d/src/gallium/auxiliary/draw/draw_pt_so_emit.c
287531772ccea82c8a6c4dab5656d751a8943524 16-Jun-2010 Zack Rusin <zackr@vmware.com> draw: rewrite stream output to handle all the dark corners

register masks, multiple output buffers, multiple primitives,
non-linear vertices (elts) and stride semantics.
/external/mesa3d/src/gallium/auxiliary/draw/draw_pt_so_emit.c
a192b5eeafae80f9f9e7e7e442abc5b44d583d1a 15-Jun-2010 Zack Rusin <zackr@vmware.com> draw: finish the new pipeline setup

Keith came up with a new way of running the pipeline which involves passing
a few info structs around (for fetch, vertices and prims) and allows us
to correctly handle cases where we endup with multiple primitives generated
by the pipeline itself.
/external/mesa3d/src/gallium/auxiliary/draw/draw_pt_so_emit.c
b85a361ccbac956d2842251395c048a4b3f4c440 14-Jun-2010 Keith Whitwell <keithw@vmware.com> draw wip
/external/mesa3d/src/gallium/auxiliary/draw/draw_pt_so_emit.c
c217d94cca357d38e244754747a1bd15e9cf2557 09-Jun-2010 Vinson Lee <vlee@vmware.com> draw: Remove unnecessary headers.
/external/mesa3d/src/gallium/auxiliary/draw/draw_pt_so_emit.c
b5d2fc2b48ffb09b21eb3148218a73806af22f09 07-Jun-2010 Zack Rusin <zackr@vmware.com> gallium: scream when one of two unimplemented features in draw is used

plus used the correctly specified stride
/external/mesa3d/src/gallium/auxiliary/draw/draw_pt_so_emit.c
2c22b8e61dc4adab658c6198feea30c006aa6c58 01-Jun-2010 Zack Rusin <zack@kde.org> gallium: make draw auto work and add relevant caps and docs
/external/mesa3d/src/gallium/auxiliary/draw/draw_pt_so_emit.c
c9db97c8229689060fab0edee7df717f804b99ce 31-May-2010 Zack Rusin <zack@kde.org> gallium: a lot more complete implementation of stream output

interface wise we have everything needed by d3d10 and gl transform feedback.
the draw module misses implementation of some corner cases (e.g. when stream
output wants different number of components per output than normal rendering
paths)
/external/mesa3d/src/gallium/auxiliary/draw/draw_pt_so_emit.c