[Mesa-dev] [PATCH 1/3] virgl: move bind-flags to virgl_winsys.h

Erik Faye-Lund erik.faye-lund at collabora.com
Mon Jul 16 12:05:42 UTC 2018


On 16. juli 2018 13:34, Gert Wollny wrote:
> Am Montag, den 16.07.2018, 12:23 +0200 schrieb Erik Faye-Lund:
>> virglrenderer's virgl_hw.h doesn't contain these, and it's the
>> virgl winsys that cares about these, so let's move them there.
>>
>> This reduces the diff between the two different versions of
>> virgl_hw.h, and should make it easier to upgrade the file in
>> the future.
>>
>> Signed-off-by: Erik Faye-Lund <erik.faye-lund at collabora.com>
>> ---
>>   src/gallium/drivers/virgl/virgl_hw.h       | 12 ------------
>>   src/gallium/drivers/virgl/virgl_resource.h |  2 ++
>>   src/gallium/drivers/virgl/virgl_winsys.h   | 12 ++++++++++++
>>   3 files changed, 14 insertions(+), 12 deletions(-)
>>
>> diff --git a/src/gallium/drivers/virgl/virgl_hw.h
>> b/src/gallium/drivers/virgl/virgl_hw.h
>> index 157267558a..d0df23e2f6 100644
>> --- a/src/gallium/drivers/virgl/virgl_hw.h
>> +++ b/src/gallium/drivers/virgl/virgl_hw.h
>> @@ -202,18 +202,6 @@ enum virgl_formats {
>>   #define VIRGL_CAP_TGSI_INVARIANT       (1 << 0)
>>   #define VIRGL_CAP_TEXTURE_VIEW         (1 << 1)
>>   
>> -#define VIRGL_BIND_DEPTH_STENCIL (1 << 0)
>> -#define VIRGL_BIND_RENDER_TARGET (1 << 1)
>> -#define VIRGL_BIND_SAMPLER_VIEW  (1 << 3)
>> -#define VIRGL_BIND_VERTEX_BUFFER (1 << 4)
>> -#define VIRGL_BIND_INDEX_BUFFER  (1 << 5)
>> -#define VIRGL_BIND_CONSTANT_BUFFER (1 << 6)
>> -#define VIRGL_BIND_DISPLAY_TARGET (1 << 7)
>> -#define VIRGL_BIND_STREAM_OUTPUT (1 << 11)
>> -#define VIRGL_BIND_CURSOR        (1 << 16)
>> -#define VIRGL_BIND_CUSTOM        (1 << 17)
>> -#define VIRGL_BIND_SCANOUT       (1 << 18)
>> -
> In virglrenderer there is a set of VREND_RES_* that are mostly the
> same, so I assume that they should be in sync (I wouldn't bet on it
> though). If it can be resolved that these two sets are independent of
> each other then the patch is
>    Reviewed-By: Gert Wollny <gert.wollny at collabora.com>
>
> Otherwise it might be better to move the VREND_RES_* defines into
> virgl_hw.h in virglrenderer and rename so that at one point the two
> virgl_hw.h files will have the same content.

Oh, thanks for noticing. Yeah, these need to be the same. They get 
passed through virgl_drm_winsys_resource_cache_create() to the 
VIRTGPU_RESOURCE_CREATEioctl, to VIRTIO_GPU_CMD_RESOURCE_CREATE_3D in 
qemu, and in turn gets interpreted by vrend_renderer_resource_create...

So yeah, these needs to be in sync. I guess the pragmatic choice would 
be to use these definitions in virglrenderer's copy here. I'll send a 
new proposal to virglrenderer for this bit, and drop this patch from 
this series.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20180716/179136e5/attachment.html>


More information about the mesa-dev mailing list