summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2018-05-16wip tessvirgl-wip-tessDave Airlie2-4/+5
2018-05-15fixup tests winsys adjustDave Airlie1-1/+1
2018-05-15tgsi: update property supportDave Airlie3-1/+37
2018-05-15renderer: start adding some more TESS supportDave Airlie3-42/+314
2018-05-15renderer: change logic around patching to make tess easier to addDave Airlie1-11/+26
2018-05-15start enable tessDave Airlie1-0/+4
2018-05-15virgl: start tess add tess stateDave Airlie4-0/+31
2018-05-15arb_gpu_shader5: expose higher GLSL level to guestDave Airlie1-1/+3
This enables the ARB_gpu_shader5 extension
2018-05-15arb_gpu_shader5: add support for indirect ubo/samplersDave Airlie3-29/+190
2018-05-15arb_gpu_shader5: add support for non-uniform texture offsetsDave Airlie1-9/+17
2018-05-15arb_gpu_shader5: add support for prim id and samplemaskDave Airlie1-0/+8
2018-05-15arb_gpu_shader5: add support for interpolation instructionsDave Airlie2-16/+80
2018-05-15arb_gpu_shader5: add extra gpu shader instructions.Dave Airlie1-0/+66
This adds the bitfield and multiplies and barrier.
2018-05-15arb_gpu_shader5: add support for enhanced texture gatherDave Airlie1-10/+37
2018-05-15arb_gpu_shader5: add support for vertex streams.Dave Airlie4-12/+57
This adds support for the transform feedback vertex streams
2018-05-15arb_gpu_shader5: add support for indexed queriesDave Airlie2-3/+9
2018-05-11tgsi: handle parsing vertex streamsDave Airlie3-3/+68
These are needed for ARB_gpu_shader5
2018-05-11scan: add ability to find dimension filesDave Airlie2-0/+7
This adds the ability for the scanner to locate files that need dimensions.
2018-05-11shader: start running tgsi scanner on shader.Dave Airlie1-0/+3
We will use the scanner to find a few things needed for ARB_gpu_shader5.
2018-05-10shader: Invert y coordonate if on gles hostElie Tournier1-1/+4
OpenGL ES didn't support GL_POINT_SPRITE_COORD_ORIGIN. So when we read from a fbo, the image is upside down. This is because the guest renders into a window drawable which is inverted, while the host renders into a FBO. This patch inverts the y coordinate. Fixes: dEQP-GLES2.functional.shaders.builtin_variable.pointcoord Signed-off-by: Elie Tournier <elie.tournier@collabora.com> Signed-off-by: Jakob Bornecrantz <jakob@collabora.com> Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
2018-05-10vrend: Associate host UBOs with the correct gallium uniform buffersAlexandros Frantzis3-3/+21
Take into account the gallium uniform buffer indices when associating host UBOs with gallium uniform buffers. Previously the code disregarded the gallium uniform buffer indices, leading, under specific circumstances, to the provision of incorrect data to the shaders. The problem manifested typically when a context contained active UBOs which were not accessed by a particular shader, but ended up being used instead of the correct UBOs for that shader. This occurred, for example, when running the dEQP-GLES3.functional.ubo.* in batch mode, in which case left over UBOs from previous tests would cause subsequent tests to fail. Fixes: dEQP-GLES3.functional.ubo.* when run in batch mode Signed-off-by: Alexandros Frantzis <alexandros.frantzis@collabora.com> Signed-off-by: Jakob Bornecrantz <jakob@collabora.com> Reviewed-by: Joe Kniss <djmk@chromiumos.org, djmk@google.com> Tested-by: Elie Tournier <elie.tournier@collabora.com>
2018-05-10Add support for GL_ANY_SAMPLES_PASSED_CONSERVATIVE query methodGert Wollny2-1/+5
This is needed for fixing CTS: dEQP-GLES3.functional.occlusion_query.conservative* Reviewed-by: Dave Airlie <airlied@redhat.com> Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
2018-05-08vrend_clear: clear and restore rasterizer discard and depth clampGert Wollny1-1/+16
vrend_clear is passed in from gallium clear which, unlike glClear, must not obey rasterizer discard and depth_clmap. However, the guest doesn't foreard the latest update of the rendering states to the host before issuing "clear". Therefore, the host clear command must clear these states before calling glClear in turn. After calling glClear these states are again brought into sync with what the host assumes. Fixes CTS: dEQP-GLES3.functional.rasterizer_discard.fbo.* Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org> Signed-off-by: Gert Wollny <gert.wollny@collabora.com> Signed-off-by: Jakob Bornecrantz <jakob@collabora.com>
2018-05-07vrend: Handle primitive reset when running on GLESJakob Bornecrantz1-3/+8
Signed-off-by: Jakob Bornecrantz <jakob@collabora.com> Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
2018-05-07vrend: Add precision qualifiers for all GLES shadersJakob Bornecrantz1-3/+12
Signed-off-by: Jakob Bornecrantz <jakob@collabora.com> Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
2018-05-07vrend: Nop sends to backing iovs for readonly textures v2.Jakob Bornecrantz1-5/+42
As I have only done testing on the gles-backend with this patch the code is only enabled on it. Further testing might show that it is possible to run this code on all backends. v2: Try getteximage path on failure. Fixes: dEQP-GLES2.functional.texture.mipmap.2d.generate.a8_fastest dEQP-GLES2.functional.texture.mipmap.2d.generate.a8_nicest dEQP-GLES2.functional.texture.mipmap.2d.generate.l8_fastest dEQP-GLES2.functional.texture.mipmap.2d.generate.l8_nicest dEQP-GLES2.functional.texture.mipmap.2d.generate.la88_fastest dEQP-GLES2.functional.texture.mipmap.2d.generate.la88_nicest dEQP-GLES2.functional.texture.mipmap.cube.generate.a8_fastest dEQP-GLES2.functional.texture.mipmap.cube.generate.a8_nicest dEQP-GLES2.functional.texture.mipmap.cube.generate.l8_fastest dEQP-GLES2.functional.texture.mipmap.cube.generate.l8_nicest dEQP-GLES2.functional.texture.mipmap.cube.generate.la88_fastest dEQP-GLES2.functional.texture.mipmap.cube.generate.la88_nicest Signed-off-by: Jakob Bornecrantz <jakob@collabora.com> Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
2018-05-02vrend: Use RGB1 swizzle for formats with "don't care" componentsAlexandros Frantzis1-12/+13
The swizzle ensures we read/write correct values from/to such formats during blitting. Fixes: dEQP-GLES3.functional.fbo.blit.default_framebuffer.srgb8_alpha8_linear_out_of_bounds_blit_to_default dEQP-GLES3.functional.fbo.blit.default_framebuffer.rgb8_linear_out_of_bounds_blit_to_default Signed-off-by: Alexandros Frantzis <alexandros.frantzis@collabora.com> Signed-off-by: Jakob Bornecrantz <jakob@collabora.com> Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org> Tested-by: Gurchetan Singh <gurchetansingh@chromium.org>
2018-05-02vrend: Use red/green with swizzle for luminance/alpha formatsAlexandros Frantzis1-13/+14
Use GL_RG based formats with a swizzle to implement virgl luminance/alpha formats. Since GL_RG is color renderable this patch allows more operations to be implemented for virgl luminance/alpha formats. Fixes: dEQP-GLES2.functional.texture.mipmap.2d.generate.la88_fastest dEQP-GLES2.functional.texture.mipmap.2d.generate.la88_nicest dEQP-GLES2.functional.texture.mipmap.cube.generate.la88_fastest dEQP-GLES2.functional.texture.mipmap.cube.generate.la88_nicest Signed-off-by: Alexandros Frantzis <alexandros.frantzis@collabora.com> Signed-off-by: Jakob Bornecrantz <jakob@collabora.com> Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org> Tested-by: Gurchetan Singh <gurchetansingh@chromium.org>
2018-05-02vrend: Use red with swizzle for luminance formatsAlexandros Frantzis1-13/+14
Use GL_RED based formats with a swizzle to implement virgl luminance formats. Since GL_RED is color renderable this patch allows more operations to be implemented for virgl luminance formats. Fixes: dEQP-GLES2.functional.texture.mipmap.2d.generate.l8_fastest dEQP-GLES2.functional.texture.mipmap.2d.generate.l8_nicest dEQP-GLES2.functional.texture.mipmap.cube.generate.l8_fastest dEQP-GLES2.functional.texture.mipmap.cube.generate.l8_nicest dEQP-GLES2.functional.texture.specification.basic_copyteximage2d.2d_luminance dEQP-GLES2.functional.texture.specification.basic_copyteximage2d.cube_luminance dEQP-GLES2.functional.texture.specification.basic_copytexsubimage2d.2d_luminance dEQP-GLES2.functional.texture.specification.basic_copytexsubimage2d.cube_luminance Signed-off-by: Alexandros Frantzis <alexandros.frantzis@collabora.com> Signed-off-by: Jakob Bornecrantz <jakob@collabora.com> Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org> Tested-by: Gurchetan Singh <gurchetansingh@chromium.org>
2018-05-02vrend: Properly handle out-of-bounds blits when blitting with GLAlexandros Frantzis1-6/+79
Ensure we don't blit pixels originating from outside the extents of the source resource. To achieve this we clip the source blit region, and update the destination blit region accordingly, while respecting scaled blits. This fix will allow us to introduce swizzles for some formats in upcoming commits, and thus use the GL blitter for them, without introducing any regressions Signed-off-by: Alexandros Frantzis <alexandros.frantzis@collabora.com> Signed-off-by: Jakob Bornecrantz <jakob@collabora.com> Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org> Tested-by: Gurchetan Singh <gurchetansingh@chromium.org>
2018-05-02vrend: Use destination swizzle when creating blit shadersAlexandros Frantzis3-177/+55
Update the blit shader creation code to take the destination format swizzle into account. This involves inverting the swizzle information and using the inverted swizzle to reorder the texel components in the shader. The new swizzle code also removes the need for having a special case if the destination format uses emulated alpha. This commit temporarily removes the VIRGL_FORMAT_R8G8B8X8_UNORM special case. Improved support for it, and other similar "ignore alpha" cases, is added back in an upcoming commit using appropriate swizzles. At the moment we always recreate the shader in case we have a swizzle, but a more efficient shader caching scheme could be devised to improve this. Signed-off-by: Alexandros Frantzis <alexandros.frantzis@collabora.com> Signed-off-by: Jakob Bornecrantz <jakob@collabora.com> Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org> Tested-by: Gurchetan Singh <gurchetansingh@chromium.org>
2018-05-02vrend: Use source swizzle when blitting with GLAlexandros Frantzis3-2/+35
Use the source format swizzle information to set the GL_TEXTURE_SWIZZLE_* parameters for the GL blit operation. This also removes the need for the emulated alpha special case, since when using emulated alpha the source format already has proper swizzle information. Signed-off-by: Alexandros Frantzis <alexandros.frantzis@collabora.com> Signed-off-by: Jakob Bornecrantz <jakob@collabora.com> Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org> Tested-by: Gurchetan Singh <gurchetansingh@chromium.org>
2018-05-02vrend: Add swizzle to format descriptionsAlexandros Frantzis2-137/+145
Explicitly describe the swizzle of all supported formats in the format table. In this commit all format swizzles are set to NO_SWIZZLE, but future commits will update some format/swizzle combinations to improve support for the corresponding virgl formats. Signed-off-by: Alexandros Frantzis <alexandros.frantzis@collabora.com> Signed-off-by: Jakob Bornecrantz <jakob@collabora.com> Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org> Tested-by: Gurchetan Singh <gurchetansingh@chromium.org>
2018-04-17vrend: query for GL_SHADER_BUFFER_OFFSET_ALIGNMENTgurchetansingh@chromium.org2-1/+7
This is the SSBO analogue to 88444a. SSBOs are core in GL4.3 and GLES31, so let's query for it. This fixes 44 GLES31 tests on airlied@'s GLES31 sketch branches with Nvidia hardware, but this patch standalone can be applied to master. Example tests: dEQP-GLES31.functional.ssbo.layout.random.all_shared_buffer.0 dEQP-GLES31.functional.ssbo.layout.multi_basic_types.single_buffer.std430 Tested-by: Jakob Bornecrantz <jakob@collabora.com> Reviewed-by: Jakob Bornecrantz <jakob@collabora.com> Signed-off-by: Jakob Bornecrantz <jakob@collabora.com>
2018-04-11Fixes an issue with blitting R8G8B8X8_UNORM bufferRobert Tarasov3-0/+90
Ignores alpha channel while blitting R8G8B8X8_UNIFORM colorspace. framebuffer It would be nice to perform some code refactoring in vrend_blitter to minimize dup code. Fixes following test: dEQP-GLES3.functional.fbo.blit.conversion.rgb8_to_rgba8'] dEQP-GLES3.functional.fbo.blit.conversion.rgb8_to_rgb10_a2 dEQP-GLES3.functional.fbo.blit.conversion.rgb8_to_rgba4'] Tested-by: Jakob Bornecrantz <jakob@collabora.com> Reviewed-by: Jakob Bornecrantz <jakob@collabora.com> Signed-off-by: Jakob Bornecrantz <jakob@collabora.com>
2018-04-11tgsi: Implement invariant atrib for TGSI to GLSLJoe M. Kniss6-5/+28
The 'invariant' output data attrib was not properly implemented in mesa's TGSI serialization, and was ignored in virglrender's conversion from TGSI text to GLSL text. This patch adds 'invariant' support and sets a new virgl cap to enable it since older versions of virglrenderer will fail if invariant appears in the TGSI stream. Tested: chromeos on qemu + virglrenderer Tested-by: Jakob Bornecrantz <jakob@collabora.com> Reviewed-by: Jakob Bornecrantz <jakob@collabora.com> Signed-off-by: Joe M. Kniss <djmk@google.com> Signed-off-by: Jakob Bornecrantz <jakob@collabora.com>
2018-04-09vrend: Use regular blit if both buffers are sRGBRobert Tarasov1-1/+2
We don't need to use gl blend if both source and target buffers are in sRGB and colorspace transformation isn't requiqred. Fixes this test: dEQP-GLES3.functional.fbo.blit.conversion.srgb8_alpha8_to_srgb8_alpha8 Tested-by: Jakob Bornecrantz <jakob@collabora.com> Reviewed-by: Jakob Bornecrantz <jakob@collabora.com> Signed-off-by: Jakob Bornecrantz <jakob@collabora.com>
2018-04-03vrend: call glFlush after glFenceSync.Lepton Wu1-0/+1
I hit app stall frequently when running virgl on Windows/macOS, it turned out virgl kept calling glClientWaitSync and just got timeout. According to https://www.khronos.org/opengl/wiki/Sync_Object, the sync object may never be signaled without proper flushing. This glFlush fixes the stall issue on Windows/macOS. Tested-by: Jakob Bornecrantz <jakob@collabora.com> Reviewed-by: Jakob Bornecrantz <jakob@collabora.com> Signed-off-by: Lepton Wu <lepton@chromium.org> Signed-off-by: Jakob Bornecrantz <jakob@collabora.com>
2018-04-03vrend: Add more caps for glesStéphane Marchesin1-0/+7
This adds texture array and primitive restart caps which are available on gles3. Tested-by: Jakob Bornecrantz <jakob@collabora.com> Reviewed-by: Jakob Bornecrantz <jakob@collabora.com> Signed-off-by: Stéphane Marchesin <marcheu@chromium.org> Signed-off-by: Jakob Bornecrantz <jakob@collabora.com>
2018-03-29Fixes an issue with blitting of sRGB buffersRobert Tarasov1-0/+3
Forces using vrend_render_blit_gl if sourceframebuffers is in sRGB colorspace. Fixes following tests: dEQP-GLES3.functional.fbo.blit.conversion.srgb8_alpha8_to_rgba8 dEQP-GLES3.functional.fbo.blit.conversion.srgb8_alpha8_to_rgb10_a2 dEQP-GLES3.functional.fbo.blit.conversion.srgb8_alpha8_to_rgba4 dEQP-GLES3.functional.fbo.blit.conversion.srgb8_alpha8_to_rgb5_a1 dEQP-GLES3.functional.fbo.blit.conversion.srgb8_alpha8_to_rgb8 dEQP-GLES3.functional.fbo.blit.conversion.srgb8_alpha8_to_rgb565 dEQP-GLES3.functional.fbo.blit.conversion.srgb8_alpha8_to_rg8 dEQP-GLES3.functional.fbo.blit.conversion.srgb8_alpha8_to_r8 Signed-off-by: Jakob Bornecrantz <jakob@collabora.com> Reviewed-by: Jakob Bornecrantz <jakob@collabora.com> Tested-by: Jakob Bornecrantz <jakob@collabora.com>
2018-03-29shader: start plumbing number of cull outputs throughDave Airlie3-13/+56
This fixes the remaining cull distance tests by making sure we pipe the cull distance sizing through all the shaders properly. Tested-by: Jakob Bornecrantz <jakob@collabora.com>
2018-03-29shader: handle declaring fragment shader clip distance input.Dave Airlie2-1/+8
We weren't always sizing this correctly, so size it properly now. Tested-by: Jakob Bornecrantz <jakob@collaboa.com>
2018-03-29shader: rename some shader info and key vars.Dave Airlie3-9/+11
These names reflect more of the meaning, and allow for tuning some stuff. Tested-by: Jakob Bornecrantz <jakob@collabora.com>
2018-03-29shader: handle clip dist swizzling properly.Dave Airlie1-7/+18
if the TGSI has CLIPDIST[0], we have to translate that into vec4(gl_in[0].gl_ClipDistance[0], gl_in[1].gl_ClipDistance[1], gl_in[0].gl_ClipDistance[2], gl_in[2].gl_ClipDistance[3]); This fixes: tests/spec/glsl-1.50/execution/geometry/clip-distance-bulk-copy.shader_test tests/spec/glsl-1.50/execution/geometry/clip-distance-in-param.shader_test tests/spec/glsl-1.50/execution/geometry/clip-distance-in-values.shader_test Tested-by: Jakob Bornecrantz <jakob@collabora.com>
2018-03-29shader: refactor out swizzled clipdist create.Dave Airlie1-8/+21
This function is buggy, and we want to reuse it, extract it out, the next patch will fix it. Tested-by: Jakob Bornecrantz <jakob@collabora.com>
2018-03-26shader: Add explicit location for out in gles modeLepton Wu1-1/+4
Without this, when running under ES 3.2 profile (nvidia driver), I hit "error C5121: multiple bindings to output semantic". Tested by running Chrome OS under qemu with these profiles: core profile: 4.5.0 NVIDIA 384.111 core profile: 3.3 (Core Profile) Mesa 17.3.3 es profile: OpenGL ES 3.2 NVIDIA 384.111 es profile: OpenGL ES 3.0 Mesa 17.3.3 Tested-by: Jakob Bornecrantz <jakob@collabora.com> Reviewed-by: Jakob Bornecrantz <jakob@collabora.com>
2018-03-26vrend: specify GL_UNPACK_IMAGE_HEIGHTGurchetan Singh1-1/+6
We need it when uploading a 3D texture without a temporary buffer. Fixes: dEQP-GLES3.functional.texture.specification.texsubimage3d_unpack_params.r8_complex1 dEQP-GLES3.functional.texture.specification.texsubimage3d_unpack_params.r8_complex2 dEQP-GLES3.functional.texture.specification.texsubimage3d_unpack_params.r8_complex3 dEQP-GLES3.functional.texture.specification.texsubimage3d_unpack_params.r8_complex4
2018-03-26vrend: Don't set resolve filter for non-RGBA buffersStéphane Marchesin1-1/+2
When we blit between depth or stencil buffers, but MSAA is enabled, we can hit that path and set the GL_SCALED_RESOLVE_NICEST_EXT. This causes the blit to fail. Fix this by not going in that path for depth/stencil buffers. Fixes: dEQP-GLES3.functional.fbo.invalidate.whole.unbind_blit_msaa_color dEQP-GLES3.functional.fbo.invalidate.whole.unbind_blit_msaa_depth dEQP-GLES3.functional.fbo.invalidate.whole.unbind_blit_msaa_stencil dEQP-GLES3.functional.fbo.invalidate.sub.unbind_blit_msaa_color dEQP-GLES3.functional.fbo.invalidate.sub.unbind_blit_msaa_depth dEQP-GLES3.functional.fbo.invalidate.sub.unbind_blit_msaa_stencil Signed-off-by: Stéphane Marchesin <marcheu@chromium.org>
2018-03-22virglrenderer: add ARB_cull_distance support.Dave Airlie2-7/+49
This was pretty trivial to implement, so let's just get it out of the way. Tested-by: Jakob Bornecrantz <jakob@collabora.com> Reviewed-by: Jakob Bornecrantz <jakob@collabora.com>
2018-03-22Fix bug which does sizeof for pointer.Lepton Wu1-1/+1
Change to use strcmp since memcmp is confusing here. Signed-off-by: Lepton Wu <lepton@chromium.org> Tested-by: Jakob Bornecrantz <jakob@collabora.com> Reviewed-by: Jakob Bornecrantz <jakob@collabora.com>