struct nouveau_bo *bo = 0;
int ret;
+ if (whandle->offset != 0) {
+ debug_printf("%s: attempt to import unsupported winsys offset %d\n",
+ __FUNCTION__, whandle->offset);
+ return NULL;
+ }
+
if (whandle->type != DRM_API_HANDLE_TYPE_SHARED &&
whandle->type != DRM_API_HANDLE_TYPE_FD) {
debug_printf("%s: attempt to import unsupported handle type %d\n",
{
struct vc4_screen *screen = vc4_screen(pscreen);
+ if (whandle->offset != 0) {
+ fprintf(stderr,
+ "Attempt to import unsupported winsys offset %u\n",
+ whandle->offset);
+ return NULL;
+ }
+
switch (whandle->type) {
case DRM_API_HANDLE_TYPE_SHARED:
return vc4_bo_open_name(screen, whandle->handle, whandle->stride);
templ.depth0 = 1;
templ.array_size = 1;
- whandle->offset = 0;
-
img->texture = screen->base.screen->resource_from_handle(screen->base.screen,
&templ, whandle, PIPE_HANDLE_USAGE_READ_WRITE);
if (!img->texture) {
__DRIimage *img = NULL;
unsigned err = __DRI_IMAGE_ERROR_SUCCESS;
- if (num_fds != 1 || offsets[0] != 0) {
+ if (num_fds != 1) {
err = __DRI_IMAGE_ERROR_BAD_MATCH;
goto exit;
}
if (num_names != 1)
return NULL;
- if (offsets[0] != 0)
- return NULL;
format = convert_fourcc(format, &dri_components);
if (format == -1)
whandle.type = DRM_API_HANDLE_TYPE_SHARED;
whandle.handle = names[0];
whandle.stride = strides[0];
+ whandle.offset = offsets[0];
img = dri2_create_image_from_winsys(screen, width, height, format,
&whandle, loaderPrivate);
if ((whandle->type != DRM_API_HANDLE_TYPE_SHARED) && (whandle->type != DRM_API_HANDLE_TYPE_FD))
return NULL;
+ if (whandle->offset != 0)
+ return NULL;
+
buf = CALLOC_STRUCT(i915_drm_buffer);
if (!buf)
return NULL;
drm_intel_bo *bo;
int err;
+ if (handle->offset != 0) {
+ debug_error("attempt to import unsupported winsys offset");
+ return NULL;
+ }
+
switch (handle->type) {
case DRM_API_HANDLE_TYPE_SHARED:
{
unsigned handle;
uint64_t size = 0;
+ if (!offset && whandle->offset != 0) {
+ fprintf(stderr, "attempt to import unsupported winsys offset %u\n",
+ whandle->offset);
+ return NULL;
+ }
+
/* We must maintain a list of pairs <handle, bo>, so that we always return
* the same BO for one particular handle. If we didn't do that and created
* more than one BO for the same handle and then relocated them in a CS,
uint32_t handle;
int ret;
+ if (whandle->offset != 0) {
+ fprintf(stderr, "Attempt to import unsupported winsys offset %u\n",
+ whandle->offset);
+ return NULL;
+ }
+
ret = vmw_ioctl_gb_surface_ref(vws, whandle, &flags, format,
&mip_levels, &handle, &desc.region);
int ret;
int i;
+ if (whandle->offset != 0) {
+ fprintf(stderr, "Attempt to import unsupported winsys offset %u\n",
+ whandle->offset);
+ return NULL;
+ }
+
switch (whandle->type) {
case DRM_API_HANDLE_TYPE_SHARED:
case DRM_API_HANDLE_TYPE_KMS:
assert(whandle->type == DRM_API_HANDLE_TYPE_KMS ||
whandle->type == DRM_API_HANDLE_TYPE_FD);
+ if (whandle->offset != 0) {
+ DEBUG_PRINT("KMS-DEBUG: attempt to import unsupported winsys offset %d\n",
+ whandle->offset);
+ return NULL;
+ }
+
switch(whandle->type) {
case DRM_API_HANDLE_TYPE_FD:
kms_sw_dt = kms_sw_displaytarget_add_from_prime(kms_sw, whandle->handle);
struct virgl_hw_res *res;
uint32_t handle = whandle->handle;
+ if (whandle->offset != 0) {
+ fprintf(stderr, "attempt to import unsupported winsys offset %u\n",
+ whandle->offset);
+ return NULL;
+ }
+
pipe_mutex_lock(qdws->bo_handles_mutex);
if (whandle->type == DRM_API_HANDLE_TYPE_SHARED) {