Age | Commit message (Collapse) | Author |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Seems to be a regression from commit 60b08eb1fdf287d28ec66b9282513ab35a61aee0.
(cherry picked from commit c5a4cfb03ff17955c049f16ac805f5837ea4b633)
|
|
Commit 2708ddfb06a36d8568e2aa130bf1f7d551fcd309 caused a few regressions.
We need to check/validate state after calling bind_arrays() because
it might set the _NEW_ARRAYS flag if the varying VP inputs change.
The symptom of this problem was some attribute arrays being ignored
(or interpreted as constant-valued) in glDrawRangeElements or
glMultiDrawElements.
A follow-on patch will add some additional asserts to try to catch
this kind of thing in the future.
(cherry picked from commit 3cba779e16935f7c3a0bfd8af48bd5e015068e96)
|
|
builds.
The driver (or preferably the hardware) should handle out of bounds
indices.
If there are problems then it's better to detect those in the debug
builds.
(cherry picked from commit e3257912e006120f6ab611e77005eed1a464030a)
|
|
Reported by Karl Schultz.
|
|
If we determine that the 'end' parameter to glDrawElements() is out of
bounds, clamp it to the max legal index value.
|
|
Some apps are sloppy with their start/end values. Clamp them to
max possible values to prevent problems later.
|
|
|
|
|
|
|
|
|
|
Conflicts:
src/mesa/vbo/vbo_exec_array.c
|
|
Otherwise some apps will emit tons of warnings.
|
|
|
|
|
|
If the 'end' index is out of bounds issue a warning as before. But instead
of just no-op'ing the draw call, examine the actual array indices to see
if they're OK. If the max array index is out of bounds, issue another
warning and no-op the draw call. Otherwise, draw normally. This is a
debug build-only feature since it could impact performance.
This "fixes" the missing torus in the OGL Distilled / Picking demo.
|
|
If the 'end' index is out of bounds issue a warning as before. But instead
of just no-op'ing the draw call, examine the actual array indices to see
if they're OK. If the max array index is out of bounds, issue another
warning and no-op the draw call. Otherwise, draw normally. This is a
debug build-only feature since it could impact performance.
This "fixes" the missing torus in the OGL Distilled / Picking demo.
|
|
|
|
Previously, MultiDrawElements just called DrawElements a bunch of times.
By sending several primitives down the pipeline at once, we avoid a bunch
of validation. On my GL demo, this improves fps by 2.5% (+/- .41%) and
reduces CPU usage by 70.5% (+/- 2.9%) (n=3).
Reviewed by: Ian Romanick <ian.d.romanick@intel.com>
|
|
|
|
|
|
|
|
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.
|
|
|
|
|
|
|
|
|
|
Subtract 1 from _MaxElement to be clearer.
|
|
|
|
|
|
Be clearer that this is the number of generic vertex program/shader
attributes, not counting the legacy attributes (pos, normal, color, etc).
|
|
|
|
|
|
|
|
The generic_array[] is 16 elements in size, but the loop was doing 32
iterations. The out of bounds array write was clobbering the following
inputs[] array but as luck would have it, that didn't matter.
|
|
|
|
We don't really implement vertex weights but in the VBO code this
fixes and odd case for the legacy_array[] setup. Before, the
vbo->draw_prims() call was always indicating that the vertex weight
array was present/enabled when it really wasn't.
|
|
This value is per array object.
|
|
|
|
No-op the bad drawing command rather than go out of bounds and render
garbage. Print a warning to alert the developer to the bad drawing call.
|
|
|
|
|
|
Also, fix up some comments to be doxygen style.
|
|
Keep track of enabled/active vertex attributes.
Keep track of potential vertex program outputs.
When generating fragment program, replace references to fragment attributes
which are effectively non-varying and non-computed passthrough attributes with
references to the new CURRENT_ATTRIB tracked state value.
Only downside is slight ugliness in VBO code where we need to validate state
twice in succession.
|