gallium/util: s/uint/enum tgsi_semantic/ in simple shader code
[mesa.git] / src / gallium / auxiliary / vl / vl_winsys_dri.c
index 0b2c939389a5c11efcc1db487f85b1c82762f561..79ebf750cdb4f867ff7e1957279acca37d7b482c 100644 (file)
@@ -46,7 +46,7 @@
 #include "state_tracker/drm_driver.h"
 
 #include "util/u_memory.h"
-#include "util/u_hash.h"
+#include "util/crc32.h"
 #include "util/u_hash_table.h"
 #include "util/u_inlines.h"
 
@@ -181,7 +181,7 @@ vl_dri2_screen_texture_from_drawable(struct vl_screen *vscreen, void *drawable)
    struct vl_dri_screen *scrn = (struct vl_dri_screen *)vscreen;
 
    struct winsys_handle dri2_handle;
-   struct pipe_resource template, *tex;
+   struct pipe_resource templ, *tex;
 
    xcb_dri2_get_buffers_reply_t *reply;
    xcb_dri2_dri2_buffer_t *buffers, *back_left;
@@ -235,19 +235,19 @@ vl_dri2_screen_texture_from_drawable(struct vl_screen *vscreen, void *drawable)
    dri2_handle.handle = back_left->name;
    dri2_handle.stride = back_left->pitch;
 
-   memset(&template, 0, sizeof(template));
-   template.target = PIPE_TEXTURE_2D;
-   template.format = PIPE_FORMAT_B8G8R8X8_UNORM;
-   template.last_level = 0;
-   template.width0 = reply->width;
-   template.height0 = reply->height;
-   template.depth0 = 1;
-   template.array_size = 1;
-   template.usage = PIPE_USAGE_DEFAULT;
-   template.bind = PIPE_BIND_RENDER_TARGET;
-   template.flags = 0;
-
-   tex = scrn->base.pscreen->resource_from_handle(scrn->base.pscreen, &template,
+   memset(&templ, 0, sizeof(templ));
+   templ.target = PIPE_TEXTURE_2D;
+   templ.format = PIPE_FORMAT_B8G8R8X8_UNORM;
+   templ.last_level = 0;
+   templ.width0 = reply->width;
+   templ.height0 = reply->height;
+   templ.depth0 = 1;
+   templ.array_size = 1;
+   templ.usage = PIPE_USAGE_DEFAULT;
+   templ.bind = PIPE_BIND_RENDER_TARGET;
+   templ.flags = 0;
+
+   tex = scrn->base.pscreen->resource_from_handle(scrn->base.pscreen, &templ,
                                                   &dri2_handle,
                                                   PIPE_HANDLE_USAGE_READ_WRITE);
    free(reply);
@@ -363,7 +363,6 @@ vl_dri2_screen_create(Display *display, int screen)
       goto free_query;
 
    driverType = XCB_DRI2_DRIVER_TYPE_DRI;
-#ifdef DRI2DriverPrimeShift
    {
       char *prime = getenv("DRI_PRIME");
       if (prime) {
@@ -375,7 +374,6 @@ vl_dri2_screen_create(Display *display, int screen)
                ((primeid & DRI2DriverPrimeMask) << DRI2DriverPrimeShift);
       }
    }
-#endif
 
    connect_cookie = xcb_dri2_connect_unchecked(scrn->conn,
                                                xcb_screen->root,