vrend: fix out_modifier default value

Unlike out_fourcc, where the default value 0 is DRM_FORMAT_INVALID, the
default value 0 for out_modifier is DRM_FORMAT_MOD_LINEAR.

This changes nothing in practice as the only user of
virgl_renderer_execute is crosvm, and crosvm takes the
ENABLE_MINIGBM_ALLOCATION path instead.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Isaac Bosompem <mrisaacb@google.com>
macos/master
Chia-I Wu 4 years ago
parent f6c704558b
commit 602002c33e
  1. 1
      src/vrend_renderer.c
  2. 4
      src/vrend_winsys.h
  3. 3
      src/vrend_winsys_gbm.c

@ -10601,6 +10601,7 @@ int vrend_renderer_export_query(struct pipe_resource *pres,
*/
export_query->out_num_fds = 0;
export_query->out_fourcc = 0;
export_query->out_modifier = DRM_FORMAT_MOD_INVALID;
if (export_query->in_export_fds)
return -EINVAL;

@ -34,6 +34,10 @@
#include "virglrenderer.h"
#ifndef DRM_FORMAT_MOD_INVALID
#define DRM_FORMAT_MOD_INVALID 0x00ffffffffffffffULL
#endif
struct virgl_gl_ctx_param;
#ifdef HAVE_EPOXY_EGL_H

@ -38,6 +38,7 @@
#include "util/u_memory.h"
#include "pipe/p_state.h"
#include "vrend_winsys.h"
#include "vrend_winsys_gbm.h"
#include "virgl_hw.h"
#include "vrend_debug.h"
@ -461,7 +462,7 @@ int virgl_gbm_export_query(struct gbm_bo *bo, struct virgl_renderer_export_query
query->out_num_fds = 0;
query->out_fourcc = 0;
query->out_modifier = 0;
query->out_modifier = DRM_FORMAT_MOD_INVALID;
for (int plane = 0; plane < VIRGL_GBM_MAX_PLANES; plane++) {
query->out_fds[plane] = -1;
query->out_strides[plane] = 0;

Loading…
Cancel
Save