summaryrefslogtreecommitdiff
path: root/lib/mesa
diff options
context:
space:
mode:
authorJonathan Gray <jsg@cvs.openbsd.org>2016-05-29 10:18:49 +0000
committerJonathan Gray <jsg@cvs.openbsd.org>2016-05-29 10:18:49 +0000
commit6efd01a304e323b57b57ea1a83f23bcb37de5acc (patch)
treedc57d2a37fc9193c0128dadc9c8065f026d635b1 /lib/mesa
parent825633c318d3edb4978e828a5232a0277d8e4fd1 (diff)
Import Mesa 11.2.2
Diffstat (limited to 'lib/mesa')
-rw-r--r--lib/mesa/src/gallium/auxiliary/util/u_prim_restart.h9
-rw-r--r--lib/mesa/src/gallium/auxiliary/vl/vl_winsys_drm.c14
2 files changed, 12 insertions, 11 deletions
diff --git a/lib/mesa/src/gallium/auxiliary/util/u_prim_restart.h b/lib/mesa/src/gallium/auxiliary/util/u_prim_restart.h
index 0e17ce5eb..1e98e0e1b 100644
--- a/lib/mesa/src/gallium/auxiliary/util/u_prim_restart.h
+++ b/lib/mesa/src/gallium/auxiliary/util/u_prim_restart.h
@@ -38,17 +38,20 @@ extern "C" {
struct pipe_context;
struct pipe_draw_info;
-union pipe_index_binding;
+struct pipe_index_buffer;
struct pipe_resource;
enum pipe_error
util_translate_prim_restart_ib(struct pipe_context *context,
- const struct pipe_draw_info *info,
- struct pipe_resource **dst_buffer);
+ struct pipe_index_buffer *src_buffer,
+ struct pipe_resource **dst_buffer,
+ unsigned num_indexes,
+ unsigned restart_index);
enum pipe_error
util_draw_vbo_without_prim_restart(struct pipe_context *context,
+ const struct pipe_index_buffer *ib,
const struct pipe_draw_info *info);
diff --git a/lib/mesa/src/gallium/auxiliary/vl/vl_winsys_drm.c b/lib/mesa/src/gallium/auxiliary/vl/vl_winsys_drm.c
index ebde5b8cb..6d9d94758 100644
--- a/lib/mesa/src/gallium/auxiliary/vl/vl_winsys_drm.c
+++ b/lib/mesa/src/gallium/auxiliary/vl/vl_winsys_drm.c
@@ -26,7 +26,6 @@
**************************************************************************/
#include <assert.h>
-#include <fcntl.h>
#include "pipe/p_screen.h"
#include "pipe-loader/pipe_loader.h"
@@ -42,20 +41,20 @@ struct vl_screen *
vl_drm_screen_create(int fd)
{
struct vl_screen *vscreen;
- int new_fd;
+ int new_fd = -1;
vscreen = CALLOC_STRUCT(vl_screen);
if (!vscreen)
return NULL;
- if (fd < 0 || (new_fd = fcntl(fd, F_DUPFD_CLOEXEC, 3)) < 0)
- goto free_screen;
+ if (fd < 0 || (new_fd = dup(fd)) < 0)
+ goto error;
if (pipe_loader_drm_probe_fd(&vscreen->dev, new_fd))
- vscreen->pscreen = pipe_loader_create_screen(vscreen->dev, 0);
+ vscreen->pscreen = pipe_loader_create_screen(vscreen->dev);
if (!vscreen->pscreen)
- goto release_pipe;
+ goto error;
vscreen->destroy = vl_drm_screen_destroy;
vscreen->texture_from_drawable = NULL;
@@ -65,13 +64,12 @@ vl_drm_screen_create(int fd)
vscreen->get_private = NULL;
return vscreen;
-release_pipe:
+error:
if (vscreen->dev)
pipe_loader_release(&vscreen->dev, 1);
else
close(new_fd);
-free_screen:
FREE(vscreen);
return NULL;
}