Dave Airlie
38f01a3daf
renderer: reorder some structs to remove holes
10 years ago
Dave Airlie
7e85c2f114
renderer: CLEANUP: whitespace and reindent
...
this uses the mesa coding style, pray I never have to do
this again.
strip all trailing whitespace as much as possible
10 years ago
Dave Airlie
59b9cb549a
renderer: fix some minor sparse warnings
10 years ago
Dave Airlie
aca150b35b
renderer: move explicit locations hack into shader cfg
10 years ago
Dave Airlie
ca23e98b22
renderer: CLEANUP: boolean/GLboolean -> bool
...
use stdbool.h as much as possible
some of the gallium code imported uses boolean
so leave it alone for now
10 years ago
Dave Airlie
a20ce55f73
renderer: drop unused define
10 years ago
Dave Airlie
489ee11ce8
renderer: drop glewIsSupported wrapper.
...
no need to be lazy anymore, commited to epoxy now
10 years ago
Dave Airlie
670917888f
renderer: move mesa invert pack into detection code
10 years ago
Dave Airlie
d7a69a1af9
renderer: move some more globals into renderer state
10 years ago
Dave Airlie
0a20f57737
renderer: move inited into global state object
10 years ago
Dave Airlie
be6d023313
renderer: drop commented out line
10 years ago
Dave Airlie
0a55b3264c
renderer: split out draw time sampler/ubo setup to separate functions
...
Trying to clean up the draw vbo functions a little.
The commit looks wierd, the final code looks better
10 years ago
Dave Airlie
c76148ec17
renderer: start trying to support ARB_vertex_attrib_binding
...
this extension simplifies a lot of code in the renderer,
so we should use it where we can.
10 years ago
Dave Airlie
b3d5589897
renderer: split vertex element/vbo binding code out
...
this just moves the code to a separate function,
without changing anything.
10 years ago
Dave Airlie
9259bc768e
renderer: handle transform feedback 2 and 3 extensions
...
This fixes a number of issues with how transform feedback works
it does requires ARB_transform_feedback3 to work at all, but
hopefully this extension is widespread enough, if not we can
revisit later.
It uses transform feedback objects to store the stream out
state.
10 years ago
Dave Airlie
c89bb9c5f9
renderer: advertise tf2/3 on guest side.
...
if we have tf3, advertise it.
10 years ago
Dave Airlie
3b6f3d9301
renderer: fix separate transform feedback
...
if we are writing to separate buffers use the gl_NextBuffer
from ARB_transform_feedback3.
fixes: ext_transform_feedback-separate attribs
10 years ago
Dave Airlie
3b8a774758
renderer: transform feedback fixes
...
Impedance match the gallium and GL transform APIs,
we can't begin before draw vbo but we should only
end when the guest disconnects all buffers
using tfb pause/resume to make things better.
fixes: ext_transform_feedback-intervening-read
10 years ago
Dave Airlie
68a9193e04
renderer: use DrawElementsInstancedBaseVertex for instance + bias
...
Fixes: arb_draw_elements_base_vertex-drawelements-instanced
10 years ago
Dave Airlie
e416e18569
renderer: use debug name in some more debug statements
10 years ago
Dave Airlie
7710274294
renderer: add base instance support for instanced arrays
...
fixes: arb_base_instance-drawarrays
10 years ago
Dave Airlie
c6dc6acf27
renderer: fix layered depth clears.
...
fixes: gl-3.2-layered-rendering-clear-depth
10 years ago
Dave Airlie
e5b4d12cab
renderer: start of fix to srgb framebuffer
...
the main test still fails, but this should fix some of them.
10 years ago
Dave Airlie
08a215de78
renderer: if the srgb state changes dirty samplers
...
srgb decode is part of sampler state, so if we are using
samplers just dirty the sampler state.
fixes: tex-srgb
10 years ago
Dave Airlie
a088746d7a
renderer: handle block formats better
...
This calculates the size better for block based formats.
10 years ago
Dave Airlie
249c29545c
renderer: reverse the ordering for draw elements
...
make instanced override range.
10 years ago
Marc-André Lureau
cba6a1c221
renderer: bind sampler to the texture unit
...
Bind the sampler to the associated texture unit (not to the view).
Fix spec/!opengl 2.0/max-samplers border
10 years ago
Dave Airlie
40c6352233
renderer: fix resource reference tracking
...
we need to remove resources from all contexts when the handle
is unrefed, stops us getting a ref to an unused handle.
ctx references are not full references
10 years ago
Dave Airlie
16c60d5abf
renderer: fix transfer sizes and packing
...
row length is in pixels not bytes, and transfer size
should use the iov siz. for single iov case.
10 years ago
Marc-André Lureau
5f3f9459d6
Fix segfault if vrend_shader_select() failed on GS
...
Signed-off-by: Dave Airlie <airlied@gmail.com>
10 years ago
Dave Airlie
9e5bd0dbf0
renderer: handle illegal so values better
...
This stops the guest from crashing the parser here,
if it gives us so entries that are invalid.
10 years ago
Dave Airlie
44a7c8cf99
renderer: some minor cleanups
...
don't call same functions twice in 2 places, don't
bother hand cleaning up stuff
10 years ago
Dave Airlie
431c818c6a
renderer: move some more stuff into ctx state
...
with contexts we don't need this in the global state.
10 years ago
Dave Airlie
b1109ee664
renderer: move program id into context
...
no point in having this in global state anymore
10 years ago
Dave Airlie
c2d68e9995
renderer: move some global state into contexts.
...
This stuff isn't required since the renderer uses contexts now
10 years ago
Dave Airlie
869a6aa5f5
renderer: add ARB_vertex_type_10f_11f_11f_rev support
10 years ago
Dave Airlie
cba784dfaf
renderer: add arb_texture_gather support
...
This just adds support for the basic TG4 opcode,
the GS5 variant is a bit more work.
10 years ago
Dave Airlie
3f4e3e1cad
renderer: add support for ARB_viewport_array
10 years ago
Dave Airlie
78370e879f
renderer: add initial texture_query_lod support
10 years ago
Dave Airlie
0ff22a06b7
renderer: ABI break: overhaul viewport/scissor state
...
add support for multiple viewports, and reduce
viewport size.
10 years ago
Dave Airlie
e13ebc57e1
renderer: move away from pipe bind flag definitions.
10 years ago
Dave Airlie
dfd7749ddb
renderer: refactor iov bounds checking
...
take the user supplied stride and layer stride into a/c
when calculating the amount of memory required to read/write
from the user supplied iovec.
10 years ago
Dave Airlie
20e86f1771
renderer: validate layer stride isn't set for some texture types
...
Some texture types have no layers, so a non-zero layer stride makes
no sense.
10 years ago
Dave Airlie
6495f870b4
renderer: block resource creation for mipmaps
...
Some scenarios for mipmap creation are illegal, so block them.
10 years ago
Dave Airlie
5e975c6a2e
renderer: switch hw contexts outside the transfer iov
...
this fixes a regression since the transfer inline rewrite
10 years ago
Marc-André Lureau
cd69deebad
Remove INLINE, use inline instead
...
Similar to MESA recent change
10 years ago
Dave Airlie
aea7785887
renderer: handle resource inline writes using common code
...
inline resource writes should use common code for transfers
10 years ago
Dave Airlie
cccbc3b5e4
renderer: return values from submit_cmd/decode block
...
makes easier to write unit tests.
10 years ago
Dave Airlie
bc975ef808
virgl/transfer: take transfer offset into a/c
...
This checks the offset can fit inside the iovec
10 years ago
Marc-André Lureau
6948e60c74
renderer: fix check for streamout target object insert
10 years ago