Rev 4358 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 4358 | Rev 4548 | ||
---|---|---|---|
Line 101... | Line 101... | ||
101 | double |
101 | double |
102 | get_time(void) |
102 | get_time(void) |
103 | { |
103 | { |
104 | struct timespec tp; |
104 | struct timespec tp; |
Line 105... | Line 105... | ||
105 | 105 | ||
Line 106... | Line 106... | ||
106 | clock_gettime(CLOCK_MONOTONIC, &tp); |
106 | // clock_gettime(CLOCK_MONOTONIC, &tp); |
107 | 107 | ||
Line 108... | Line 108... | ||
108 | return tp.tv_sec + tp.tv_nsec / 1000000000.0; |
108 | return tp.tv_sec + tp.tv_nsec / 1000000000.0; |
Line 526... | Line 526... | ||
526 | if (image->planar_format == NULL) |
526 | if (image->planar_format == NULL) |
527 | return false; |
527 | return false; |
528 | *value = image->planar_format->components; |
528 | *value = image->planar_format->components; |
529 | return true; |
529 | return true; |
530 | case __DRI_IMAGE_ATTRIB_FD: |
530 | case __DRI_IMAGE_ATTRIB_FD: |
531 | if (drm_intel_bo_gem_export_to_prime(image->region->bo, value) == 0) |
531 | // if (drm_intel_bo_gem_export_to_prime(image->region->bo, value) == 0) |
532 | return true; |
532 | // return true; |
533 | return false; |
533 | return false; |
534 | default: |
534 | default: |
535 | return false; |
535 | return false; |
536 | } |
536 | } |
537 | } |
537 | } |
Line 618... | Line 618... | ||
618 | } |
618 | } |
Line 619... | Line 619... | ||
619 | 619 | ||
620 | return image; |
620 | return image; |
Line -... | Line 621... | ||
- | 621 | } |
|
621 | } |
622 | |
622 | 623 | #if 0 |
|
623 | static __DRIimage * |
624 | static __DRIimage * |
624 | intel_create_image_from_fds(__DRIscreen *screen, |
625 | intel_create_image_from_fds(__DRIscreen *screen, |
625 | int width, int height, int fourcc, |
626 | int width, int height, int fourcc, |
Line 662... | Line 663... | ||
662 | image->strides[index] = strides[index]; |
663 | image->strides[index] = strides[index]; |
663 | } |
664 | } |
Line 664... | Line 665... | ||
664 | 665 | ||
665 | return image; |
666 | return image; |
666 | } |
667 | } |
Line 667... | Line 668... | ||
667 | 668 | #endif |
|
668 | 669 | ||
669 | static __DRIimage * |
670 | static __DRIimage * |
670 | intel_from_planar(__DRIimage *parent, int plane, void *loaderPrivate) |
671 | intel_from_planar(__DRIimage *parent, int plane, void *loaderPrivate) |
Line 735... | Line 736... | ||
735 | .dupImage = intel_dup_image, |
736 | .dupImage = intel_dup_image, |
736 | .validateUsage = intel_validate_usage, |
737 | .validateUsage = intel_validate_usage, |
737 | .createImageFromNames = intel_create_image_from_names, |
738 | .createImageFromNames = intel_create_image_from_names, |
738 | .fromPlanar = intel_from_planar, |
739 | .fromPlanar = intel_from_planar, |
739 | .createImageFromTexture = intel_create_image_from_texture, |
740 | .createImageFromTexture = intel_create_image_from_texture, |
740 | .createImageFromFds = intel_create_image_from_fds |
741 | // .createImageFromFds = intel_create_image_from_fds |
741 | }; |
742 | }; |
Line 742... | Line 743... | ||
742 | 743 | ||
743 | static const __DRIextension *intelScreenExtensions[] = { |
744 | static const __DRIextension *intelScreenExtensions[] = { |
744 | &intelTexBufferExtension.base, |
745 | &intelTexBufferExtension.base, |
Line 756... | Line 757... | ||
756 | 757 | ||
757 | memset(&gp, 0, sizeof(gp)); |
758 | memset(&gp, 0, sizeof(gp)); |
758 | gp.param = param; |
759 | gp.param = param; |
Line 759... | Line 760... | ||
759 | gp.value = value; |
760 | gp.value = value; |
760 | 761 | ||
761 | ret = drmCommandWriteRead(psp->fd, DRM_I915_GETPARAM, &gp, sizeof(gp)); |
762 | ret = drmIoctl(psp->fd, DRM_IOCTL_I915_GETPARAM, &gp); |
762 | if (ret) { |
763 | if (ret) { |
763 | if (ret != -EINVAL) |
764 | if (ret != -EINVAL) |
764 | _mesa_warning(NULL, "drm_i915_getparam: %d", ret); |
765 | _mesa_warning(NULL, "drm_i915_getparam: %d", ret); |
Line 765... | Line 766... | ||
765 | return false; |
766 | return false; |
766 | } |
767 | } |
Line -... | Line 768... | ||
- | 768 | ||
767 | 769 | return true; |
|
768 | return true; |
770 | } |
769 | } |
771 | |
770 | 772 | ||
771 | static bool |
773 | static bool |
Line 1224... | Line 1226... | ||
1224 | .AllocateBuffer = intelAllocateBuffer, |
1226 | .AllocateBuffer = intelAllocateBuffer, |
1225 | .ReleaseBuffer = intelReleaseBuffer |
1227 | .ReleaseBuffer = intelReleaseBuffer |
1226 | }; |
1228 | }; |
Line 1227... | Line 1229... | ||
1227 | 1229 | ||
1228 | /* This is the table of extensions that the loader will dlsym() for. */ |
1230 | /* This is the table of extensions that the loader will dlsym() for. */ |
1229 | PUBLIC const __DRIextension *__driDriverExtensions[] = { |
1231 | __declspec(dllexport) const __DRIextension *__driDriverExtensions[] = { |
1230 | &driCoreExtension.base, |
1232 | &driCoreExtension.base, |
1231 | &driDRI2Extension.base, |
1233 | &driDRI2Extension.base, |
1232 | NULL |
1234 | NULL |