Dave Airlie
dd4345b5af
renderer: bail if we don't have a program when we need it.
...
This is just avoiding a crash, it really shouldn't happen,
but we don't want to crash if it does.
9 years ago
Dave Airlie
4385520930
renderer: fix compressed transfer gets
...
This code ended up in the other file and really wasn't necessary
there.
Remove the transfer code from virglrenderer.c, move into main
renderer file, and match it with the corresponding transfer
reader.
This should at least fix the crash in compressed textures
with ARB_get_texture_sub_image
9 years ago
Dave Airlie
94a415e3c7
transform feedback: handle haswell lack of ARB_transform_feedback2
...
This might have some fallout but my HSW doesn't expose this due
to some kernel restrictions, so we should handle the situation
and not call TF2 functions
9 years ago
Dave Airlie
674d730e90
shader: drop the unsupported file declaration for sampler views
...
These aren't required to be parsed, but we can them.
9 years ago
Marc-André Lureau
814f638d42
egl: update mesa_dma_buf_img_export usage
10 years ago
Marc-André Lureau
5d17df15a6
egl: call virgl_egl_get_fourcc_for_texture only if use_egl_context
10 years ago
Dave Airlie
3263d939b2
virglrenderer: add some more code liceneses
10 years ago
Dave Airlie
a9ba2c442e
build: move include to virgl subdir
10 years ago
Dave Airlie
16990471e7
renderer: misc cleanups
...
move some static decls around,
drop useless struct
10 years ago
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
1af42f7a98
renderer: emit prescale from geom shader when present
...
the scaling stuff needs to happen in the geom shader instead
of the vertex shader if a geom shader is present.
fixes: tests/spec/glsl-1.50/execution/geometry/core-inputs.shader_test
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
d0f866ad4b
renderer: fix blitter cube map array shader
...
this needs an extension enabled to work.
10 years ago
Dave Airlie
ae4c0331fb
renderer: handle clip distance input to frag shader
...
this fixes:
tests/spec/glsl-1.50/execution/geometry/clip-distance-itemized-copy.shader_test
tests/spec/glsl-1.50/execution/geometry/clip-distance-bulk-copy.shader_test
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
00850485f6
renderer: move glsl ver and processor to iterator prolog
...
for shaders with no declerations these were never happening.
fixes: tests/spec/glsl-1.50/execution/geometry/clip-distance-out-values.shader_test
10 years ago
Dave Airlie
bdbf734fa2
renderer/egl: decrease egl debug output
...
this just removes this from the common output
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
80eaec7aef
renderer: fix clipvertex transform feedback
...
if we are emulating clipvertex we need to route transform
feedback correctly for it.
fixes ext_transform_feedback-builtin-varyings gl_ClipVertex
10 years ago
Dave Airlie
a0d6d28266
renderer: fix transform feedback for gl_Position
...
need to emit the position before the winsys adjust happens.
fixes ext_transform_feedback-builtin-varyings gl_Position
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
e9ca2d4ad3
blitter: fix invalid texelFetch call
...
Triggered by piglit/bin/ext_framebuffer_multisample-no-color 2 depth single -auto -fbo
10 years ago
Marc-André Lureau
043320c4f1
shader: better type promotion for comparison op
...
This is an improvement from ee7852525: the right source type is
used.
Fixes piglit spec/glsl-1.50/execution/built-in-functions/gs-equal-ivec2-ivec2
10 years ago
Marc-André Lureau
444f661736
formats: fix byte order of BGRA
...
I am a bit confused by the docs, but it fixes piglit spec/!opengl
1.1/draw-pixels.
10 years ago
Marc-André Lureau
400c7df8b5
shader: use uint comparison for UCMP
...
Fixes a few piglit tests, such as:
spec/glsl-1.30/execution/switch/fs-default_last
10 years ago
Marc-André Lureau
7f050c7e5b
shader: restore the original CMP
...
e4880f6b
broke the original CMP translation that looks correct
10 years ago