virgl: fix const warning on debug flags.
authorDave Airlie <airlied@redhat.com>
Mon, 3 Dec 2018 22:11:13 +0000 (08:11 +1000)
committerDave Airlie <airlied@redhat.com>
Mon, 3 Dec 2018 22:11:13 +0000 (08:11 +1000)
Fixes: 8d4bb6e5c (virgl: Add command and flags to initiate debugging on the host (v2))
src/gallium/drivers/virgl/virgl_encode.c
src/gallium/drivers/virgl/virgl_encode.h

index 49d95de83530c2c979dd20901b8c5a20239742c6..403f54e2842c5c6c590ca66fc268dd3b5788a499 100644 (file)
@@ -1056,7 +1056,7 @@ int virgl_encode_texture_barrier(struct virgl_context *ctx,
 }
 
 int virgl_encode_host_debug_flagstring(struct virgl_context *ctx,
-                                       char *flagstring)
+                                       const char *flagstring)
 {
    unsigned long slen = strlen(flagstring) + 1;
    uint32_t sslen;
@@ -1074,7 +1074,7 @@ int virgl_encode_host_debug_flagstring(struct virgl_context *ctx,
    string_length = (uint32_t)MIN2(sslen * 4, slen);
 
    virgl_encoder_write_cmd_dword(ctx, VIRGL_CMD0(VIRGL_CCMD_SET_DEBUG_FLAGS, 0, sslen));
-   virgl_encoder_write_block(ctx->cbuf, (uint8_t *)flagstring, string_length);
+   virgl_encoder_write_block(ctx->cbuf, (const uint8_t *)flagstring, string_length);
 
    return 0;
 }
index 80b943a6b34f851efd6d12cd6261301843a73319..f3729e8e92000ceb3eb787b59d3986a3bce64ed7 100644 (file)
@@ -278,5 +278,5 @@ int virgl_encode_texture_barrier(struct virgl_context *ctx,
                                  unsigned flags);
 
 int virgl_encode_host_debug_flagstring(struct virgl_context *ctx,
-                                  char *envname);
+                                  const char *envname);
 #endif