~ubuntu-branches/ubuntu/precise/mesa/precise-updates

« back to all changes in this revision

Viewing changes to src/egl/main/eglapi.c

  • Committer: Package Import Robot
  • Author(s): Robert Hooker
  • Date: 2012-02-02 12:05:48 UTC
  • mfrom: (1.7.1) (3.3.27 sid)
  • Revision ID: package-import@ubuntu.com-20120202120548-nvkma85jq0h4coix
Tags: 8.0~rc2-0ubuntu4
Drop drisearchdir handling, it is no longer needed with multiarch
and dri-alternates being removed.

Show diffs side-by-side

added added

removed removed

Lines of Context:
217
217
}
218
218
 
219
219
 
220
 
#ifdef EGL_KHR_reusable_sync
221
 
 
222
 
 
223
220
static INLINE _EGLDriver *
224
221
_eglCheckSync(_EGLDisplay *disp, _EGLSync *s, const char *msg)
225
222
{
234
231
}
235
232
 
236
233
 
237
 
#endif /* EGL_KHR_reusable_sync */
238
 
 
239
 
 
240
234
#ifdef EGL_MESA_screen_surface
241
235
 
242
236
 
301
295
EGLDisplay EGLAPIENTRY
302
296
eglGetDisplay(EGLNativeDisplayType nativeDisplay)
303
297
{
304
 
   _EGLPlatformType plat = _eglGetNativePlatform();
 
298
   _EGLPlatformType plat = _eglGetNativePlatform(nativeDisplay);
305
299
   _EGLDisplay *dpy = _eglFindDisplay(plat, (void *) nativeDisplay);
306
300
   return _eglGetDisplayHandle(dpy);
307
301
}
538
532
   EGLSurface ret;
539
533
 
540
534
   _EGL_CHECK_CONFIG(disp, conf, EGL_NO_SURFACE, drv);
541
 
   if (disp->Platform != _eglGetNativePlatform())
 
535
   if (disp->Platform != _eglGetNativePlatform(disp->PlatformDisplay))
542
536
      RETURN_EGL_ERROR(disp, EGL_BAD_NATIVE_WINDOW, EGL_NO_SURFACE);
543
537
 
544
538
   surf = drv->API.CreateWindowSurface(drv, disp, conf, window, attrib_list);
559
553
   EGLSurface ret;
560
554
 
561
555
   _EGL_CHECK_CONFIG(disp, conf, EGL_NO_SURFACE, drv);
562
 
   if (disp->Platform != _eglGetNativePlatform())
 
556
   if (disp->Platform != _eglGetNativePlatform(disp->PlatformDisplay))
563
557
      RETURN_EGL_ERROR(disp, EGL_BAD_NATIVE_PIXMAP, EGL_NO_SURFACE);
564
558
 
565
559
   surf = drv->API.CreatePixmapSurface(drv, disp, conf, pixmap, attrib_list);
720
714
   EGLBoolean ret;
721
715
 
722
716
   _EGL_CHECK_SURFACE(disp, surf, EGL_FALSE, drv);
723
 
   if (disp->Platform != _eglGetNativePlatform())
 
717
   if (disp->Platform != _eglGetNativePlatform(disp->PlatformDisplay))
724
718
      RETURN_EGL_ERROR(disp, EGL_BAD_NATIVE_PIXMAP, EGL_FALSE);
725
719
   ret = drv->API.CopyBuffers(drv, disp, surf, target);
726
720
 
759
753
EGLBoolean EGLAPIENTRY
760
754
eglWaitGL(void)
761
755
{
762
 
#ifdef EGL_VERSION_1_2
763
756
   _EGLThreadInfo *t = _eglGetCurrentThread();
764
757
   EGLint api_index = t->CurrentAPIIndex;
765
758
   EGLint es_index = _eglConvertApiToIndex(EGL_OPENGL_ES_API);
772
765
   ret = eglWaitClient();
773
766
   t->CurrentAPIIndex = api_index;
774
767
   return ret;
775
 
#else
776
 
   return eglWaitClient();
777
 
#endif
778
768
}
779
769
 
780
770
 
933
923
#ifdef EGL_MESA_drm_display
934
924
      { "eglGetDRMDisplayMESA", (_EGLProc) eglGetDRMDisplayMESA },
935
925
#endif
936
 
#ifdef EGL_KHR_image_base
937
926
      { "eglCreateImageKHR", (_EGLProc) eglCreateImageKHR },
938
927
      { "eglDestroyImageKHR", (_EGLProc) eglDestroyImageKHR },
939
 
#endif /* EGL_KHR_image_base */
 
928
      { "eglCreateSyncKHR", (_EGLProc) eglCreateSyncKHR },
 
929
      { "eglDestroySyncKHR", (_EGLProc) eglDestroySyncKHR },
 
930
      { "eglClientWaitSyncKHR", (_EGLProc) eglClientWaitSyncKHR },
 
931
      { "eglSignalSyncKHR", (_EGLProc) eglSignalSyncKHR },
 
932
      { "eglGetSyncAttribKHR", (_EGLProc) eglGetSyncAttribKHR },
940
933
#ifdef EGL_NOK_swap_region
941
934
      { "eglSwapBuffersRegionNOK", (_EGLProc) eglSwapBuffersRegionNOK },
942
935
#endif
948
941
      { "eglBindWaylandDisplayWL", (_EGLProc) eglBindWaylandDisplayWL },
949
942
      { "eglUnbindWaylandDisplayWL", (_EGLProc) eglUnbindWaylandDisplayWL },
950
943
#endif
 
944
      { "eglPostSubBufferNV", (_EGLProc) eglPostSubBufferNV },
951
945
      { NULL, NULL }
952
946
   };
953
947
   EGLint i;
1208
1202
 ** EGL 1.2
1209
1203
 **/
1210
1204
 
1211
 
#ifdef EGL_VERSION_1_2
1212
 
 
1213
 
 
1214
1205
/**
1215
1206
 * Specify the client API to use for subsequent calls including:
1216
1207
 *  eglCreateContext()
1309
1300
}
1310
1301
 
1311
1302
 
1312
 
#endif /* EGL_VERSION_1_2 */
1313
 
 
1314
 
 
1315
 
#ifdef EGL_KHR_image_base
1316
 
 
1317
 
 
1318
1303
EGLImageKHR EGLAPIENTRY
1319
1304
eglCreateImageKHR(EGLDisplay dpy, EGLContext ctx, EGLenum target,
1320
1305
                  EGLClientBuffer buffer, const EGLint *attr_list)
1360
1345
}
1361
1346
 
1362
1347
 
1363
 
#endif /* EGL_KHR_image_base */
1364
 
 
1365
 
 
1366
 
#ifdef EGL_KHR_reusable_sync
1367
 
 
1368
 
 
1369
1348
EGLSyncKHR EGLAPIENTRY
1370
1349
eglCreateSyncKHR(EGLDisplay dpy, EGLenum type, const EGLint *attrib_list)
1371
1350
{
1451
1430
}
1452
1431
 
1453
1432
 
1454
 
#endif /* EGL_KHR_reusable_sync */
1455
 
 
1456
 
 
1457
1433
#ifdef EGL_NOK_swap_region
1458
1434
 
1459
1435
EGLBoolean EGLAPIENTRY
1565
1541
   RETURN_EGL_EVAL(disp, ret);
1566
1542
}
1567
1543
#endif
 
1544
 
 
1545
 
 
1546
EGLBoolean EGLAPIENTRY
 
1547
eglPostSubBufferNV(EGLDisplay dpy, EGLSurface surface,
 
1548
                   EGLint x, EGLint y, EGLint width, EGLint height)
 
1549
{
 
1550
   _EGLDisplay *disp = _eglLockDisplay(dpy);
 
1551
   _EGLSurface *surf = _eglLookupSurface(surface, disp);
 
1552
   _EGLDriver *drv;
 
1553
   EGLBoolean ret;
 
1554
 
 
1555
   _EGL_CHECK_SURFACE(disp, surf, EGL_FALSE, drv);
 
1556
 
 
1557
   if (!disp->Extensions.NV_post_sub_buffer)
 
1558
      RETURN_EGL_EVAL(disp, EGL_FALSE);
 
1559
 
 
1560
   ret = drv->API.PostSubBufferNV(drv, disp, surf, x, y, width, height);
 
1561
 
 
1562
   RETURN_EGL_EVAL(disp, ret);
 
1563
}