diff options
author | Jonathan Gray <jsg@cvs.openbsd.org> | 2017-08-26 16:59:42 +0000 |
---|---|---|
committer | Jonathan Gray <jsg@cvs.openbsd.org> | 2017-08-26 16:59:42 +0000 |
commit | 81ece42815e80818f160cdd85fab57d65b56ad15 (patch) | |
tree | 1059ff094da1aa50334115952fcb1cfcbda3acc6 /lib/mesa/src/gallium/drivers/rbug | |
parent | b0244145d5bb49623d58f6b5cab8143ada692b60 (diff) |
Revert to Mesa 13.0.6 to hopefully address rendering issues a handful of
people have reported with xpdf/fvwm on ivy bridge with modesetting driver.
Diffstat (limited to 'lib/mesa/src/gallium/drivers/rbug')
-rw-r--r-- | lib/mesa/src/gallium/drivers/rbug/Makefile.in | 47 | ||||
-rw-r--r-- | lib/mesa/src/gallium/drivers/rbug/rbug_context.c | 94 | ||||
-rw-r--r-- | lib/mesa/src/gallium/drivers/rbug/rbug_screen.c | 25 |
3 files changed, 110 insertions, 56 deletions
diff --git a/lib/mesa/src/gallium/drivers/rbug/Makefile.in b/lib/mesa/src/gallium/drivers/rbug/Makefile.in index 38a2e1f38..be583e989 100644 --- a/lib/mesa/src/gallium/drivers/rbug/Makefile.in +++ b/lib/mesa/src/gallium/drivers/rbug/Makefile.in @@ -76,13 +76,10 @@ target_triplet = @target@ DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ $(srcdir)/Makefile.sources $(top_srcdir)/bin/depcomp \ $(top_srcdir)/src/gallium/Automake.inc -@HAVE_LIBDRM_TRUE@am__append_1 = \ -@HAVE_LIBDRM_TRUE@ $(LIBDRM_LIBS) - -@HAVE_DRISW_TRUE@am__append_2 = \ +@HAVE_DRISW_TRUE@am__append_1 = \ @HAVE_DRISW_TRUE@ $(top_builddir)/src/gallium/winsys/sw/dri/libswdri.la -@HAVE_DRISW_KMS_TRUE@am__append_3 = \ +@HAVE_DRISW_KMS_TRUE@am__append_2 = \ @HAVE_DRISW_KMS_TRUE@ $(top_builddir)/src/gallium/winsys/sw/kms-dri/libswkmsdri.la \ @HAVE_DRISW_KMS_TRUE@ $(LIBDRM_LIBS) @@ -162,8 +159,6 @@ AMDGPU_CFLAGS = @AMDGPU_CFLAGS@ AMDGPU_LIBS = @AMDGPU_LIBS@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ -ANDROID_CFLAGS = @ANDROID_CFLAGS@ -ANDROID_LIBS = @ANDROID_LIBS@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ @@ -194,6 +189,8 @@ DLLTOOL = @DLLTOOL@ DLOPEN_LIBS = @DLOPEN_LIBS@ DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@ DRI2PROTO_LIBS = @DRI2PROTO_LIBS@ +DRI3PROTO_CFLAGS = @DRI3PROTO_CFLAGS@ +DRI3PROTO_LIBS = @DRI3PROTO_LIBS@ DRIGL_CFLAGS = @DRIGL_CFLAGS@ DRIGL_LIBS = @DRIGL_LIBS@ DRI_DRIVER_INSTALL_DIR = @DRI_DRIVER_INSTALL_DIR@ @@ -206,11 +203,10 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGL_CFLAGS = @EGL_CFLAGS@ +EGL_CLIENT_APIS = @EGL_CLIENT_APIS@ EGL_LIB_DEPS = @EGL_LIB_DEPS@ EGL_NATIVE_PLATFORM = @EGL_NATIVE_PLATFORM@ EGREP = @EGREP@ -ETNAVIV_CFLAGS = @ETNAVIV_CFLAGS@ -ETNAVIV_LIBS = @ETNAVIV_LIBS@ EXEEXT = @EXEEXT@ EXPAT_CFLAGS = @EXPAT_CFLAGS@ EXPAT_LIBS = @EXPAT_LIBS@ @@ -258,27 +254,31 @@ LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ LIBDRM_LIBS = @LIBDRM_LIBS@ LIBELF_CFLAGS = @LIBELF_CFLAGS@ LIBELF_LIBS = @LIBELF_LIBS@ -LIBGLVND_DATADIR = @LIBGLVND_DATADIR@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ -LIBSENSORS_LIBS = @LIBSENSORS_LIBS@ +LIBSENSORS_LDFLAGS = @LIBSENSORS_LDFLAGS@ +LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@ +LIBSHA1_LIBS = @LIBSHA1_LIBS@ LIBTOOL = @LIBTOOL@ -LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@ -LIBUNWIND_LIBS = @LIBUNWIND_LIBS@ LIB_DIR = @LIB_DIR@ LIB_EXT = @LIB_EXT@ LIPO = @LIPO@ +LLVM_BINDIR = @LLVM_BINDIR@ LLVM_CFLAGS = @LLVM_CFLAGS@ LLVM_CONFIG = @LLVM_CONFIG@ +LLVM_CPPFLAGS = @LLVM_CPPFLAGS@ LLVM_CXXFLAGS = @LLVM_CXXFLAGS@ LLVM_INCLUDEDIR = @LLVM_INCLUDEDIR@ LLVM_LDFLAGS = @LLVM_LDFLAGS@ +LLVM_LIBDIR = @LLVM_LIBDIR@ LLVM_LIBS = @LLVM_LIBS@ +LLVM_VERSION = @LLVM_VERSION@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ +MESA_LLVM = @MESA_LLVM@ MKDIR_P = @MKDIR_P@ MSVC2013_COMPAT_CFLAGS = @MSVC2013_COMPAT_CFLAGS@ MSVC2013_COMPAT_CXXFLAGS = @MSVC2013_COMPAT_CXXFLAGS@ @@ -299,6 +299,8 @@ OMX_LIBS = @OMX_LIBS@ OMX_LIB_INSTALL_DIR = @OMX_LIB_INSTALL_DIR@ OPENCL_LIBNAME = @OPENCL_LIBNAME@ OPENCL_VERSION = @OPENCL_VERSION@ +OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ +OPENSSL_LIBS = @OPENSSL_LIBS@ OSMESA_LIB = @OSMESA_LIB@ OSMESA_LIB_DEPS = @OSMESA_LIB_DEPS@ OSMESA_PC_LIB_PRIV = @OSMESA_PC_LIB_PRIV@ @@ -318,6 +320,8 @@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POSIX_SHELL = @POSIX_SHELL@ +PRESENTPROTO_CFLAGS = @PRESENTPROTO_CFLAGS@ +PRESENTPROTO_LIBS = @PRESENTPROTO_LIBS@ PTHREADSTUBS_CFLAGS = @PTHREADSTUBS_CFLAGS@ PTHREADSTUBS_LIBS = @PTHREADSTUBS_LIBS@ PTHREAD_CC = @PTHREAD_CC@ @@ -333,6 +337,8 @@ SED = @SED@ SELINUX_CFLAGS = @SELINUX_CFLAGS@ SELINUX_LIBS = @SELINUX_LIBS@ SET_MAKE = @SET_MAKE@ +SHA1_CFLAGS = @SHA1_CFLAGS@ +SHA1_LIBS = @SHA1_LIBS@ SHELL = @SHELL@ SIMPENROSE_CFLAGS = @SIMPENROSE_CFLAGS@ SIMPENROSE_LIBS = @SIMPENROSE_LIBS@ @@ -341,6 +347,7 @@ STRIP = @STRIP@ SWR_AVX2_CXXFLAGS = @SWR_AVX2_CXXFLAGS@ SWR_AVX_CXXFLAGS = @SWR_AVX_CXXFLAGS@ SWR_CXX11_CXXFLAGS = @SWR_CXX11_CXXFLAGS@ +TIMESTAMP_CMD = @TIMESTAMP_CMD@ VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ VALGRIND_LIBS = @VALGRIND_LIBS@ VA_CFLAGS = @VA_CFLAGS@ @@ -356,6 +363,7 @@ VDPAU_LIB_INSTALL_DIR = @VDPAU_LIB_INSTALL_DIR@ VDPAU_MAJOR = @VDPAU_MAJOR@ VDPAU_MINOR = @VDPAU_MINOR@ VERSION = @VERSION@ +VG_LIB_DEPS = @VG_LIB_DEPS@ VISIBILITY_CFLAGS = @VISIBILITY_CFLAGS@ VISIBILITY_CXXFLAGS = @VISIBILITY_CXXFLAGS@ VL_CFLAGS = @VL_CFLAGS@ @@ -384,10 +392,9 @@ XVMC_LIBS = @XVMC_LIBS@ XVMC_LIB_INSTALL_DIR = @XVMC_LIB_INSTALL_DIR@ XVMC_MAJOR = @XVMC_MAJOR@ XVMC_MINOR = @XVMC_MINOR@ +XXD = @XXD@ YACC = @YACC@ YFLAGS = @YFLAGS@ -ZLIB_CFLAGS = @ZLIB_CFLAGS@ -ZLIB_LIBS = @ZLIB_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ @@ -505,8 +512,12 @@ GALLIUM_TARGET_CFLAGS = \ $(LIBDRM_CFLAGS) \ $(VISIBILITY_CFLAGS) -GALLIUM_COMMON_LIB_DEPS = -lm $(LIBUNWIND_LIBS) $(LIBSENSORS_LIBS) \ - $(CLOCK_LIB) $(PTHREAD_LIBS) $(DLOPEN_LIBS) $(am__append_1) +GALLIUM_COMMON_LIB_DEPS = \ + -lm \ + $(CLOCK_LIB) \ + $(PTHREAD_LIBS) \ + $(DLOPEN_LIBS) + GALLIUM_WINSYS_CFLAGS = \ -I$(top_srcdir)/src \ -I$(top_srcdir)/include \ @@ -518,7 +529,7 @@ GALLIUM_WINSYS_CFLAGS = \ GALLIUM_PIPE_LOADER_WINSYS_LIBS = \ $(top_builddir)/src/gallium/winsys/sw/null/libws_null.la \ $(top_builddir)/src/gallium/winsys/sw/wrapper/libwsw.la \ - $(am__append_2) $(am__append_3) + $(am__append_1) $(am__append_2) AM_CFLAGS = \ $(GALLIUM_DRIVER_CFLAGS) diff --git a/lib/mesa/src/gallium/drivers/rbug/rbug_context.c b/lib/mesa/src/gallium/drivers/rbug/rbug_context.c index 9ecddad05..b08acfaf8 100644 --- a/lib/mesa/src/gallium/drivers/rbug/rbug_context.c +++ b/lib/mesa/src/gallium/drivers/rbug/rbug_context.c @@ -87,7 +87,7 @@ rbug_draw_block_locked(struct rbug_context *rb_pipe, int flag) if (rb_pipe->draw_rule.surf == rb_pipe->curr.cbufs[k]) block = TRUE; if (rb_pipe->draw_rule.texture) { - for (sh = 0; sh < Elements(rb_pipe->curr.num_views); sh++) { + for (sh = 0; sh < ARRAY_SIZE(rb_pipe->curr.num_views); sh++) { for (k = 0; k < rb_pipe->curr.num_views[sh]; k++) { if (rb_pipe->draw_rule.texture == rb_pipe->curr.texs[sh][k]) { block = TRUE; @@ -178,17 +178,20 @@ rbug_begin_query(struct pipe_context *_pipe, return ret; } -static void +static bool rbug_end_query(struct pipe_context *_pipe, struct pipe_query *query) { struct rbug_context *rb_pipe = rbug_context(_pipe); struct pipe_context *pipe = rb_pipe->pipe; + bool ret; pipe_mutex_lock(rb_pipe->call_mutex); - pipe->end_query(pipe, - query); + ret = pipe->end_query(pipe, + query); pipe_mutex_unlock(rb_pipe->call_mutex); + + return ret; } static boolean @@ -211,6 +214,17 @@ rbug_get_query_result(struct pipe_context *_pipe, return ret; } +static void +rbug_set_active_query_state(struct pipe_context *_pipe, boolean enable) +{ + struct rbug_context *rb_pipe = rbug_context(_pipe); + struct pipe_context *pipe = rb_pipe->pipe; + + pipe_mutex_lock(rb_pipe->call_mutex); + pipe->set_active_query_state(pipe, enable); + pipe_mutex_unlock(rb_pipe->call_mutex); +} + static void * rbug_create_blend_state(struct pipe_context *_pipe, const struct pipe_blend_state *blend) @@ -270,7 +284,8 @@ rbug_create_sampler_state(struct pipe_context *_pipe, } static void -rbug_bind_sampler_states(struct pipe_context *_pipe, unsigned shader, +rbug_bind_sampler_states(struct pipe_context *_pipe, + enum pipe_shader_type shader, unsigned start, unsigned count, void **samplers) { @@ -610,7 +625,7 @@ static void rbug_set_constant_buffer(struct pipe_context *_pipe, uint shader, uint index, - struct pipe_constant_buffer *_cb) + const struct pipe_constant_buffer *_cb) { struct rbug_context *rb_pipe = rbug_context(_pipe); struct pipe_context *pipe = rb_pipe->pipe; @@ -712,7 +727,7 @@ rbug_set_viewport_states(struct pipe_context *_pipe, static void rbug_set_sampler_views(struct pipe_context *_pipe, - unsigned shader, + enum pipe_shader_type shader, unsigned start, unsigned num, struct pipe_sampler_view **_views) @@ -938,7 +953,8 @@ rbug_clear_render_target(struct pipe_context *_pipe, struct pipe_surface *_dst, const union pipe_color_union *color, unsigned dstx, unsigned dsty, - unsigned width, unsigned height) + unsigned width, unsigned height, + bool render_condition_enabled) { struct rbug_context *rb_pipe = rbug_context(_pipe); struct rbug_surface *rb_surface_dst = rbug_surface(_dst); @@ -952,7 +968,8 @@ rbug_clear_render_target(struct pipe_context *_pipe, dstx, dsty, width, - height); + height, + render_condition_enabled); pipe_mutex_unlock(rb_pipe->call_mutex); } @@ -963,7 +980,8 @@ rbug_clear_depth_stencil(struct pipe_context *_pipe, double depth, unsigned stencil, unsigned dstx, unsigned dsty, - unsigned width, unsigned height) + unsigned width, unsigned height, + bool render_condition_enabled) { struct rbug_context *rb_pipe = rbug_context(_pipe); struct rbug_surface *rb_surface_dst = rbug_surface(_dst); @@ -979,7 +997,8 @@ rbug_clear_depth_stencil(struct pipe_context *_pipe, dstx, dsty, width, - height); + height, + render_condition_enabled); pipe_mutex_unlock(rb_pipe->call_mutex); } @@ -1127,14 +1146,31 @@ rbug_context_transfer_unmap(struct pipe_context *_context, static void -rbug_context_transfer_inline_write(struct pipe_context *_context, - struct pipe_resource *_resource, - unsigned level, - unsigned usage, - const struct pipe_box *box, - const void *data, - unsigned stride, - unsigned layer_stride) +rbug_context_buffer_subdata(struct pipe_context *_context, + struct pipe_resource *_resource, + unsigned usage, unsigned offset, + unsigned size, const void *data) +{ + struct rbug_context *rb_pipe = rbug_context(_context); + struct rbug_resource *rb_resource = rbug_resource(_resource); + struct pipe_context *context = rb_pipe->pipe; + struct pipe_resource *resource = rb_resource->resource; + + pipe_mutex_lock(rb_pipe->call_mutex); + context->buffer_subdata(context, resource, usage, offset, size, data); + pipe_mutex_unlock(rb_pipe->call_mutex); +} + + +static void +rbug_context_texture_subdata(struct pipe_context *_context, + struct pipe_resource *_resource, + unsigned level, + unsigned usage, + const struct pipe_box *box, + const void *data, + unsigned stride, + unsigned layer_stride) { struct rbug_context *rb_pipe = rbug_context(_context); struct rbug_resource *rb_resource = rbug_resource(_resource); @@ -1142,14 +1178,14 @@ rbug_context_transfer_inline_write(struct pipe_context *_context, struct pipe_resource *resource = rb_resource->resource; pipe_mutex_lock(rb_pipe->call_mutex); - context->transfer_inline_write(context, - resource, - level, - usage, - box, - data, - stride, - layer_stride); + context->texture_subdata(context, + resource, + level, + usage, + box, + data, + stride, + layer_stride); pipe_mutex_unlock(rb_pipe->call_mutex); } @@ -1184,6 +1220,7 @@ rbug_context_create(struct pipe_screen *_screen, struct pipe_context *pipe) rb_pipe->base.begin_query = rbug_begin_query; rb_pipe->base.end_query = rbug_end_query; rb_pipe->base.get_query_result = rbug_get_query_result; + rb_pipe->base.set_active_query_state = rbug_set_active_query_state; rb_pipe->base.create_blend_state = rbug_create_blend_state; rb_pipe->base.bind_blend_state = rbug_bind_blend_state; rb_pipe->base.delete_blend_state = rbug_delete_blend_state; @@ -1237,7 +1274,8 @@ rbug_context_create(struct pipe_screen *_screen, struct pipe_context *pipe) rb_pipe->base.transfer_map = rbug_context_transfer_map; rb_pipe->base.transfer_unmap = rbug_context_transfer_unmap; rb_pipe->base.transfer_flush_region = rbug_context_transfer_flush_region; - rb_pipe->base.transfer_inline_write = rbug_context_transfer_inline_write; + rb_pipe->base.buffer_subdata = rbug_context_buffer_subdata; + rb_pipe->base.texture_subdata = rbug_context_texture_subdata; rb_pipe->pipe = pipe; diff --git a/lib/mesa/src/gallium/drivers/rbug/rbug_screen.c b/lib/mesa/src/gallium/drivers/rbug/rbug_screen.c index 7da4e8156..3742c1033 100644 --- a/lib/mesa/src/gallium/drivers/rbug/rbug_screen.c +++ b/lib/mesa/src/gallium/drivers/rbug/rbug_screen.c @@ -129,13 +129,13 @@ rbug_screen_is_format_supported(struct pipe_screen *_screen, static struct pipe_context * rbug_screen_context_create(struct pipe_screen *_screen, - void *priv) + void *priv, unsigned flags) { struct rbug_screen *rb_screen = rbug_screen(_screen); struct pipe_screen *screen = rb_screen->screen; struct pipe_context *result; - result = screen->context_create(screen, priv); + result = screen->context_create(screen, priv, flags); if (result) return rbug_context_create(_screen, result); return NULL; @@ -160,13 +160,14 @@ rbug_screen_resource_create(struct pipe_screen *_screen, static struct pipe_resource * rbug_screen_resource_from_handle(struct pipe_screen *_screen, const struct pipe_resource *templ, - struct winsys_handle *handle) + struct winsys_handle *handle, + unsigned usage) { struct rbug_screen *rb_screen = rbug_screen(_screen); struct pipe_screen *screen = rb_screen->screen; struct pipe_resource *result; - result = screen->resource_from_handle(screen, templ, handle); + result = screen->resource_from_handle(screen, templ, handle, usage); result = rbug_resource_create(rbug_screen(_screen), result); @@ -175,15 +176,19 @@ rbug_screen_resource_from_handle(struct pipe_screen *_screen, static boolean rbug_screen_resource_get_handle(struct pipe_screen *_screen, + struct pipe_context *_pipe, struct pipe_resource *_resource, - struct winsys_handle *handle) + struct winsys_handle *handle, + unsigned usage) { struct rbug_screen *rb_screen = rbug_screen(_screen); + struct rbug_context *rb_pipe = rbug_context(_pipe); struct rbug_resource *rb_resource = rbug_resource(_resource); struct pipe_screen *screen = rb_screen->screen; struct pipe_resource *resource = rb_resource->resource; - return screen->resource_get_handle(screen, resource, handle); + return screen->resource_get_handle(screen, rb_pipe ? rb_pipe->pipe : NULL, + resource, handle, usage); } @@ -227,15 +232,15 @@ rbug_screen_fence_reference(struct pipe_screen *_screen, static boolean rbug_screen_fence_finish(struct pipe_screen *_screen, + struct pipe_context *_ctx, struct pipe_fence_handle *fence, uint64_t timeout) { struct rbug_screen *rb_screen = rbug_screen(_screen); struct pipe_screen *screen = rb_screen->screen; + struct pipe_context *ctx = _ctx ? rbug_context(_ctx)->pipe : NULL; - return screen->fence_finish(screen, - fence, - timeout); + return screen->fence_finish(screen, ctx, fence, timeout); } boolean @@ -281,7 +286,7 @@ rbug_screen_create(struct pipe_screen *screen) rb_screen->screen = screen; - rb_screen->private_context = screen->context_create(screen, NULL); + rb_screen->private_context = screen->context_create(screen, NULL, 0); if (!rb_screen->private_context) goto err_free; |