diff options
author | Dave Airlie <[email protected]> | 2019-08-22 16:30:11 +1000 |
---|---|---|
committer | Gert Wollny <[email protected]> | 2019-08-26 06:35:00 +0000 |
commit | bba4d2f442f33bc68a4573a6f1f559f277d7ec51 (patch) | |
tree | 648ff7d65873fca2dbbc4e4c028d22789e0e90dd /src/gallium/winsys | |
parent | 035cd6cdf91f9d49f49f0e152e7204aee51e671b (diff) |
virgl: fix format conversion for recent gallium changes.
The virgl formats are fixed in time snapshots of the gallium ones,
we just need to provide a translation table between them when
we enter the hardware.
This fixes a regression since Eric renumbered the gallium table.
Fixes: c45c33a5a2 (gallium: Remove manual defining of PIPE_FORMAT enum values.)
Bugzilla: https://bugs.freedesktop.org/111454
v1 by Dave Airlie <[email protected]>
v2: virgl: Add a number of formats to the table that are used, e.g. for vertex
attributes
v3: cover some more missing formats from a piglit run
Signed-off-by: Gert Wollny <[email protected]>
Diffstat (limited to 'src/gallium/winsys')
-rw-r--r-- | src/gallium/winsys/virgl/drm/virgl_drm_winsys.c | 2 | ||||
-rw-r--r-- | src/gallium/winsys/virgl/vtest/virgl_vtest_winsys.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/gallium/winsys/virgl/drm/virgl_drm_winsys.c b/src/gallium/winsys/virgl/drm/virgl_drm_winsys.c index 725d1f7cbf3..c3509aef49c 100644 --- a/src/gallium/winsys/virgl/drm/virgl_drm_winsys.c +++ b/src/gallium/winsys/virgl/drm/virgl_drm_winsys.c @@ -168,7 +168,7 @@ virgl_drm_winsys_resource_create(struct virgl_winsys *qws, memset(&createcmd, 0, sizeof(createcmd)); createcmd.target = target; - createcmd.format = format; + createcmd.format = pipe_to_virgl_format(format); createcmd.bind = bind; createcmd.width = width; createcmd.height = height; diff --git a/src/gallium/winsys/virgl/vtest/virgl_vtest_winsys.c b/src/gallium/winsys/virgl/vtest/virgl_vtest_winsys.c index b6f5a8324e7..528692ffcb7 100644 --- a/src/gallium/winsys/virgl/vtest/virgl_vtest_winsys.c +++ b/src/gallium/winsys/virgl/vtest/virgl_vtest_winsys.c @@ -261,7 +261,7 @@ virgl_vtest_winsys_resource_create(struct virgl_winsys *vws, res->height = height; res->width = width; res->size = size; - virgl_vtest_send_resource_create(vtws, handle, target, format, bind, + virgl_vtest_send_resource_create(vtws, handle, target, pipe_to_virgl_format(format), bind, width, height, depth, array_size, last_level, nr_samples, size, &fd); |