Gert Wollny
5c8e9583fe
testvirgl.c: Fix warnings
...
testvirgl.c: In function »testvirgl_write_fence«:
testvirgl.c:98:41: warning: unused parameter »cookie« [-Wunused-
parameter]
static void testvirgl_write_fence(void *cookie, uint32_t fence)
^~~~~~
testvirgl.c: In function »get_caps«:
testvirgl.c:272:33: warning: Variable »glsl_level« not used
[-Wunused-variable]
uint32_t max_ver, max_size, glsl_level;
v2: use mesa style UNUSED annotation for unused parameters
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Signed-off-by: Jakob Bornecrantz <jakob@collabora.com>
7 years ago
Jakob Bornecrantz
b03d30e6d1
tests: Use ge instead of eq when testing version and caps
...
This gets us passing at least for now. Some of these tests
should be upgraded to the new version instead.
Signed-off-by: Jakob Bornecrantz <jakob.bornecrantz@collabora.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
7 years ago
Dave Airlie
3cd2caad2b
tests: refactor caps getting code out.
...
This just makes getting caps be common code.
Signed-off-by: Dave Airlie <airlied@redhat.com>
7 years ago
Elie Tournier
8007cc0b12
tests: Check if multisample is available before running tests
...
Signed-off-by: Elie Tournier <elie.tournier@collabora.com>
Signed-off-by: Jakob Bornecrantz <jakob.bornecrantz@collabora.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
7 years ago
Elie Tournier
a4fbf0d8a5
tests: Check if geometry shaders are available before running tests
...
Signed-off-by: Elie Tournier <elie.tournier@collabora.com>
Signed-off-by: Jakob Bornecrantz <jakob.bornecrantz@collabora.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
7 years ago
Dave Airlie
332b82e6e3
tests: make some functions static.
9 years ago
Marc-André Lureau
e1eef9a7f9
tests: use checked fixture
...
The checked fixture run in the child test process.
Fix leaks found thanks to AddressSanitizer.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
9 years ago
Marc-André Lureau
83faf22c16
tests: reset last fence before using it
...
Signed-off-by: Marc-André Lureau <marcandre.lureau@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
9 years ago
Dave Airlie
c6da60278c
tests: fix typo,
...
I forgot to git add.
9 years ago
Marc-André Lureau
8a3dcd4c7b
tests: fix fourcc check (on intel at least)
...
- virgl maps VIRGL_FORMAT_B8G8R8X8_UNORM to GL_RGBA8
- _mesa_choose_tex_format() maps GL_RGBA8 to
MESA_FORMAT_R8G8B8A8_UNORM or MESA_FORMAT_A8B8G8R8_UNORM or
MESA_FORMAT_B8G8R8A8_UNORM.
- it ends up in (gl_texture_image *)img->TexFormat
- then in intel (_DRIImage *) image->format.
- on create image, image->dri_format = driGLFormatToImageFormat() (to
ex: MESA_FORMAT_R8G8B8A8_UNORM -> __DRI_IMAGE_FORMAT_ABGR8888)
- on query, intel_lookup_fourcc() -> __DRI_IMAGE_FOURCC_ABGR8888 == GBM_FORMAT_ABGR8888.
For some reason, driGLFormatToImageFormat() doesn't map
MESA_FORMAT_A8B8G8R8_UNORM, so I only check the two possible values I
could find.
Signed-off-by: Marc-André Lureau <marcandre.lureau@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
9 years ago
Dave Airlie
85602b31bd
renderer: fix regression in shader binding
...
made a mistake in the shader binding code, not good,
time for brown paper bag.
9 years ago
Dave Airlie
72688632e7
virglrenderer: fix make distcheck
9 years ago
Dave Airlie
81b741a05c
virgl/shaders: handle large shaders.
...
the protocol failed to handle larger shaders, this allow
the renderer to reassemble large shaders and recombined
the chunks before passing them to the GLSL translation.
This also enhances the renderer protocol to allow
for some more info in the shader object, and removes
the separate vs/gs/fs variants in favour of a type field
in the shader.
9 years ago
Dave Airlie
88c47ce27c
tests: align more encoder with mesa
...
This aligns the encoder files more with mesa,
removes the attach stuff which mesa dropped.
9 years ago
Dave Airlie
016341850c
tests: align viewports/scissor encoding with mesa.
...
This just realigns some of the encoder code with mesa.
9 years ago
Dave Airlie
3263d939b2
virglrenderer: add some more code liceneses
10 years ago
Dave Airlie
c098cd852b
tests: add a test that engages transform feedback
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
0ff22a06b7
renderer: ABI break: overhaul viewport/scissor state
...
add support for multiple viewports, and reduce
viewport size.
10 years ago
Dave Airlie
ebcc110592
tests: make buffer size larger for bad stride test
10 years ago
Dave Airlie
621629e32f
tests: add 2d array bad layer stride
...
pass a layer stride too small for other dimensions
10 years ago
Dave Airlie
53ab094df9
tests: use a box with height to test stride validation
10 years ago
Dave Airlie
a423879e87
tests: don't pass a bad stride in validation tests
10 years ago
Dave Airlie
93072467c4
tests: add bad stride test
...
stride shouldn't be less than resource width
10 years ago
Dave Airlie
5fd93680a7
tests: don't pass a stride to bad level test
10 years ago
Dave Airlie
ee10a18ef5
tests: add transfer test with a bad level.
10 years ago
Dave Airlie
22f2944e52
tests: don't pass a layer stride on the transfer tests
10 years ago
Dave Airlie
1f9ab04501
tests: do some tests for layer stride with bad texture types
10 years ago
Dave Airlie
a6a0b09d5e
tests: drop unused test
...
this is subsumed into other tests
10 years ago
Dave Airlie
5f7031e117
tests: add mipmap tests to resource creation
10 years ago
Dave Airlie
9006de318e
tests: more inline transfer tests
...
This adds code to the encoder that needs to be backported
to the mesa virgl driver to support inline writes for
non-buffer objects.
10 years ago
Dave Airlie
44d4cf4fd3
tests: add option to test harness for large buffer
10 years ago
Dave Airlie
60ee9c4457
tests: allocate cmd buf to correct size
...
the value is in dwords, so calloc the correct size.
10 years ago
Dave Airlie
c6fd7d55ac
tests: add flush callback to test large transfers
10 years ago
Dave Airlie
052835544f
tests: add overlapping id test
10 years ago
Dave Airlie
5109a1ff26
tests: add new transfer tests
...
this does a transfer per resource type, also start
adding inline transfer tests, these need a bit more work
10 years ago
Dave Airlie
88b48d0606
tests: add transfer test with bad offset
...
We need to take offset into account when doing transfer size testing.
10 years ago
Dave Airlie
5783d84b30
egl: overhaul the fourcc retrieval function
...
We really need a new mesa interface that works properly for all this.
10 years ago
Marc-André Lureau
ac99dd02bd
tests: check cursor resource creation
10 years ago
Dave Airlie
c3fc63ff74
tests: add simple geom shader tests
...
Draws a triangle but engages the geom shader in the process.
10 years ago
Dave Airlie
4a6383f4ce
build: make distcheck work
...
Mostly taken from Marc's branch, just didn't change
as much stuff around
10 years ago
Dave Airlie
7234a2e25b
tests: use proper handle for surface
...
this fixes the test to use a correct handle.
10 years ago
Dave Airlie
ee3abc1fc8
tests: destory vbo in simple rendering test
10 years ago
Marc-André Lureau
f66acaff87
tests: add check of bad iov write
10 years ago
Marc-André Lureau
9ae41c26fe
tests: add virgl_test_transfer_1d
...
Add a working case
10 years ago
Marc-André Lureau
0d033a1380
tests: add testvirgl_create_backed_simple_1d_res
10 years ago
Dave Airlie
b76bbe4f22
tests: add simple rendering test
...
This clears a buffer and renders a triangle to it
it just confirms something is drawn
10 years ago
Dave Airlie
91ec75a503
tests: allow passing shader strings directly.
...
This makes writing tests using text shaders possible
10 years ago
Dave Airlie
fcaeadc4ad
tests: add fence handling
...
This adds a basic fence handling interface.
10 years ago
Dave Airlie
bdb49d5636
tests: modify some test utility functions
...
add w/h version for texture 2d
add backed buffer binding fn.
10 years ago