summaryrefslogtreecommitdiff
path: root/lib/mesa/src/gallium/drivers/softpipe
diff options
context:
space:
mode:
authorJonathan Gray <jsg@cvs.openbsd.org>2017-12-31 07:12:27 +0000
committerJonathan Gray <jsg@cvs.openbsd.org>2017-12-31 07:12:27 +0000
commit051645c92924bf915d82bf219f2ed67309b5577a (patch)
tree4aae126dd8e5a18c6a9926a5468d1561e6038a07 /lib/mesa/src/gallium/drivers/softpipe
parent2dae6fe6f74cf7fb9fd65285302c0331d9786b00 (diff)
Merge Mesa 17.2.8
Diffstat (limited to 'lib/mesa/src/gallium/drivers/softpipe')
-rw-r--r--lib/mesa/src/gallium/drivers/softpipe/Makefile.in57
-rw-r--r--lib/mesa/src/gallium/drivers/softpipe/sp_compute.c2
-rw-r--r--lib/mesa/src/gallium/drivers/softpipe/sp_context.c18
-rw-r--r--lib/mesa/src/gallium/drivers/softpipe/sp_flush.c4
-rw-r--r--lib/mesa/src/gallium/drivers/softpipe/sp_flush.h2
-rw-r--r--lib/mesa/src/gallium/drivers/softpipe/sp_fs_exec.c8
-rw-r--r--lib/mesa/src/gallium/drivers/softpipe/sp_quad_fs.c8
-rw-r--r--lib/mesa/src/gallium/drivers/softpipe/sp_screen.c27
-rw-r--r--lib/mesa/src/gallium/drivers/softpipe/sp_state_derived.c2
-rw-r--r--lib/mesa/src/gallium/drivers/softpipe/sp_state_sampler.c2
-rw-r--r--lib/mesa/src/gallium/drivers/softpipe/sp_state_shader.c4
-rw-r--r--lib/mesa/src/gallium/drivers/softpipe/sp_tex_sample.c20
-rw-r--r--lib/mesa/src/gallium/drivers/softpipe/sp_tex_sample.h3
-rw-r--r--lib/mesa/src/gallium/drivers/softpipe/sp_texture.c2
14 files changed, 75 insertions, 84 deletions
diff --git a/lib/mesa/src/gallium/drivers/softpipe/Makefile.in b/lib/mesa/src/gallium/drivers/softpipe/Makefile.in
index a25d07b66..2b3e31fef 100644
--- a/lib/mesa/src/gallium/drivers/softpipe/Makefile.in
+++ b/lib/mesa/src/gallium/drivers/softpipe/Makefile.in
@@ -76,10 +76,13 @@ target_triplet = @target@
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
$(srcdir)/Makefile.sources $(top_srcdir)/bin/depcomp \
$(top_srcdir)/src/gallium/Automake.inc
-@HAVE_DRISW_TRUE@am__append_1 = \
+@HAVE_LIBDRM_TRUE@am__append_1 = \
+@HAVE_LIBDRM_TRUE@ $(LIBDRM_LIBS)
+
+@HAVE_DRISW_TRUE@am__append_2 = \
@HAVE_DRISW_TRUE@ $(top_builddir)/src/gallium/winsys/sw/dri/libswdri.la
-@HAVE_DRISW_KMS_TRUE@am__append_2 = \
+@HAVE_DRISW_KMS_TRUE@am__append_3 = \
@HAVE_DRISW_KMS_TRUE@ $(top_builddir)/src/gallium/winsys/sw/kms-dri/libswkmsdri.la \
@HAVE_DRISW_KMS_TRUE@ $(LIBDRM_LIBS)
@@ -167,6 +170,8 @@ 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@
@@ -197,8 +202,6 @@ 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@
@@ -211,10 +214,11 @@ 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@
@@ -241,6 +245,8 @@ GL_PC_LIB_PRIV = @GL_PC_LIB_PRIV@
GL_PC_REQ_PRIV = @GL_PC_REQ_PRIV@
GREP = @GREP@
HAVE_XF86VIDMODE = @HAVE_XF86VIDMODE@
+I915_CFLAGS = @I915_CFLAGS@
+I915_LIBS = @I915_LIBS@
INDENT = @INDENT@
INDENT_FLAGS = @INDENT_FLAGS@
INSTALL = @INSTALL@
@@ -248,45 +254,40 @@ INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-INTEL_CFLAGS = @INTEL_CFLAGS@
-INTEL_LIBS = @INTEL_LIBS@
LD = @LD@
LDFLAGS = @LDFLAGS@
LD_NO_UNDEFINED = @LD_NO_UNDEFINED@
LEX = @LEX@
LEXLIB = @LEXLIB@
LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
+LIBATOMIC_LIBS = @LIBATOMIC_LIBS@
LIBCLC_INCLUDEDIR = @LIBCLC_INCLUDEDIR@
LIBCLC_LIBEXECDIR = @LIBCLC_LIBEXECDIR@
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_LDFLAGS = @LIBSENSORS_LDFLAGS@
-LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@
-LIBSHA1_LIBS = @LIBSHA1_LIBS@
+LIBSENSORS_LIBS = @LIBSENSORS_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@
@@ -307,8 +308,6 @@ 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@
@@ -328,8 +327,6 @@ 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@
@@ -345,8 +342,6 @@ 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@
@@ -355,7 +350,8 @@ STRIP = @STRIP@
SWR_AVX2_CXXFLAGS = @SWR_AVX2_CXXFLAGS@
SWR_AVX_CXXFLAGS = @SWR_AVX_CXXFLAGS@
SWR_CXX11_CXXFLAGS = @SWR_CXX11_CXXFLAGS@
-TIMESTAMP_CMD = @TIMESTAMP_CMD@
+SWR_KNL_CXXFLAGS = @SWR_KNL_CXXFLAGS@
+SWR_SKX_CXXFLAGS = @SWR_SKX_CXXFLAGS@
VALGRIND_CFLAGS = @VALGRIND_CFLAGS@
VALGRIND_LIBS = @VALGRIND_LIBS@
VA_CFLAGS = @VA_CFLAGS@
@@ -363,15 +359,12 @@ VA_LIBS = @VA_LIBS@
VA_LIB_INSTALL_DIR = @VA_LIB_INSTALL_DIR@
VA_MAJOR = @VA_MAJOR@
VA_MINOR = @VA_MINOR@
-VC4_CFLAGS = @VC4_CFLAGS@
-VC4_LIBS = @VC4_LIBS@
VDPAU_CFLAGS = @VDPAU_CFLAGS@
VDPAU_LIBS = @VDPAU_LIBS@
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@
@@ -379,6 +372,7 @@ VL_LIBS = @VL_LIBS@
VULKAN_ICD_INSTALL_DIR = @VULKAN_ICD_INSTALL_DIR@
WAYLAND_CFLAGS = @WAYLAND_CFLAGS@
WAYLAND_LIBS = @WAYLAND_LIBS@
+WAYLAND_PROTOCOLS_DATADIR = @WAYLAND_PROTOCOLS_DATADIR@
WAYLAND_SCANNER = @WAYLAND_SCANNER@
WAYLAND_SCANNER_CFLAGS = @WAYLAND_SCANNER_CFLAGS@
WAYLAND_SCANNER_LIBS = @WAYLAND_SCANNER_LIBS@
@@ -400,9 +394,10 @@ 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@
@@ -567,12 +562,8 @@ GALLIUM_TARGET_CFLAGS = \
$(LIBDRM_CFLAGS) \
$(VISIBILITY_CFLAGS)
-GALLIUM_COMMON_LIB_DEPS = \
- -lm \
- $(CLOCK_LIB) \
- $(PTHREAD_LIBS) \
- $(DLOPEN_LIBS)
-
+GALLIUM_COMMON_LIB_DEPS = -lm $(LIBUNWIND_LIBS) $(LIBSENSORS_LIBS) \
+ $(CLOCK_LIB) $(PTHREAD_LIBS) $(DLOPEN_LIBS) $(am__append_1)
GALLIUM_WINSYS_CFLAGS = \
-I$(top_srcdir)/src \
-I$(top_srcdir)/include \
@@ -584,7 +575,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_1) $(am__append_2)
+ $(am__append_2) $(am__append_3)
AM_CFLAGS = \
$(GALLIUM_DRIVER_CFLAGS) \
$(MSVC2013_COMPAT_CFLAGS)
diff --git a/lib/mesa/src/gallium/drivers/softpipe/sp_compute.c b/lib/mesa/src/gallium/drivers/softpipe/sp_compute.c
index 53f7a0beb..31252255b 100644
--- a/lib/mesa/src/gallium/drivers/softpipe/sp_compute.c
+++ b/lib/mesa/src/gallium/drivers/softpipe/sp_compute.c
@@ -175,7 +175,7 @@ softpipe_launch_grid(struct pipe_context *context,
int bwidth, bheight, bdepth;
int w, h, d, i;
int g_w, g_h, g_d;
- uint32_t grid_size[3];
+ uint32_t grid_size[3] = {0};
void *local_mem = NULL;
softpipe_update_compute_samplers(softpipe);
diff --git a/lib/mesa/src/gallium/drivers/softpipe/sp_context.c b/lib/mesa/src/gallium/drivers/softpipe/sp_context.c
index 323f74ff3..48f87e656 100644
--- a/lib/mesa/src/gallium/drivers/softpipe/sp_context.c
+++ b/lib/mesa/src/gallium/drivers/softpipe/sp_context.c
@@ -37,6 +37,7 @@
#include "util/u_memory.h"
#include "util/u_pstipple.h"
#include "util/u_inlines.h"
+#include "util/u_upload_mgr.h"
#include "tgsi/tgsi_exec.h"
#include "sp_buffer.h"
#include "sp_clear.h"
@@ -86,6 +87,9 @@ softpipe_destroy( struct pipe_context *pipe )
if (softpipe->quad.pstipple)
softpipe->quad.pstipple->destroy( softpipe->quad.pstipple );
+ if (softpipe->pipe.stream_uploader)
+ u_upload_destroy(softpipe->pipe.stream_uploader);
+
for (i = 0; i < PIPE_MAX_COLOR_BUFS; i++) {
sp_destroy_tile_cache(softpipe->cbuf_cache[i]);
pipe_surface_reference(&softpipe->framebuffer.cbufs[i], NULL);
@@ -110,7 +114,7 @@ softpipe_destroy( struct pipe_context *pipe )
}
for (i = 0; i < softpipe->num_vertex_buffers; i++) {
- pipe_resource_reference(&softpipe->vertex_buffer[i].buffer, NULL);
+ pipe_vertex_buffer_unreference(&softpipe->vertex_buffer[i]);
}
tgsi_exec_machine_destroy(softpipe->fs_machine);
@@ -174,10 +178,10 @@ softpipe_is_resource_referenced( struct pipe_context *pipe,
static void
-softpipe_render_condition( struct pipe_context *pipe,
- struct pipe_query *query,
- boolean condition,
- uint mode )
+softpipe_render_condition(struct pipe_context *pipe,
+ struct pipe_query *query,
+ boolean condition,
+ enum pipe_render_cond_flag mode)
{
struct softpipe_context *softpipe = softpipe_context( pipe );
@@ -267,6 +271,10 @@ softpipe_create_context(struct pipe_screen *screen,
softpipe->quad.blend = sp_quad_blend_stage(softpipe);
softpipe->quad.pstipple = sp_quad_polygon_stipple_stage(softpipe);
+ softpipe->pipe.stream_uploader = u_upload_create_default(&softpipe->pipe);
+ if (!softpipe->pipe.stream_uploader)
+ goto fail;
+ softpipe->pipe.const_uploader = softpipe->pipe.stream_uploader;
/*
* Create drawing context and plug our rendering stage into it.
diff --git a/lib/mesa/src/gallium/drivers/softpipe/sp_flush.c b/lib/mesa/src/gallium/drivers/softpipe/sp_flush.c
index 656d8a325..3bf8c4992 100644
--- a/lib/mesa/src/gallium/drivers/softpipe/sp_flush.c
+++ b/lib/mesa/src/gallium/drivers/softpipe/sp_flush.c
@@ -169,7 +169,7 @@ softpipe_flush_resource(struct pipe_context *pipe,
return TRUE;
}
-void softpipe_texture_barrier(struct pipe_context *pipe)
+void softpipe_texture_barrier(struct pipe_context *pipe, unsigned flags)
{
struct softpipe_context *softpipe = softpipe_context(pipe);
uint i, sh;
@@ -192,5 +192,5 @@ void softpipe_texture_barrier(struct pipe_context *pipe)
void softpipe_memory_barrier(struct pipe_context *pipe, unsigned flags)
{
- softpipe_texture_barrier(pipe);
+ softpipe_texture_barrier(pipe, 0);
}
diff --git a/lib/mesa/src/gallium/drivers/softpipe/sp_flush.h b/lib/mesa/src/gallium/drivers/softpipe/sp_flush.h
index 0674b4a7e..abbc09865 100644
--- a/lib/mesa/src/gallium/drivers/softpipe/sp_flush.h
+++ b/lib/mesa/src/gallium/drivers/softpipe/sp_flush.h
@@ -55,6 +55,6 @@ softpipe_flush_resource(struct pipe_context *pipe,
boolean cpu_access,
boolean do_not_block);
-void softpipe_texture_barrier(struct pipe_context *pipe);
+void softpipe_texture_barrier(struct pipe_context *pipe, unsigned flags);
void softpipe_memory_barrier(struct pipe_context *pipe, unsigned flags);
#endif
diff --git a/lib/mesa/src/gallium/drivers/softpipe/sp_fs_exec.c b/lib/mesa/src/gallium/drivers/softpipe/sp_fs_exec.c
index f1662bffd..cb2285049 100644
--- a/lib/mesa/src/gallium/drivers/softpipe/sp_fs_exec.c
+++ b/lib/mesa/src/gallium/drivers/softpipe/sp_fs_exec.c
@@ -51,14 +51,6 @@ struct sp_exec_fragment_shader
};
-/** cast wrapper */
-static inline struct sp_exec_fragment_shader *
-sp_exec_fragment_shader(const struct sp_fragment_shader_variant *var)
-{
- return (struct sp_exec_fragment_shader *) var;
-}
-
-
static void
exec_prepare( const struct sp_fragment_shader_variant *var,
struct tgsi_exec_machine *machine,
diff --git a/lib/mesa/src/gallium/drivers/softpipe/sp_quad_fs.c b/lib/mesa/src/gallium/drivers/softpipe/sp_quad_fs.c
index 8fb632d9d..26e7434ed 100644
--- a/lib/mesa/src/gallium/drivers/softpipe/sp_quad_fs.c
+++ b/lib/mesa/src/gallium/drivers/softpipe/sp_quad_fs.c
@@ -55,14 +55,6 @@ struct quad_shade_stage
};
-/** cast wrapper */
-static inline struct quad_shade_stage *
-quad_shade_stage(struct quad_stage *qs)
-{
- return (struct quad_shade_stage *) qs;
-}
-
-
/**
* Execute fragment shader for the four fragments in the quad.
* \return TRUE if quad is alive, FALSE if all four pixels are killed
diff --git a/lib/mesa/src/gallium/drivers/softpipe/sp_screen.c b/lib/mesa/src/gallium/drivers/softpipe/sp_screen.c
index 62449873c..5c96a14c8 100644
--- a/lib/mesa/src/gallium/drivers/softpipe/sp_screen.c
+++ b/lib/mesa/src/gallium/drivers/softpipe/sp_screen.c
@@ -156,14 +156,18 @@ softpipe_get_param(struct pipe_screen *screen, enum pipe_cap param)
case PIPE_CAP_GLSL_FEATURE_LEVEL:
return 330;
case PIPE_CAP_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION:
+ case PIPE_CAP_TGSI_TEX_TXF_LZ:
return 0;
case PIPE_CAP_COMPUTE:
return 1;
case PIPE_CAP_USER_VERTEX_BUFFERS:
- case PIPE_CAP_USER_INDEX_BUFFERS:
case PIPE_CAP_USER_CONSTANT_BUFFERS:
case PIPE_CAP_STREAM_OUTPUT_PAUSE_RESUME:
+ case PIPE_CAP_STREAM_OUTPUT_INTERLEAVE_BUFFERS:
case PIPE_CAP_TGSI_VS_LAYER_VIEWPORT:
+ case PIPE_CAP_DOUBLES:
+ case PIPE_CAP_INT64:
+ case PIPE_CAP_INT64_DIVMOD:
return 1;
case PIPE_CAP_CONSTANT_BUFFER_OFFSET_ALIGNMENT:
return 16;
@@ -256,6 +260,8 @@ softpipe_get_param(struct pipe_screen *screen, enum pipe_cap param)
case PIPE_CAP_COPY_BETWEEN_COMPRESSED_AND_PLAIN_FORMATS:
case PIPE_CAP_TGSI_ARRAY_COMPONENTS:
return 1;
+ case PIPE_CAP_CLEAR_TEXTURE:
+ return 1;
case PIPE_CAP_MULTISAMPLE_Z_RESOLVE:
case PIPE_CAP_RESOURCE_FROM_USER_MEMORY:
case PIPE_CAP_DEVICE_RESET_STATUS_QUERY:
@@ -264,7 +270,6 @@ softpipe_get_param(struct pipe_screen *screen, enum pipe_cap param)
case PIPE_CAP_TGSI_TXQS:
case PIPE_CAP_FORCE_PERSAMPLE_INTERP:
case PIPE_CAP_SHAREABLE_SHADERS:
- case PIPE_CAP_CLEAR_TEXTURE:
case PIPE_CAP_DRAW_PARAMETERS:
case PIPE_CAP_TGSI_PACK_HALF_FLOAT:
case PIPE_CAP_MULTI_DRAW_INDIRECT:
@@ -287,6 +292,20 @@ softpipe_get_param(struct pipe_screen *screen, enum pipe_cap param)
case PIPE_CAP_MAX_WINDOW_RECTANGLES:
case PIPE_CAP_POLYGON_OFFSET_UNITS_UNSCALED:
case PIPE_CAP_VIEWPORT_SUBPIXEL_BITS:
+ case PIPE_CAP_TGSI_CAN_READ_OUTPUTS:
+ case PIPE_CAP_NATIVE_FENCE_FD:
+ case PIPE_CAP_GLSL_OPTIMIZE_CONSERVATIVELY:
+ case PIPE_CAP_TGSI_FS_FBFETCH:
+ case PIPE_CAP_TGSI_MUL_ZERO_WINS:
+ case PIPE_CAP_TGSI_CLOCK:
+ case PIPE_CAP_POLYGON_MODE_FILL_RECTANGLE:
+ case PIPE_CAP_SPARSE_BUFFER_PAGE_SIZE:
+ case PIPE_CAP_TGSI_BALLOT:
+ case PIPE_CAP_TGSI_TES_LAYER_VIEWPORT:
+ case PIPE_CAP_CAN_BIND_CONST_BUFFER_AS_VERTEX:
+ case PIPE_CAP_ALLOW_MAPPED_BUFFERS_DURING_EXECUTION:
+ case PIPE_CAP_POST_DEPTH_COVERAGE:
+ case PIPE_CAP_BINDLESS_TEXTURE:
return 0;
case PIPE_CAP_SHADER_BUFFER_OFFSET_ALIGNMENT:
return 4;
@@ -297,7 +316,9 @@ softpipe_get_param(struct pipe_screen *screen, enum pipe_cap param)
}
static int
-softpipe_get_shader_param(struct pipe_screen *screen, unsigned shader, enum pipe_shader_cap param)
+softpipe_get_shader_param(struct pipe_screen *screen,
+ enum pipe_shader_type shader,
+ enum pipe_shader_cap param)
{
struct softpipe_screen *sp_screen = softpipe_screen(screen);
switch(shader)
diff --git a/lib/mesa/src/gallium/drivers/softpipe/sp_state_derived.c b/lib/mesa/src/gallium/drivers/softpipe/sp_state_derived.c
index 0083e3327..f34997ab3 100644
--- a/lib/mesa/src/gallium/drivers/softpipe/sp_state_derived.c
+++ b/lib/mesa/src/gallium/drivers/softpipe/sp_state_derived.c
@@ -282,7 +282,7 @@ compute_cliprect(struct softpipe_context *sp)
static void
set_shader_sampler(struct softpipe_context *softpipe,
- unsigned shader,
+ enum pipe_shader_type shader,
int max_sampler)
{
int i;
diff --git a/lib/mesa/src/gallium/drivers/softpipe/sp_state_sampler.c b/lib/mesa/src/gallium/drivers/softpipe/sp_state_sampler.c
index a4185c2b6..c10fd918f 100644
--- a/lib/mesa/src/gallium/drivers/softpipe/sp_state_sampler.c
+++ b/lib/mesa/src/gallium/drivers/softpipe/sp_state_sampler.c
@@ -167,7 +167,7 @@ prepare_shader_sampling(
struct softpipe_context *sp,
unsigned num,
struct pipe_sampler_view **views,
- unsigned shader_type,
+ enum pipe_shader_type shader_type,
struct pipe_resource *mapped_tex[PIPE_MAX_SHADER_SAMPLER_VIEWS])
{
diff --git a/lib/mesa/src/gallium/drivers/softpipe/sp_state_shader.c b/lib/mesa/src/gallium/drivers/softpipe/sp_state_shader.c
index a7456628d..da4792757 100644
--- a/lib/mesa/src/gallium/drivers/softpipe/sp_state_shader.c
+++ b/lib/mesa/src/gallium/drivers/softpipe/sp_state_shader.c
@@ -337,7 +337,7 @@ softpipe_delete_gs_state(struct pipe_context *pipe, void *gs)
static void
softpipe_set_constant_buffer(struct pipe_context *pipe,
- uint shader, uint index,
+ enum pipe_shader_type shader, uint index,
const struct pipe_constant_buffer *cb)
{
struct softpipe_context *softpipe = softpipe_context(pipe);
@@ -420,7 +420,7 @@ static void
softpipe_delete_compute_state(struct pipe_context *pipe,
void *cs)
{
- struct softpipe_context *softpipe = softpipe_context(pipe);
+ MAYBE_UNUSED struct softpipe_context *softpipe = softpipe_context(pipe);
struct sp_compute_shader *state = (struct sp_compute_shader *)cs;
assert(softpipe->cs != state);
diff --git a/lib/mesa/src/gallium/drivers/softpipe/sp_tex_sample.c b/lib/mesa/src/gallium/drivers/softpipe/sp_tex_sample.c
index c457f896e..92c78da86 100644
--- a/lib/mesa/src/gallium/drivers/softpipe/sp_tex_sample.c
+++ b/lib/mesa/src/gallium/drivers/softpipe/sp_tex_sample.c
@@ -796,23 +796,6 @@ get_texel_quad_2d_no_border(const struct sp_sampler_view *sp_sview,
out[3] = get_texel_2d_no_border( sp_sview, addr, x1, y1 );
}
-/* Can involve a lot of unnecessary checks for border color:
- */
-static inline void
-get_texel_quad_2d(const struct sp_sampler_view *sp_sview,
- const struct sp_sampler *sp_samp,
- union tex_tile_address addr,
- int x0, int y0,
- int x1, int y1,
- const float *out[4])
-{
- out[0] = get_texel_2d( sp_sview, sp_samp, addr, x0, y0 );
- out[1] = get_texel_2d( sp_sview, sp_samp, addr, x1, y0 );
- out[3] = get_texel_2d( sp_sview, sp_samp, addr, x1, y1 );
- out[2] = get_texel_2d( sp_sview, sp_samp, addr, x0, y1 );
-}
-
-
/* 3d variants:
*/
@@ -3443,7 +3426,8 @@ softpipe_create_sampler_state(struct pipe_context *pipe,
compute_lambda_func
-softpipe_get_lambda_func(const struct pipe_sampler_view *view, unsigned shader)
+softpipe_get_lambda_func(const struct pipe_sampler_view *view,
+ enum pipe_shader_type shader)
{
if (shader != PIPE_SHADER_FRAGMENT)
return compute_lambda_vert;
diff --git a/lib/mesa/src/gallium/drivers/softpipe/sp_tex_sample.h b/lib/mesa/src/gallium/drivers/softpipe/sp_tex_sample.h
index d591487d1..f7774f5e8 100644
--- a/lib/mesa/src/gallium/drivers/softpipe/sp_tex_sample.h
+++ b/lib/mesa/src/gallium/drivers/softpipe/sp_tex_sample.h
@@ -155,7 +155,8 @@ struct sp_tgsi_sampler
};
compute_lambda_func
-softpipe_get_lambda_func(const struct pipe_sampler_view *view, unsigned shader);
+softpipe_get_lambda_func(const struct pipe_sampler_view *view,
+ enum pipe_shader_type shader);
void *
diff --git a/lib/mesa/src/gallium/drivers/softpipe/sp_texture.c b/lib/mesa/src/gallium/drivers/softpipe/sp_texture.c
index 8dca15860..ea5e2c64b 100644
--- a/lib/mesa/src/gallium/drivers/softpipe/sp_texture.c
+++ b/lib/mesa/src/gallium/drivers/softpipe/sp_texture.c
@@ -37,6 +37,7 @@
#include "util/u_math.h"
#include "util/u_memory.h"
#include "util/u_transfer.h"
+#include "util/u_surface.h"
#include "sp_context.h"
#include "sp_flush.h"
@@ -520,6 +521,7 @@ softpipe_init_texture_funcs(struct pipe_context *pipe)
pipe->create_surface = softpipe_create_surface;
pipe->surface_destroy = softpipe_surface_destroy;
+ pipe->clear_texture = util_clear_texture;
}