|
|
@ -884,6 +884,10 @@ int virgl_renderer_resource_create_blob(const struct virgl_renderer_resource_cre |
|
|
|
if (args->res_handle == 0) |
|
|
|
if (args->res_handle == 0) |
|
|
|
return -EINVAL; |
|
|
|
return -EINVAL; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* user resource id must be unique */ |
|
|
|
|
|
|
|
if (virgl_resource_lookup(args->res_handle)) |
|
|
|
|
|
|
|
return -EINVAL; |
|
|
|
|
|
|
|
|
|
|
|
if (args->size == 0) |
|
|
|
if (args->size == 0) |
|
|
|
return -EINVAL; |
|
|
|
return -EINVAL; |
|
|
|
if (has_guest_storage) { |
|
|
|
if (has_guest_storage) { |
|
|
@ -1042,6 +1046,10 @@ virgl_renderer_resource_import_blob(const struct virgl_renderer_resource_import_ |
|
|
|
if (args->res_handle == 0) |
|
|
|
if (args->res_handle == 0) |
|
|
|
return -EINVAL; |
|
|
|
return -EINVAL; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* user resource id must be unique */ |
|
|
|
|
|
|
|
if (virgl_resource_lookup(args->res_handle)) |
|
|
|
|
|
|
|
return -EINVAL; |
|
|
|
|
|
|
|
|
|
|
|
switch (args->blob_mem) { |
|
|
|
switch (args->blob_mem) { |
|
|
|
case VIRGL_RENDERER_BLOB_MEM_HOST3D: |
|
|
|
case VIRGL_RENDERER_BLOB_MEM_HOST3D: |
|
|
|
case VIRGL_RENDERER_BLOB_MEM_GUEST_VRAM: |
|
|
|
case VIRGL_RENDERER_BLOB_MEM_GUEST_VRAM: |
|
|
|