[Piglit] [v5 04/12] tests: spec: EXT_image_dma_buf_import invalid hints

Chad Versace chad.versace at linux.intel.com
Tue May 7 16:18:37 PDT 2013


On 05/07/2013 04:04 PM, Eric Anholt wrote:
> Chad Versace <chad.versace at linux.intel.com> writes:
>
>> On 05/03/2013 02:23 PM, Eric Anholt wrote:
>>> Topi Pohjolainen <topi.pohjolainen at intel.com> writes:
>>>
>>>> diff --git a/tests/spec/ext_image_dma_buf_import/CMakeLists.gles1.txt b/tests/spec/ext_image_dma_buf_import/CMakeLists.gles1.txt
>>>> new file mode 100644
>>>> index 0000000..2499554
>>>> --- /dev/null
>>>> +++ b/tests/spec/ext_image_dma_buf_import/CMakeLists.gles1.txt
>>>> @@ -0,0 +1,15 @@
>>>> +#add_definitions(-DSOURCE_DIR="${piglit_SOURCE_DIR}/")
>>>> +
>>>> +include_directories(
>>>> +	${OPENGL_INCLUDE_PATH}
>>>> +	)
>>>> +
>>>> +link_libraries(
>>>> +	${OPENGL_gles1_LIBRARY}
>>>> +	${OPENGL_egl_LIBRARY}
>>>> +	piglitutil_gles1
>>>> +	)
>>>> +
>>>> +piglit_add_executable(ext_image_dma_buf_import-invalid_hints invalid_hints.c)
>>>
>>> I'd like to see conditional compile on HAVE_LIBDRM
>>
>> I don't think it makes sense to condition the compile on HAVE_LIBDRM, because
>> Topi wrote these tests to be independent of drm drivers. If Linaro, for example,
>> implemented piglit_create/destroy_dma_buf for ARM, then the tests will run just
>> fine there. (I chose Linaro/ARM because together they drove the initial
>> implementation of this extension, and Linaro uses Piglit).
>
> Well, conditional on whatever it is that gets you access to the DRM
> interfaces that you're using to create dmabufs.  Which in the
> implementation posted here is HAVE_LIBDRM.

So, you're asserting that if someone adds a none-libdrm implemenation of
piglit_create_dma_buf, then the burden is on them to fix the CMakeLists
to work for them. That's fine with me.

>>   > and no
>>> ext_image_dma_buf_fourcc.h.
>>
>> Why kill ext_image_dma_buf_fourcc.h? Several of the following tests resuse the
>> formats defined there. Are you suggesting that the formats be redefined in
>> each *.c file?
>
> Because the correct place to get DRM fourcc defines from is
> drm_fourcc.h.  You're even told to use drm_fourcc.h in the spec!

Fair enough. Then the CMakeLists needs to condition this directory's
compile on the header's presence.



More information about the Piglit mailing list