[Piglit] v2: ext_memory_object: Test sampling memory exported from Vulkan

Andres Rodriguez andresx7 at gmail.com
Tue Dec 19 01:32:39 UTC 2017



On 2017-12-18 08:17 AM, Topi Pohjolainen wrote:
> First draft only contained the Vulkan rendering part. This revision
> adds the remaining bits: importing the memory to GL, creating a texture
> for it and sampling it.
> 
> While there is now a fair bit of infrastructure that can be re-used, I
> feel that a lot more work remains.

This is a pretty great start.
> 
> Along the way I needed GL support and drafted some initial support for
> Intel Mesa driver:
> 
> git://people.freedesktop.org/~tpohjola/mesa:ext_memory_object
> 
> Jason: I was wondering how GL drivers are meant to deduce the tiling.
>         I suppose this is meant to happen outside the GL-api but I
>         couldn't think of anything else than trying to read that from
>         the buffer object (see the Intel driver hook).

I can't speak for igt, but on the radeonsi side these are passed as 
metadata associated with the kernel bo.

> 
> Piglit work can be found in:
> 
> git://people.freedesktop.org/~tpohjola/piglit:external_objects
> 
> CC: Jason Ekstrand <jason at jlekstrand.net>
> CC: Andres Rodriguez <andresx7 at gmail.com>
> 
> Topi Pohjolainen (7):
>    ext_memory_object: Add script for turning glsl into spirv c-array
>    ext_memory_object: Support for setting up vulkan device
>    ext_memory_object: Support for drawing with vulkan
>    ext_memory_object: Support for setting up vulkan framebuffer
>    ext_memory_object: Add tex layout command line
>    ext_memory_object: Support for importing vulkan memory
>    ext_memory_object: Test render with vulkan and sample with gl
> 
>   tests/spec/ext_memory_object/CMakeLists.gl.txt     |  18 +
>   tests/spec/ext_memory_object/common.c              | 142 +++++
>   tests/spec/ext_memory_object/common.h              |  53 ++
>   .../compile_and_dump_glsl_as_spirv.py              | 139 +++++
>   tests/spec/ext_memory_object/vk_common.c           | 579 +++++++++++++++++++++

Can someone suggest a better location to place this file. Would 
tests/util work?

Interacting with vulkan would be useful even outside the 
ext_memory_object case.


>   tests/spec/ext_memory_object/vk_common.h           | 113 ++++
>   .../ext_memory_object/vk_export_image_as_tex.c     | 262 ++++++++++
>   tests/spec/ext_memory_object/vk_fb.c               | 304 +++++++++++
>   tests/spec/ext_memory_object/vk_fragcoord.fs       |   7 +
>   tests/spec/ext_memory_object/vk_fragcoord.vs       |   8 +
>   10 files changed, 1625 insertions(+)
>   create mode 100644 tests/spec/ext_memory_object/common.c
>   create mode 100644 tests/spec/ext_memory_object/common.h
>   create mode 100644 tests/spec/ext_memory_object/compile_and_dump_glsl_as_spirv.py
>   create mode 100644 tests/spec/ext_memory_object/vk_common.c
>   create mode 100644 tests/spec/ext_memory_object/vk_common.h
>   create mode 100644 tests/spec/ext_memory_object/vk_export_image_as_tex.c
>   create mode 100644 tests/spec/ext_memory_object/vk_fb.c
>   create mode 100644 tests/spec/ext_memory_object/vk_fragcoord.fs
>   create mode 100644 tests/spec/ext_memory_object/vk_fragcoord.vs
> 


More information about the Piglit mailing list