summaryrefslogtreecommitdiff
path: root/lib/mesa/src/gallium/drivers/llvmpipe
diff options
context:
space:
mode:
authorJonathan Gray <jsg@cvs.openbsd.org>2020-08-26 06:03:18 +0000
committerJonathan Gray <jsg@cvs.openbsd.org>2020-08-26 06:03:18 +0000
commitaf5e8f5366b05c3d4f8521f318c143a5c5dc3ea9 (patch)
treec5691445908b1beca9facf0e5e3c5d7f35f74228 /lib/mesa/src/gallium/drivers/llvmpipe
parent27c93456b58343162f7c4ad20ca6bea0c9a91646 (diff)
Merge Mesa 20.1.6
Diffstat (limited to 'lib/mesa/src/gallium/drivers/llvmpipe')
-rw-r--r--lib/mesa/src/gallium/drivers/llvmpipe/Automake.inc7
-rw-r--r--lib/mesa/src/gallium/drivers/llvmpipe/Makefile.am80
-rw-r--r--lib/mesa/src/gallium/drivers/llvmpipe/Makefile.in1237
-rw-r--r--lib/mesa/src/gallium/drivers/llvmpipe/SConscript3
-rw-r--r--lib/mesa/src/gallium/drivers/llvmpipe/lp_bld_blend_aos.c2
-rw-r--r--lib/mesa/src/gallium/drivers/llvmpipe/lp_bld_depth.c12
-rw-r--r--lib/mesa/src/gallium/drivers/llvmpipe/lp_context.c38
-rw-r--r--lib/mesa/src/gallium/drivers/llvmpipe/lp_context.h25
-rw-r--r--lib/mesa/src/gallium/drivers/llvmpipe/lp_draw_arrays.c23
-rw-r--r--lib/mesa/src/gallium/drivers/llvmpipe/lp_jit.c332
-rw-r--r--lib/mesa/src/gallium/drivers/llvmpipe/lp_rast.c19
-rw-r--r--lib/mesa/src/gallium/drivers/llvmpipe/lp_rast_priv.h2
-rw-r--r--lib/mesa/src/gallium/drivers/llvmpipe/lp_scene.c2
-rw-r--r--lib/mesa/src/gallium/drivers/llvmpipe/lp_screen.c258
-rw-r--r--lib/mesa/src/gallium/drivers/llvmpipe/lp_screen.h7
-rw-r--r--lib/mesa/src/gallium/drivers/llvmpipe/lp_setup.c96
-rw-r--r--lib/mesa/src/gallium/drivers/llvmpipe/lp_setup_context.h5
-rw-r--r--lib/mesa/src/gallium/drivers/llvmpipe/lp_setup_line.c28
-rw-r--r--lib/mesa/src/gallium/drivers/llvmpipe/lp_setup_point.c39
-rw-r--r--lib/mesa/src/gallium/drivers/llvmpipe/lp_setup_tri.c12
-rw-r--r--lib/mesa/src/gallium/drivers/llvmpipe/lp_state_derived.c7
-rw-r--r--lib/mesa/src/gallium/drivers/llvmpipe/lp_state_fs.c189
-rw-r--r--lib/mesa/src/gallium/drivers/llvmpipe/lp_state_sampler.c173
-rw-r--r--lib/mesa/src/gallium/drivers/llvmpipe/lp_surface.c2
24 files changed, 1032 insertions, 1566 deletions
diff --git a/lib/mesa/src/gallium/drivers/llvmpipe/Automake.inc b/lib/mesa/src/gallium/drivers/llvmpipe/Automake.inc
deleted file mode 100644
index 0a0aa34e7..000000000
--- a/lib/mesa/src/gallium/drivers/llvmpipe/Automake.inc
+++ /dev/null
@@ -1,7 +0,0 @@
-if HAVE_GALLIUM_LLVMPIPE
-
-TARGET_CPPFLAGS += -DGALLIUM_LLVMPIPE
-TARGET_LIB_DEPS += \
- $(top_builddir)/src/gallium/drivers/llvmpipe/libllvmpipe.la
-
-endif
diff --git a/lib/mesa/src/gallium/drivers/llvmpipe/Makefile.am b/lib/mesa/src/gallium/drivers/llvmpipe/Makefile.am
deleted file mode 100644
index d649fa44b..000000000
--- a/lib/mesa/src/gallium/drivers/llvmpipe/Makefile.am
+++ /dev/null
@@ -1,80 +0,0 @@
-# Copyright © 2012 Intel Corporation
-#
-# Permission is hereby granted, free of charge, to any person obtaining a
-# copy of this software and associated documentation files (the "Software"),
-# to deal in the Software without restriction, including without limitation
-# the rights to use, copy, modify, merge, publish, distribute, sublicense,
-# and/or sell copies of the Software, and to permit persons to whom the
-# Software is furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice (including the next
-# paragraph) shall be included in all copies or substantial portions of the
-# Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
-# HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
-# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
-# DEALINGS IN THE SOFTWARE.
-
-include Makefile.sources
-include $(top_srcdir)/src/gallium/Automake.inc
-
-AM_CFLAGS = \
- $(GALLIUM_DRIVER_CFLAGS) \
- $(LLVM_CFLAGS) \
- $(MSVC2013_COMPAT_CFLAGS)
-AM_CXXFLAGS= \
- $(GALLIUM_DRIVER_CXXFLAGS) \
- $(LLVM_CXXFLAGS) \
- $(MSVC2013_COMPAT_CXXFLAGS)
-
-noinst_LTLIBRARIES = libllvmpipe.la
-
-libllvmpipe_la_SOURCES = $(C_SOURCES)
-
-libllvmpipe_la_LDFLAGS = $(LLVM_LDFLAGS)
-
-noinst_HEADERS = lp_test.h
-
-check_PROGRAMS = \
- lp_test_format \
- lp_test_arit \
- lp_test_blend \
- lp_test_conv \
- lp_test_printf
-TESTS = $(check_PROGRAMS)
-
-TEST_LIBS = \
- libllvmpipe.la \
- $(top_builddir)/src/gallium/auxiliary/libgallium.la \
- $(top_builddir)/src/util/libmesautil.la \
- $(LLVM_LIBS) \
- $(DLOPEN_LIBS) \
- $(PTHREAD_LIBS) \
- $(CLOCK_LIB)
-
-lp_test_format_SOURCES = lp_test_format.c lp_test_main.c
-lp_test_format_LDADD = $(TEST_LIBS)
-nodist_EXTRA_lp_test_format_SOURCES = dummy.cpp
-
-lp_test_arit_SOURCES = lp_test_arit.c lp_test_main.c
-lp_test_arit_LDADD = $(TEST_LIBS)
-nodist_EXTRA_lp_test_arit_SOURCES = dummy.cpp
-
-lp_test_blend_SOURCES = lp_test_blend.c lp_test_main.c
-lp_test_blend_LDADD = $(TEST_LIBS)
-nodist_EXTRA_lp_test_blend_SOURCES = dummy.cpp
-
-lp_test_conv_SOURCES = lp_test_conv.c lp_test_main.c
-lp_test_conv_LDADD = $(TEST_LIBS)
-nodist_EXTRA_lp_test_conv_SOURCES = dummy.cpp
-
-lp_test_printf_SOURCES = lp_test_printf.c lp_test_main.c
-lp_test_printf_LDADD = $(TEST_LIBS)
-nodist_EXTRA_lp_test_printf_SOURCES = dummy.cpp
-
-EXTRA_DIST = SConscript meson.build
diff --git a/lib/mesa/src/gallium/drivers/llvmpipe/Makefile.in b/lib/mesa/src/gallium/drivers/llvmpipe/Makefile.in
deleted file mode 100644
index 7ba50e44b..000000000
--- a/lib/mesa/src/gallium/drivers/llvmpipe/Makefile.in
+++ /dev/null
@@ -1,1237 +0,0 @@
-# Makefile.in generated by automake 1.12.6 from Makefile.am.
-# @configure_input@
-
-# Copyright (C) 1994-2012 Free Software Foundation, Inc.
-
-# This Makefile.in is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
-@SET_MAKE@
-
-# Copyright © 2012 Intel Corporation
-#
-# Permission is hereby granted, free of charge, to any person obtaining a
-# copy of this software and associated documentation files (the "Software"),
-# to deal in the Software without restriction, including without limitation
-# the rights to use, copy, modify, merge, publish, distribute, sublicense,
-# and/or sell copies of the Software, and to permit persons to whom the
-# Software is furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice (including the next
-# paragraph) shall be included in all copies or substantial portions of the
-# Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
-# HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
-# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
-# DEALINGS IN THE SOFTWARE.
-
-
-VPATH = @srcdir@
-am__make_dryrun = \
- { \
- am__dry=no; \
- case $$MAKEFLAGS in \
- *\\[\ \ ]*) \
- echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \
- | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
- *) \
- for am__flg in $$MAKEFLAGS; do \
- case $$am__flg in \
- *=*|--*) ;; \
- *n*) am__dry=yes; break;; \
- esac; \
- done;; \
- esac; \
- test $$am__dry = yes; \
- }
-pkgdatadir = $(datadir)/@PACKAGE@
-pkgincludedir = $(includedir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
-pkglibexecdir = $(libexecdir)/@PACKAGE@
-am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-install_sh_DATA = $(install_sh) -c -m 644
-install_sh_PROGRAM = $(install_sh) -c
-install_sh_SCRIPT = $(install_sh) -c
-INSTALL_HEADER = $(INSTALL_DATA)
-transform = $(program_transform_name)
-NORMAL_INSTALL = :
-PRE_INSTALL = :
-POST_INSTALL = :
-NORMAL_UNINSTALL = :
-PRE_UNINSTALL = :
-POST_UNINSTALL = :
-build_triplet = @build@
-host_triplet = @host@
-target_triplet = @target@
-DIST_COMMON = $(noinst_HEADERS) $(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_PLATFORM_ANDROID_TRUE@am__append_2 = \
-@HAVE_PLATFORM_ANDROID_TRUE@ $(ANDROID_LIBS) \
-@HAVE_PLATFORM_ANDROID_TRUE@ $(BACKTRACE_LIBS)
-
-@HAVE_DRISW_TRUE@am__append_3 = \
-@HAVE_DRISW_TRUE@ $(top_builddir)/src/gallium/winsys/sw/dri/libswdri.la
-
-@HAVE_DRISW_KMS_TRUE@am__append_4 = \
-@HAVE_DRISW_KMS_TRUE@ $(top_builddir)/src/gallium/winsys/sw/kms-dri/libswkmsdri.la \
-@HAVE_DRISW_KMS_TRUE@ $(LIBDRM_LIBS)
-
-check_PROGRAMS = lp_test_format$(EXEEXT) lp_test_arit$(EXEEXT) \
- lp_test_blend$(EXEEXT) lp_test_conv$(EXEEXT) \
- lp_test_printf$(EXEEXT)
-subdir = src/gallium/drivers/llvmpipe
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/m4/ax_check_compile_flag.m4 \
- $(top_srcdir)/m4/ax_check_gnu_make.m4 \
- $(top_srcdir)/m4/ax_check_python_mako_module.m4 \
- $(top_srcdir)/m4/ax_gcc_builtin.m4 \
- $(top_srcdir)/m4/ax_gcc_func_attribute.m4 \
- $(top_srcdir)/m4/ax_prog_bison.m4 \
- $(top_srcdir)/m4/ax_prog_flex.m4 \
- $(top_srcdir)/m4/ax_pthread.m4 $(top_srcdir)/m4/libtool.m4 \
- $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
- $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
- $(top_srcdir)/VERSION $(top_srcdir)/configure.ac
-am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
- $(ACLOCAL_M4)
-mkinstalldirs = $(install_sh) -d
-CONFIG_CLEAN_FILES =
-CONFIG_CLEAN_VPATH_FILES =
-LTLIBRARIES = $(noinst_LTLIBRARIES)
-libllvmpipe_la_LIBADD =
-am__objects_1 = lp_bld_alpha.lo lp_bld_blend_aos.lo lp_bld_blend.lo \
- lp_bld_blend_logicop.lo lp_bld_depth.lo lp_bld_interp.lo \
- lp_clear.lo lp_context.lo lp_draw_arrays.lo lp_fence.lo \
- lp_flush.lo lp_jit.lo lp_memory.lo lp_perf.lo lp_query.lo \
- lp_rast.lo lp_rast_debug.lo lp_rast_tri.lo lp_scene.lo \
- lp_scene_queue.lo lp_screen.lo lp_setup.lo lp_setup_line.lo \
- lp_setup_point.lo lp_setup_tri.lo lp_setup_vbuf.lo \
- lp_state_blend.lo lp_state_clip.lo lp_state_derived.lo \
- lp_state_fs.lo lp_state_gs.lo lp_state_rasterizer.lo \
- lp_state_sampler.lo lp_state_setup.lo lp_state_so.lo \
- lp_state_surface.lo lp_state_vertex.lo lp_state_vs.lo \
- lp_surface.lo lp_tex_sample.lo lp_texture.lo
-am_libllvmpipe_la_OBJECTS = $(am__objects_1)
-libllvmpipe_la_OBJECTS = $(am_libllvmpipe_la_OBJECTS)
-AM_V_lt = $(am__v_lt_@AM_V@)
-am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
-am__v_lt_0 = --silent
-am__v_lt_1 =
-libllvmpipe_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
- $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
- $(AM_CFLAGS) $(CFLAGS) $(libllvmpipe_la_LDFLAGS) $(LDFLAGS) -o \
- $@
-am_lp_test_arit_OBJECTS = lp_test_arit.$(OBJEXT) \
- lp_test_main.$(OBJEXT)
-lp_test_arit_OBJECTS = $(am_lp_test_arit_OBJECTS)
-am__DEPENDENCIES_1 =
-am__DEPENDENCIES_2 = libllvmpipe.la \
- $(top_builddir)/src/gallium/auxiliary/libgallium.la \
- $(top_builddir)/src/util/libmesautil.la $(am__DEPENDENCIES_1) \
- $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
- $(am__DEPENDENCIES_1)
-lp_test_arit_DEPENDENCIES = $(am__DEPENDENCIES_2)
-am_lp_test_blend_OBJECTS = lp_test_blend.$(OBJEXT) \
- lp_test_main.$(OBJEXT)
-lp_test_blend_OBJECTS = $(am_lp_test_blend_OBJECTS)
-lp_test_blend_DEPENDENCIES = $(am__DEPENDENCIES_2)
-am_lp_test_conv_OBJECTS = lp_test_conv.$(OBJEXT) \
- lp_test_main.$(OBJEXT)
-lp_test_conv_OBJECTS = $(am_lp_test_conv_OBJECTS)
-lp_test_conv_DEPENDENCIES = $(am__DEPENDENCIES_2)
-am_lp_test_format_OBJECTS = lp_test_format.$(OBJEXT) \
- lp_test_main.$(OBJEXT)
-lp_test_format_OBJECTS = $(am_lp_test_format_OBJECTS)
-lp_test_format_DEPENDENCIES = $(am__DEPENDENCIES_2)
-am_lp_test_printf_OBJECTS = lp_test_printf.$(OBJEXT) \
- lp_test_main.$(OBJEXT)
-lp_test_printf_OBJECTS = $(am_lp_test_printf_OBJECTS)
-lp_test_printf_DEPENDENCIES = $(am__DEPENDENCIES_2)
-AM_V_P = $(am__v_P_@AM_V@)
-am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
-am__v_P_0 = false
-am__v_P_1 = :
-AM_V_GEN = $(am__v_GEN_@AM_V@)
-am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
-am__v_GEN_0 = @echo " GEN " $@;
-am__v_GEN_1 =
-AM_V_at = $(am__v_at_@AM_V@)
-am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
-am__v_at_0 = @
-am__v_at_1 =
-DEFAULT_INCLUDES = -I.@am__isrc@
-depcomp = $(SHELL) $(top_srcdir)/bin/depcomp
-am__depfiles_maybe = depfiles
-am__mv = mv -f
-COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
- $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
- $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
- $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
- $(AM_CFLAGS) $(CFLAGS)
-AM_V_CC = $(am__v_CC_@AM_V@)
-am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
-am__v_CC_0 = @echo " CC " $@;
-am__v_CC_1 =
-CCLD = $(CC)
-LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
- $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
- $(AM_LDFLAGS) $(LDFLAGS) -o $@
-AM_V_CCLD = $(am__v_CCLD_@AM_V@)
-am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
-am__v_CCLD_0 = @echo " CCLD " $@;
-am__v_CCLD_1 =
-CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
- $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
-LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
- $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \
- $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
- $(AM_CXXFLAGS) $(CXXFLAGS)
-AM_V_CXX = $(am__v_CXX_@AM_V@)
-am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@)
-am__v_CXX_0 = @echo " CXX " $@;
-am__v_CXX_1 =
-CXXLD = $(CXX)
-CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
- $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \
- $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
-AM_V_CXXLD = $(am__v_CXXLD_@AM_V@)
-am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@)
-am__v_CXXLD_0 = @echo " CXXLD " $@;
-am__v_CXXLD_1 =
-SOURCES = $(libllvmpipe_la_SOURCES) $(lp_test_arit_SOURCES) \
- $(nodist_EXTRA_lp_test_arit_SOURCES) $(lp_test_blend_SOURCES) \
- $(nodist_EXTRA_lp_test_blend_SOURCES) $(lp_test_conv_SOURCES) \
- $(nodist_EXTRA_lp_test_conv_SOURCES) $(lp_test_format_SOURCES) \
- $(nodist_EXTRA_lp_test_format_SOURCES) \
- $(lp_test_printf_SOURCES) \
- $(nodist_EXTRA_lp_test_printf_SOURCES)
-DIST_SOURCES = $(libllvmpipe_la_SOURCES) $(lp_test_arit_SOURCES) \
- $(lp_test_blend_SOURCES) $(lp_test_conv_SOURCES) \
- $(lp_test_format_SOURCES) $(lp_test_printf_SOURCES)
-am__can_run_installinfo = \
- case $$AM_UPDATE_INFO_DIR in \
- n|no|NO) false;; \
- *) (install-info --version) >/dev/null 2>&1;; \
- esac
-HEADERS = $(noinst_HEADERS)
-ETAGS = etags
-CTAGS = ctags
-am__tty_colors_dummy = \
- mgn= red= grn= lgn= blu= brg= std=; \
- am__color_tests=no
-am__tty_colors = $(am__tty_colors_dummy)
-DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
-ACLOCAL = @ACLOCAL@
-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@
-AUTOMAKE = @AUTOMAKE@
-AWK = @AWK@
-BACKTRACE_CFLAGS = @BACKTRACE_CFLAGS@
-BACKTRACE_LIBS = @BACKTRACE_LIBS@
-BSYMBOLIC = @BSYMBOLIC@
-CC = @CC@
-CCAS = @CCAS@
-CCASDEPMODE = @CCASDEPMODE@
-CCASFLAGS = @CCASFLAGS@
-CCDEPMODE = @CCDEPMODE@
-CFLAGS = @CFLAGS@
-CLANG_RESOURCE_DIR = @CLANG_RESOURCE_DIR@
-CLOCK_LIB = @CLOCK_LIB@
-CLOVER_STD_OVERRIDE = @CLOVER_STD_OVERRIDE@
-CPP = @CPP@
-CPPFLAGS = @CPPFLAGS@
-CXX = @CXX@
-CXX11_CXXFLAGS = @CXX11_CXXFLAGS@
-CXXCPP = @CXXCPP@
-CXXDEPMODE = @CXXDEPMODE@
-CXXFLAGS = @CXXFLAGS@
-CYGPATH_W = @CYGPATH_W@
-D3D_DRIVER_INSTALL_DIR = @D3D_DRIVER_INSTALL_DIR@
-DEFINES = @DEFINES@
-DEFS = @DEFS@
-DEPDIR = @DEPDIR@
-DLLTOOL = @DLLTOOL@
-DLOPEN_LIBS = @DLOPEN_LIBS@
-DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@
-DRI2PROTO_LIBS = @DRI2PROTO_LIBS@
-DRIGL_CFLAGS = @DRIGL_CFLAGS@
-DRIGL_LIBS = @DRIGL_LIBS@
-DRI_DRIVER_INSTALL_DIR = @DRI_DRIVER_INSTALL_DIR@
-DRI_DRIVER_SEARCH_DIR = @DRI_DRIVER_SEARCH_DIR@
-DRI_LIB_DEPS = @DRI_LIB_DEPS@
-DRI_PC_REQ_PRIV = @DRI_PC_REQ_PRIV@
-DSYMUTIL = @DSYMUTIL@
-DUMPBIN = @DUMPBIN@
-ECHO_C = @ECHO_C@
-ECHO_N = @ECHO_N@
-ECHO_T = @ECHO_T@
-EGL_CFLAGS = @EGL_CFLAGS@
-EGL_LIB_DEPS = @EGL_LIB_DEPS@
-EGL_LIB_SUFFIX = @EGL_LIB_SUFFIX@
-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@
-FGREP = @FGREP@
-GALLIUM_PIPE_LOADER_DEFINES = @GALLIUM_PIPE_LOADER_DEFINES@
-GBM_PC_LIB_PRIV = @GBM_PC_LIB_PRIV@
-GBM_PC_REQ_PRIV = @GBM_PC_REQ_PRIV@
-GC_SECTIONS = @GC_SECTIONS@
-GLES_LIB_SUFFIX = @GLES_LIB_SUFFIX@
-GLESv1_CM_LIB_DEPS = @GLESv1_CM_LIB_DEPS@
-GLESv1_CM_PC_LIB_PRIV = @GLESv1_CM_PC_LIB_PRIV@
-GLESv2_LIB_DEPS = @GLESv2_LIB_DEPS@
-GLESv2_PC_LIB_PRIV = @GLESv2_PC_LIB_PRIV@
-GLPROTO_CFLAGS = @GLPROTO_CFLAGS@
-GLPROTO_LIBS = @GLPROTO_LIBS@
-GLVND_CFLAGS = @GLVND_CFLAGS@
-GLVND_LIBS = @GLVND_LIBS@
-GLX_TLS = @GLX_TLS@
-GL_LIB = @GL_LIB@
-GL_LIB_DEPS = @GL_LIB_DEPS@
-GL_PC_CFLAGS = @GL_PC_CFLAGS@
-GL_PC_LIB_PRIV = @GL_PC_LIB_PRIV@
-GL_PC_REQ_PRIV = @GL_PC_REQ_PRIV@
-GL_PKGCONF_LIB = @GL_PKGCONF_LIB@
-GREP = @GREP@
-I915_CFLAGS = @I915_CFLAGS@
-I915_LIBS = @I915_LIBS@
-INDENT = @INDENT@
-INDENT_FLAGS = @INDENT_FLAGS@
-INSTALL = @INSTALL@
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
-INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-LD = @LD@
-LDFLAGS = @LDFLAGS@
-LD_BUILD_ID = @LD_BUILD_ID@
-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_LIBS = @LIBSENSORS_LIBS@
-LIBTOOL = @LIBTOOL@
-LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@
-LIBUNWIND_LIBS = @LIBUNWIND_LIBS@
-LIB_DIR = @LIB_DIR@
-LIB_EXT = @LIB_EXT@
-LIPO = @LIPO@
-LLVM_CFLAGS = @LLVM_CFLAGS@
-LLVM_CONFIG = @LLVM_CONFIG@
-LLVM_CXXFLAGS = @LLVM_CXXFLAGS@
-LLVM_INCLUDEDIR = @LLVM_INCLUDEDIR@
-LLVM_LDFLAGS = @LLVM_LDFLAGS@
-LLVM_LIBS = @LLVM_LIBS@
-LN_S = @LN_S@
-LTLIBOBJS = @LTLIBOBJS@
-MAINT = @MAINT@
-MAKEINFO = @MAKEINFO@
-MANIFEST_TOOL = @MANIFEST_TOOL@
-MKDIR_P = @MKDIR_P@
-MSVC2013_COMPAT_CFLAGS = @MSVC2013_COMPAT_CFLAGS@
-MSVC2013_COMPAT_CXXFLAGS = @MSVC2013_COMPAT_CXXFLAGS@
-NINE_MAJOR = @NINE_MAJOR@
-NINE_MINOR = @NINE_MINOR@
-NINE_PATCH = @NINE_PATCH@
-NINE_VERSION = @NINE_VERSION@
-NM = @NM@
-NMEDIT = @NMEDIT@
-NOUVEAU_CFLAGS = @NOUVEAU_CFLAGS@
-NOUVEAU_LIBS = @NOUVEAU_LIBS@
-NVVIEUX_CFLAGS = @NVVIEUX_CFLAGS@
-NVVIEUX_LIBS = @NVVIEUX_LIBS@
-OBJDUMP = @OBJDUMP@
-OBJEXT = @OBJEXT@
-OMX_BELLAGIO_CFLAGS = @OMX_BELLAGIO_CFLAGS@
-OMX_BELLAGIO_LIBS = @OMX_BELLAGIO_LIBS@
-OMX_BELLAGIO_LIB_INSTALL_DIR = @OMX_BELLAGIO_LIB_INSTALL_DIR@
-OMX_TIZONIA_CFLAGS = @OMX_TIZONIA_CFLAGS@
-OMX_TIZONIA_LIBS = @OMX_TIZONIA_LIBS@
-OMX_TIZONIA_LIB_INSTALL_DIR = @OMX_TIZONIA_LIB_INSTALL_DIR@
-OPENCL_LIBNAME = @OPENCL_LIBNAME@
-OPENCL_VERSION = @OPENCL_VERSION@
-OSMESA_LIB = @OSMESA_LIB@
-OSMESA_LIB_DEPS = @OSMESA_LIB_DEPS@
-OSMESA_PC_LIB_PRIV = @OSMESA_PC_LIB_PRIV@
-OSMESA_PC_REQ = @OSMESA_PC_REQ@
-OSMESA_VERSION = @OSMESA_VERSION@
-OTOOL = @OTOOL@
-OTOOL64 = @OTOOL64@
-PACKAGE = @PACKAGE@
-PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
-PACKAGE_NAME = @PACKAGE_NAME@
-PACKAGE_STRING = @PACKAGE_STRING@
-PACKAGE_TARNAME = @PACKAGE_TARNAME@
-PACKAGE_URL = @PACKAGE_URL@
-PACKAGE_VERSION = @PACKAGE_VERSION@
-PATH_SEPARATOR = @PATH_SEPARATOR@
-PKG_CONFIG = @PKG_CONFIG@
-PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
-PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
-POSIX_SHELL = @POSIX_SHELL@
-PTHREADSTUBS_CFLAGS = @PTHREADSTUBS_CFLAGS@
-PTHREADSTUBS_LIBS = @PTHREADSTUBS_LIBS@
-PTHREAD_CC = @PTHREAD_CC@
-PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
-PTHREAD_LIBS = @PTHREAD_LIBS@
-PWR8_CFLAGS = @PWR8_CFLAGS@
-PYTHON = @PYTHON@
-PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@
-PYTHON_PLATFORM = @PYTHON_PLATFORM@
-PYTHON_PREFIX = @PYTHON_PREFIX@
-PYTHON_VERSION = @PYTHON_VERSION@
-RADEON_CFLAGS = @RADEON_CFLAGS@
-RADEON_LIBS = @RADEON_LIBS@
-RANLIB = @RANLIB@
-RM = @RM@
-SCANNER_ARG = @SCANNER_ARG@
-SED = @SED@
-SELINUX_CFLAGS = @SELINUX_CFLAGS@
-SELINUX_LIBS = @SELINUX_LIBS@
-SET_MAKE = @SET_MAKE@
-SHELL = @SHELL@
-SIMPENROSE_CFLAGS = @SIMPENROSE_CFLAGS@
-SIMPENROSE_LIBS = @SIMPENROSE_LIBS@
-SSE41_CFLAGS = @SSE41_CFLAGS@
-STRIP = @STRIP@
-SWR_AVX2_CXXFLAGS = @SWR_AVX2_CXXFLAGS@
-SWR_AVX_CXXFLAGS = @SWR_AVX_CXXFLAGS@
-SWR_KNL_CXXFLAGS = @SWR_KNL_CXXFLAGS@
-SWR_SKX_CXXFLAGS = @SWR_SKX_CXXFLAGS@
-V3D_SIMULATOR_CFLAGS = @V3D_SIMULATOR_CFLAGS@
-V3D_SIMULATOR_LIBS = @V3D_SIMULATOR_LIBS@
-VALGRIND_CFLAGS = @VALGRIND_CFLAGS@
-VALGRIND_LIBS = @VALGRIND_LIBS@
-VA_CFLAGS = @VA_CFLAGS@
-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@
-VISIBILITY_CFLAGS = @VISIBILITY_CFLAGS@
-VISIBILITY_CXXFLAGS = @VISIBILITY_CXXFLAGS@
-VL_CFLAGS = @VL_CFLAGS@
-VL_LIBS = @VL_LIBS@
-VULKAN_ICD_INSTALL_DIR = @VULKAN_ICD_INSTALL_DIR@
-WAYLAND_CLIENT_CFLAGS = @WAYLAND_CLIENT_CFLAGS@
-WAYLAND_CLIENT_LIBS = @WAYLAND_CLIENT_LIBS@
-WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@
-WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@
-WAYLAND_PROTOCOLS_CFLAGS = @WAYLAND_PROTOCOLS_CFLAGS@
-WAYLAND_PROTOCOLS_DATADIR = @WAYLAND_PROTOCOLS_DATADIR@
-WAYLAND_PROTOCOLS_LIBS = @WAYLAND_PROTOCOLS_LIBS@
-WAYLAND_SCANNER = @WAYLAND_SCANNER@
-WAYLAND_SCANNER_CFLAGS = @WAYLAND_SCANNER_CFLAGS@
-WAYLAND_SCANNER_LIBS = @WAYLAND_SCANNER_LIBS@
-WAYLAND_SERVER_CFLAGS = @WAYLAND_SERVER_CFLAGS@
-WAYLAND_SERVER_LIBS = @WAYLAND_SERVER_LIBS@
-WNO_OVERRIDE_INIT = @WNO_OVERRIDE_INIT@
-X11_INCLUDES = @X11_INCLUDES@
-XA_MAJOR = @XA_MAJOR@
-XA_MINOR = @XA_MINOR@
-XA_PATCH = @XA_PATCH@
-XA_VERSION = @XA_VERSION@
-XCB_DRI2_CFLAGS = @XCB_DRI2_CFLAGS@
-XCB_DRI2_LIBS = @XCB_DRI2_LIBS@
-XCB_DRI3_CFLAGS = @XCB_DRI3_CFLAGS@
-XCB_DRI3_LIBS = @XCB_DRI3_LIBS@
-XCB_DRI3_MODIFIERS_CFLAGS = @XCB_DRI3_MODIFIERS_CFLAGS@
-XCB_DRI3_MODIFIERS_LIBS = @XCB_DRI3_MODIFIERS_LIBS@
-XCB_RANDR_CFLAGS = @XCB_RANDR_CFLAGS@
-XCB_RANDR_LIBS = @XCB_RANDR_LIBS@
-XLIBGL_CFLAGS = @XLIBGL_CFLAGS@
-XLIBGL_LIBS = @XLIBGL_LIBS@
-XLIB_RANDR_CFLAGS = @XLIB_RANDR_CFLAGS@
-XLIB_RANDR_LIBS = @XLIB_RANDR_LIBS@
-XVMC_CFLAGS = @XVMC_CFLAGS@
-XVMC_LIBS = @XVMC_LIBS@
-XVMC_LIB_INSTALL_DIR = @XVMC_LIB_INSTALL_DIR@
-XVMC_MAJOR = @XVMC_MAJOR@
-XVMC_MINOR = @XVMC_MINOR@
-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@
-abs_top_srcdir = @abs_top_srcdir@
-ac_ct_AR = @ac_ct_AR@
-ac_ct_CC = @ac_ct_CC@
-ac_ct_CXX = @ac_ct_CXX@
-ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
-acv_mako_found = @acv_mako_found@
-am__include = @am__include@
-am__leading_dot = @am__leading_dot@
-am__quote = @am__quote@
-am__tar = @am__tar@
-am__untar = @am__untar@
-ax_pthread_config = @ax_pthread_config@
-bindir = @bindir@
-build = @build@
-build_alias = @build_alias@
-build_cpu = @build_cpu@
-build_os = @build_os@
-build_vendor = @build_vendor@
-builddir = @builddir@
-datadir = @datadir@
-datarootdir = @datarootdir@
-docdir = @docdir@
-dvidir = @dvidir@
-exec_prefix = @exec_prefix@
-host = @host@
-host_alias = @host_alias@
-host_cpu = @host_cpu@
-host_os = @host_os@
-host_vendor = @host_vendor@
-htmldir = @htmldir@
-ifGNUmake = @ifGNUmake@
-includedir = @includedir@
-infodir = @infodir@
-install_sh = @install_sh@
-libdir = @libdir@
-libexecdir = @libexecdir@
-localedir = @localedir@
-localstatedir = @localstatedir@
-mandir = @mandir@
-mkdir_p = @mkdir_p@
-oldincludedir = @oldincludedir@
-pdfdir = @pdfdir@
-pkgpyexecdir = @pkgpyexecdir@
-pkgpythondir = @pkgpythondir@
-prefix = @prefix@
-program_transform_name = @program_transform_name@
-psdir = @psdir@
-pyexecdir = @pyexecdir@
-pythondir = @pythondir@
-sbindir = @sbindir@
-sharedstatedir = @sharedstatedir@
-srcdir = @srcdir@
-sysconfdir = @sysconfdir@
-target = @target@
-target_alias = @target_alias@
-target_cpu = @target_cpu@
-target_os = @target_os@
-target_vendor = @target_vendor@
-top_build_prefix = @top_build_prefix@
-top_builddir = @top_builddir@
-top_srcdir = @top_srcdir@
-C_SOURCES := \
- lp_bld_alpha.c \
- lp_bld_alpha.h \
- lp_bld_blend_aos.c \
- lp_bld_blend.c \
- lp_bld_blend.h \
- lp_bld_blend_logicop.c \
- lp_bld_depth.c \
- lp_bld_depth.h \
- lp_bld_interp.c \
- lp_bld_interp.h \
- lp_clear.c \
- lp_clear.h \
- lp_context.c \
- lp_context.h \
- lp_debug.h \
- lp_draw_arrays.c \
- lp_fence.c \
- lp_fence.h \
- lp_flush.c \
- lp_flush.h \
- lp_jit.c \
- lp_jit.h \
- lp_limits.h \
- lp_memory.c \
- lp_memory.h \
- lp_perf.c \
- lp_perf.h \
- lp_public.h \
- lp_query.c \
- lp_query.h \
- lp_rast.c \
- lp_rast_debug.c \
- lp_rast.h \
- lp_rast_priv.h \
- lp_rast_tri.c \
- lp_rast_tri_tmp.h \
- lp_scene.c \
- lp_scene.h \
- lp_scene_queue.c \
- lp_scene_queue.h \
- lp_screen.c \
- lp_screen.h \
- lp_setup.c \
- lp_setup_context.h \
- lp_setup.h \
- lp_setup_line.c \
- lp_setup_point.c \
- lp_setup_tri.c \
- lp_setup_vbuf.c \
- lp_state_blend.c \
- lp_state_clip.c \
- lp_state_derived.c \
- lp_state_fs.c \
- lp_state_fs.h \
- lp_state_gs.c \
- lp_state.h \
- lp_state_rasterizer.c \
- lp_state_sampler.c \
- lp_state_setup.c \
- lp_state_setup.h \
- lp_state_so.c \
- lp_state_surface.c \
- lp_state_vertex.c \
- lp_state_vs.c \
- lp_surface.c \
- lp_surface.h \
- lp_tex_sample.c \
- lp_tex_sample.h \
- lp_texture.c \
- lp_texture.h
-
-GALLIUM_CFLAGS = \
- -I$(top_srcdir)/include \
- -I$(top_srcdir)/src \
- -I$(top_srcdir)/src/gallium/include \
- -I$(top_srcdir)/src/gallium/auxiliary \
- $(DEFINES)
-
-
-# src/gallium/auxiliary must appear before src/gallium/drivers
-# because there are stupidly two rbug_context.h files in
-# different directories, and which one is included by the
-# preprocessor is determined by the ordering of the -I flags.
-GALLIUM_DRIVER_CFLAGS = \
- -I$(srcdir)/include \
- -I$(top_srcdir)/src \
- -I$(top_srcdir)/include \
- -I$(top_srcdir)/src/gallium/include \
- -I$(top_srcdir)/src/gallium/auxiliary \
- -I$(top_srcdir)/src/gallium/drivers \
- -I$(top_srcdir)/src/gallium/winsys \
- $(DEFINES) \
- $(VISIBILITY_CFLAGS)
-
-GALLIUM_DRIVER_CXXFLAGS = \
- -I$(srcdir)/include \
- -I$(top_srcdir)/src \
- -I$(top_srcdir)/include \
- -I$(top_srcdir)/src/gallium/include \
- -I$(top_srcdir)/src/gallium/auxiliary \
- -I$(top_srcdir)/src/gallium/drivers \
- -I$(top_srcdir)/src/gallium/winsys \
- $(DEFINES) \
- $(VISIBILITY_CXXFLAGS)
-
-GALLIUM_TARGET_CFLAGS = \
- -I$(top_srcdir)/src \
- -I$(top_srcdir)/include \
- -I$(top_srcdir)/src/loader \
- -I$(top_srcdir)/src/gallium/include \
- -I$(top_srcdir)/src/gallium/auxiliary \
- -I$(top_srcdir)/src/gallium/drivers \
- -I$(top_srcdir)/src/gallium/winsys \
- -I$(top_builddir)/src/util/ \
- -I$(top_builddir)/src/gallium/drivers/ \
- $(DEFINES) \
- $(PTHREAD_CFLAGS) \
- $(LIBDRM_CFLAGS) \
- $(VISIBILITY_CFLAGS)
-
-GALLIUM_COMMON_LIB_DEPS = -lm $(LIBUNWIND_LIBS) $(LIBSENSORS_LIBS) \
- $(CLOCK_LIB) $(PTHREAD_LIBS) $(DLOPEN_LIBS) $(am__append_1) \
- $(am__append_2)
-GALLIUM_WINSYS_CFLAGS = \
- -I$(top_srcdir)/src \
- -I$(top_srcdir)/include \
- -I$(top_srcdir)/src/gallium/include \
- -I$(top_srcdir)/src/gallium/auxiliary \
- $(DEFINES) \
- $(VISIBILITY_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_3) $(am__append_4)
-AM_CFLAGS = \
- $(GALLIUM_DRIVER_CFLAGS) \
- $(LLVM_CFLAGS) \
- $(MSVC2013_COMPAT_CFLAGS)
-
-AM_CXXFLAGS = \
- $(GALLIUM_DRIVER_CXXFLAGS) \
- $(LLVM_CXXFLAGS) \
- $(MSVC2013_COMPAT_CXXFLAGS)
-
-noinst_LTLIBRARIES = libllvmpipe.la
-libllvmpipe_la_SOURCES = $(C_SOURCES)
-libllvmpipe_la_LDFLAGS = $(LLVM_LDFLAGS)
-noinst_HEADERS = lp_test.h
-TESTS = $(check_PROGRAMS)
-TEST_LIBS = \
- libllvmpipe.la \
- $(top_builddir)/src/gallium/auxiliary/libgallium.la \
- $(top_builddir)/src/util/libmesautil.la \
- $(LLVM_LIBS) \
- $(DLOPEN_LIBS) \
- $(PTHREAD_LIBS) \
- $(CLOCK_LIB)
-
-lp_test_format_SOURCES = lp_test_format.c lp_test_main.c
-lp_test_format_LDADD = $(TEST_LIBS)
-nodist_EXTRA_lp_test_format_SOURCES = dummy.cpp
-lp_test_arit_SOURCES = lp_test_arit.c lp_test_main.c
-lp_test_arit_LDADD = $(TEST_LIBS)
-nodist_EXTRA_lp_test_arit_SOURCES = dummy.cpp
-lp_test_blend_SOURCES = lp_test_blend.c lp_test_main.c
-lp_test_blend_LDADD = $(TEST_LIBS)
-nodist_EXTRA_lp_test_blend_SOURCES = dummy.cpp
-lp_test_conv_SOURCES = lp_test_conv.c lp_test_main.c
-lp_test_conv_LDADD = $(TEST_LIBS)
-nodist_EXTRA_lp_test_conv_SOURCES = dummy.cpp
-lp_test_printf_SOURCES = lp_test_printf.c lp_test_main.c
-lp_test_printf_LDADD = $(TEST_LIBS)
-nodist_EXTRA_lp_test_printf_SOURCES = dummy.cpp
-EXTRA_DIST = SConscript meson.build
-all: all-am
-
-.SUFFIXES:
-.SUFFIXES: .c .cpp .lo .o .obj
-$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(srcdir)/Makefile.sources $(top_srcdir)/src/gallium/Automake.inc $(am__configure_deps)
- @for dep in $?; do \
- case '$(am__configure_deps)' in \
- *$$dep*) \
- ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
- && { if test -f $@; then exit 0; else break; fi; }; \
- exit 1;; \
- esac; \
- done; \
- echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/gallium/drivers/llvmpipe/Makefile'; \
- $(am__cd) $(top_srcdir) && \
- $(AUTOMAKE) --foreign src/gallium/drivers/llvmpipe/Makefile
-.PRECIOUS: Makefile
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
- @case '$?' in \
- *config.status*) \
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
- *) \
- echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
- esac;
-$(srcdir)/Makefile.sources $(top_srcdir)/src/gallium/Automake.inc:
-
-$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-
-$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(am__aclocal_m4_deps):
-
-clean-noinstLTLIBRARIES:
- -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES)
- @list='$(noinst_LTLIBRARIES)'; \
- locs=`for p in $$list; do echo $$p; done | \
- sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \
- sort -u`; \
- test -z "$$locs" || { \
- echo rm -f $${locs}; \
- rm -f $${locs}; \
- }
-libllvmpipe.la: $(libllvmpipe_la_OBJECTS) $(libllvmpipe_la_DEPENDENCIES) $(EXTRA_libllvmpipe_la_DEPENDENCIES)
- $(AM_V_CCLD)$(libllvmpipe_la_LINK) $(libllvmpipe_la_OBJECTS) $(libllvmpipe_la_LIBADD) $(LIBS)
-
-clean-checkPROGRAMS:
- @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \
- echo " rm -f" $$list; \
- rm -f $$list || exit $$?; \
- test -n "$(EXEEXT)" || exit 0; \
- list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
- echo " rm -f" $$list; \
- rm -f $$list
-lp_test_arit$(EXEEXT): $(lp_test_arit_OBJECTS) $(lp_test_arit_DEPENDENCIES) $(EXTRA_lp_test_arit_DEPENDENCIES)
- @rm -f lp_test_arit$(EXEEXT)
- $(AM_V_CXXLD)$(CXXLINK) $(lp_test_arit_OBJECTS) $(lp_test_arit_LDADD) $(LIBS)
-lp_test_blend$(EXEEXT): $(lp_test_blend_OBJECTS) $(lp_test_blend_DEPENDENCIES) $(EXTRA_lp_test_blend_DEPENDENCIES)
- @rm -f lp_test_blend$(EXEEXT)
- $(AM_V_CXXLD)$(CXXLINK) $(lp_test_blend_OBJECTS) $(lp_test_blend_LDADD) $(LIBS)
-lp_test_conv$(EXEEXT): $(lp_test_conv_OBJECTS) $(lp_test_conv_DEPENDENCIES) $(EXTRA_lp_test_conv_DEPENDENCIES)
- @rm -f lp_test_conv$(EXEEXT)
- $(AM_V_CXXLD)$(CXXLINK) $(lp_test_conv_OBJECTS) $(lp_test_conv_LDADD) $(LIBS)
-lp_test_format$(EXEEXT): $(lp_test_format_OBJECTS) $(lp_test_format_DEPENDENCIES) $(EXTRA_lp_test_format_DEPENDENCIES)
- @rm -f lp_test_format$(EXEEXT)
- $(AM_V_CXXLD)$(CXXLINK) $(lp_test_format_OBJECTS) $(lp_test_format_LDADD) $(LIBS)
-lp_test_printf$(EXEEXT): $(lp_test_printf_OBJECTS) $(lp_test_printf_DEPENDENCIES) $(EXTRA_lp_test_printf_DEPENDENCIES)
- @rm -f lp_test_printf$(EXEEXT)
- $(AM_V_CXXLD)$(CXXLINK) $(lp_test_printf_OBJECTS) $(lp_test_printf_LDADD) $(LIBS)
-
-mostlyclean-compile:
- -rm -f *.$(OBJEXT)
-
-distclean-compile:
- -rm -f *.tab.c
-
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dummy.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lp_bld_alpha.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lp_bld_blend.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lp_bld_blend_aos.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lp_bld_blend_logicop.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lp_bld_depth.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lp_bld_interp.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lp_clear.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lp_context.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lp_draw_arrays.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lp_fence.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lp_flush.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lp_jit.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lp_memory.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lp_perf.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lp_query.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lp_rast.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lp_rast_debug.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lp_rast_tri.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lp_scene.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lp_scene_queue.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lp_screen.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lp_setup.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lp_setup_line.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lp_setup_point.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lp_setup_tri.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lp_setup_vbuf.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lp_state_blend.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lp_state_clip.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lp_state_derived.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lp_state_fs.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lp_state_gs.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lp_state_rasterizer.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lp_state_sampler.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lp_state_setup.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lp_state_so.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lp_state_surface.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lp_state_vertex.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lp_state_vs.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lp_surface.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lp_test_arit.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lp_test_blend.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lp_test_conv.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lp_test_format.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lp_test_main.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lp_test_printf.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lp_tex_sample.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lp_texture.Plo@am__quote@
-
-.c.o:
-@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
-@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
-@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $<
-
-.c.obj:
-@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\
-@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\
-@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
-
-.c.lo:
-@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\
-@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
-@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
-
-.cpp.o:
-@am__fastdepCXX_TRUE@ $(AM_V_CXX)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
-@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
-@am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $<
-
-.cpp.obj:
-@am__fastdepCXX_TRUE@ $(AM_V_CXX)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\
-@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\
-@am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
-
-.cpp.lo:
-@am__fastdepCXX_TRUE@ $(AM_V_CXX)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\
-@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
-@am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $<
-
-mostlyclean-libtool:
- -rm -f *.lo
-
-clean-libtool:
- -rm -rf .libs _libs
-
-ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
- END { if (nonempty) { for (i in files) print i; }; }'`; \
- mkid -fID $$unique
-tags: TAGS
-
-TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
- $(TAGS_FILES) $(LISP)
- set x; \
- here=`pwd`; \
- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
- END { if (nonempty) { for (i in files) print i; }; }'`; \
- shift; \
- if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
- test -n "$$unique" || unique=$$empty_fix; \
- if test $$# -gt 0; then \
- $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
- "$$@" $$unique; \
- else \
- $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
- $$unique; \
- fi; \
- fi
-ctags: CTAGS
-CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
- $(TAGS_FILES) $(LISP)
- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
- END { if (nonempty) { for (i in files) print i; }; }'`; \
- test -z "$(CTAGS_ARGS)$$unique" \
- || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
- $$unique
-
-GTAGS:
- here=`$(am__cd) $(top_builddir) && pwd` \
- && $(am__cd) $(top_srcdir) \
- && gtags -i $(GTAGS_ARGS) "$$here"
-
-cscopelist: $(HEADERS) $(SOURCES) $(LISP)
- list='$(SOURCES) $(HEADERS) $(LISP)'; \
- case "$(srcdir)" in \
- [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
- *) sdir=$(subdir)/$(srcdir) ;; \
- esac; \
- for i in $$list; do \
- if test -f "$$i"; then \
- echo "$(subdir)/$$i"; \
- else \
- echo "$$sdir/$$i"; \
- fi; \
- done >> $(top_builddir)/cscope.files
-
-distclean-tags:
- -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-
-check-TESTS: $(TESTS)
- @failed=0; all=0; xfail=0; xpass=0; skip=0; \
- srcdir=$(srcdir); export srcdir; \
- list=' $(TESTS) '; \
- $(am__tty_colors); \
- if test -n "$$list"; then \
- for tst in $$list; do \
- if test -f ./$$tst; then dir=./; \
- elif test -f $$tst; then dir=; \
- else dir="$(srcdir)/"; fi; \
- if $(TESTS_ENVIRONMENT) $${dir}$$tst $(AM_TESTS_FD_REDIRECT); then \
- all=`expr $$all + 1`; \
- case " $(XFAIL_TESTS) " in \
- *[\ \ ]$$tst[\ \ ]*) \
- xpass=`expr $$xpass + 1`; \
- failed=`expr $$failed + 1`; \
- col=$$red; res=XPASS; \
- ;; \
- *) \
- col=$$grn; res=PASS; \
- ;; \
- esac; \
- elif test $$? -ne 77; then \
- all=`expr $$all + 1`; \
- case " $(XFAIL_TESTS) " in \
- *[\ \ ]$$tst[\ \ ]*) \
- xfail=`expr $$xfail + 1`; \
- col=$$lgn; res=XFAIL; \
- ;; \
- *) \
- failed=`expr $$failed + 1`; \
- col=$$red; res=FAIL; \
- ;; \
- esac; \
- else \
- skip=`expr $$skip + 1`; \
- col=$$blu; res=SKIP; \
- fi; \
- echo "$${col}$$res$${std}: $$tst"; \
- done; \
- if test "$$all" -eq 1; then \
- tests="test"; \
- All=""; \
- else \
- tests="tests"; \
- All="All "; \
- fi; \
- if test "$$failed" -eq 0; then \
- if test "$$xfail" -eq 0; then \
- banner="$$All$$all $$tests passed"; \
- else \
- if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \
- banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \
- fi; \
- else \
- if test "$$xpass" -eq 0; then \
- banner="$$failed of $$all $$tests failed"; \
- else \
- if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \
- banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \
- fi; \
- fi; \
- dashes="$$banner"; \
- skipped=""; \
- if test "$$skip" -ne 0; then \
- if test "$$skip" -eq 1; then \
- skipped="($$skip test was not run)"; \
- else \
- skipped="($$skip tests were not run)"; \
- fi; \
- test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \
- dashes="$$skipped"; \
- fi; \
- report=""; \
- if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \
- report="Please report to $(PACKAGE_BUGREPORT)"; \
- test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \
- dashes="$$report"; \
- fi; \
- dashes=`echo "$$dashes" | sed s/./=/g`; \
- if test "$$failed" -eq 0; then \
- col="$$grn"; \
- else \
- col="$$red"; \
- fi; \
- echo "$${col}$$dashes$${std}"; \
- echo "$${col}$$banner$${std}"; \
- test -z "$$skipped" || echo "$${col}$$skipped$${std}"; \
- test -z "$$report" || echo "$${col}$$report$${std}"; \
- echo "$${col}$$dashes$${std}"; \
- test "$$failed" -eq 0; \
- else :; fi
-
-distdir: $(DISTFILES)
- @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
- topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
- list='$(DISTFILES)'; \
- dist_files=`for file in $$list; do echo $$file; done | \
- sed -e "s|^$$srcdirstrip/||;t" \
- -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
- case $$dist_files in \
- */*) $(MKDIR_P) `echo "$$dist_files" | \
- sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
- sort -u` ;; \
- esac; \
- for file in $$dist_files; do \
- if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
- if test -d $$d/$$file; then \
- dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
- if test -d "$(distdir)/$$file"; then \
- find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
- fi; \
- if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
- cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
- find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
- fi; \
- cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
- else \
- test -f "$(distdir)/$$file" \
- || cp -p $$d/$$file "$(distdir)/$$file" \
- || exit 1; \
- fi; \
- done
-check-am: all-am
- $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS)
- $(MAKE) $(AM_MAKEFLAGS) check-TESTS
-check: check-am
-all-am: Makefile $(LTLIBRARIES) $(HEADERS)
-installdirs:
-install: install-am
-install-exec: install-exec-am
-install-data: install-data-am
-uninstall: uninstall-am
-
-install-am: all-am
- @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-
-installcheck: installcheck-am
-install-strip:
- if test -z '$(STRIP)'; then \
- $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
- install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
- install; \
- else \
- $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
- install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
- "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
- fi
-mostlyclean-generic:
-
-clean-generic:
-
-distclean-generic:
- -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
- -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
-
-maintainer-clean-generic:
- @echo "This command is intended for maintainers to use"
- @echo "it deletes files that may require special tools to rebuild."
-clean: clean-am
-
-clean-am: clean-checkPROGRAMS clean-generic clean-libtool \
- clean-noinstLTLIBRARIES mostlyclean-am
-
-distclean: distclean-am
- -rm -rf ./$(DEPDIR)
- -rm -f Makefile
-distclean-am: clean-am distclean-compile distclean-generic \
- distclean-tags
-
-dvi: dvi-am
-
-dvi-am:
-
-html: html-am
-
-html-am:
-
-info: info-am
-
-info-am:
-
-install-data-am:
-
-install-dvi: install-dvi-am
-
-install-dvi-am:
-
-install-exec-am:
-
-install-html: install-html-am
-
-install-html-am:
-
-install-info: install-info-am
-
-install-info-am:
-
-install-man:
-
-install-pdf: install-pdf-am
-
-install-pdf-am:
-
-install-ps: install-ps-am
-
-install-ps-am:
-
-installcheck-am:
-
-maintainer-clean: maintainer-clean-am
- -rm -rf ./$(DEPDIR)
- -rm -f Makefile
-maintainer-clean-am: distclean-am maintainer-clean-generic
-
-mostlyclean: mostlyclean-am
-
-mostlyclean-am: mostlyclean-compile mostlyclean-generic \
- mostlyclean-libtool
-
-pdf: pdf-am
-
-pdf-am:
-
-ps: ps-am
-
-ps-am:
-
-uninstall-am:
-
-.MAKE: check-am install-am install-strip
-
-.PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \
- clean-checkPROGRAMS clean-generic clean-libtool \
- clean-noinstLTLIBRARIES cscopelist ctags distclean \
- distclean-compile distclean-generic distclean-libtool \
- distclean-tags distdir dvi dvi-am html html-am info info-am \
- install install-am install-data install-data-am install-dvi \
- install-dvi-am install-exec install-exec-am install-html \
- install-html-am install-info install-info-am install-man \
- install-pdf install-pdf-am install-ps install-ps-am \
- install-strip installcheck installcheck-am installdirs \
- maintainer-clean maintainer-clean-generic mostlyclean \
- mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
- pdf pdf-am ps ps-am tags uninstall uninstall-am
-
-
-# Tell versions [3.59,3.63) of GNU make to not export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:
diff --git a/lib/mesa/src/gallium/drivers/llvmpipe/SConscript b/lib/mesa/src/gallium/drivers/llvmpipe/SConscript
index 74d7a9e16..1af686771 100644
--- a/lib/mesa/src/gallium/drivers/llvmpipe/SConscript
+++ b/lib/mesa/src/gallium/drivers/llvmpipe/SConscript
@@ -18,6 +18,9 @@ llvmpipe = env.ConvenienceLibrary(
env.Alias('llvmpipe', llvmpipe)
+env.Append(CPPPATH = [
+ '../../../compiler/nir',
+])
if not env['embedded']:
env = env.Clone()
diff --git a/lib/mesa/src/gallium/drivers/llvmpipe/lp_bld_blend_aos.c b/lib/mesa/src/gallium/drivers/llvmpipe/lp_bld_blend_aos.c
index c16ef1a2e..985cda699 100644
--- a/lib/mesa/src/gallium/drivers/llvmpipe/lp_bld_blend_aos.c
+++ b/lib/mesa/src/gallium/drivers/llvmpipe/lp_bld_blend_aos.c
@@ -45,7 +45,7 @@
#include "pipe/p_state.h"
#include "util/u_debug.h"
-#include "util/u_format.h"
+#include "util/format/u_format.h"
#include "gallivm/lp_bld_type.h"
#include "gallivm/lp_bld_const.h"
diff --git a/lib/mesa/src/gallium/drivers/llvmpipe/lp_bld_depth.c b/lib/mesa/src/gallium/drivers/llvmpipe/lp_bld_depth.c
index d5d5c5a78..5edb54617 100644
--- a/lib/mesa/src/gallium/drivers/llvmpipe/lp_bld_depth.c
+++ b/lib/mesa/src/gallium/drivers/llvmpipe/lp_bld_depth.c
@@ -50,7 +50,7 @@
*/
#include "pipe/p_state.h"
-#include "util/u_format.h"
+#include "util/format/u_format.h"
#include "util/u_cpu_detect.h"
#include "gallivm/lp_bld_type.h"
@@ -469,7 +469,11 @@ lp_build_occlusion_count(struct gallivm_state *gallivm,
countv = LLVMBuildBitCast(builder, countv, i8vntype, "");
for (i = 0; i < type.length; i++) {
+#if UTIL_ARCH_LITTLE_ENDIAN
shuffles[i] = lp_build_const_int32(gallivm, 4*i);
+#else
+ shuffles[i] = lp_build_const_int32(gallivm, (4*i) + 3);
+#endif
}
shufflev = LLVMConstVector(shuffles, type.length);
@@ -599,6 +603,12 @@ lp_build_depth_stencil_load_swizzled(struct gallivm_state *gallivm,
LLVMConstVector(shuffles, zs_type.length), "");
*s_fb = *z_fb;
+ if (format_desc->block.bits == 8) {
+ /* Extend stencil-only 8 bit values (S8_UINT) */
+ *s_fb = LLVMBuildZExt(builder, *s_fb,
+ lp_build_int_vec_type(gallivm, z_src_type), "");
+ }
+
if (format_desc->block.bits < z_src_type.width) {
/* Extend destination ZS values (e.g., when reading from Z16_UNORM) */
*z_fb = LLVMBuildZExt(builder, *z_fb,
diff --git a/lib/mesa/src/gallium/drivers/llvmpipe/lp_context.c b/lib/mesa/src/gallium/drivers/llvmpipe/lp_context.c
index 016416e01..66d72b947 100644
--- a/lib/mesa/src/gallium/drivers/llvmpipe/lp_context.c
+++ b/lib/mesa/src/gallium/drivers/llvmpipe/lp_context.c
@@ -55,10 +55,13 @@
static void llvmpipe_destroy( struct pipe_context *pipe )
{
struct llvmpipe_context *llvmpipe = llvmpipe_context( pipe );
- uint i, j;
+ uint i;
lp_print_counters();
+ if (llvmpipe->csctx) {
+ lp_csctx_destroy(llvmpipe->csctx);
+ }
if (llvmpipe->blitter) {
util_blitter_destroy(llvmpipe->blitter);
}
@@ -77,21 +80,18 @@ static void llvmpipe_destroy( struct pipe_context *pipe )
pipe_surface_reference(&llvmpipe->framebuffer.zsbuf, NULL);
- for (i = 0; i < ARRAY_SIZE(llvmpipe->sampler_views[0]); i++) {
- pipe_sampler_view_reference(&llvmpipe->sampler_views[PIPE_SHADER_FRAGMENT][i], NULL);
- }
-
- for (i = 0; i < ARRAY_SIZE(llvmpipe->sampler_views[0]); i++) {
- pipe_sampler_view_reference(&llvmpipe->sampler_views[PIPE_SHADER_VERTEX][i], NULL);
- }
-
- for (i = 0; i < ARRAY_SIZE(llvmpipe->sampler_views[0]); i++) {
- pipe_sampler_view_reference(&llvmpipe->sampler_views[PIPE_SHADER_GEOMETRY][i], NULL);
- }
-
- for (i = 0; i < ARRAY_SIZE(llvmpipe->constants); i++) {
- for (j = 0; j < ARRAY_SIZE(llvmpipe->constants[i]); j++) {
- pipe_resource_reference(&llvmpipe->constants[i][j].buffer, NULL);
+ for (enum pipe_shader_type s = PIPE_SHADER_VERTEX; s < PIPE_SHADER_TYPES; s++) {
+ for (i = 0; i < ARRAY_SIZE(llvmpipe->sampler_views[0]); i++) {
+ pipe_sampler_view_reference(&llvmpipe->sampler_views[s][i], NULL);
+ }
+ for (i = 0; i < LP_MAX_TGSI_SHADER_IMAGES; i++) {
+ pipe_resource_reference(&llvmpipe->images[s][i].resource, NULL);
+ }
+ for (i = 0; i < LP_MAX_TGSI_SHADER_BUFFERS; i++) {
+ pipe_resource_reference(&llvmpipe->ssbos[s][i].buffer, NULL);
+ }
+ for (i = 0; i < ARRAY_SIZE(llvmpipe->constants[s]); i++) {
+ pipe_resource_reference(&llvmpipe->constants[s][i].buffer, NULL);
}
}
@@ -149,6 +149,7 @@ llvmpipe_create_context(struct pipe_screen *screen, void *priv,
make_empty_list(&llvmpipe->setup_variants_list);
+ make_empty_list(&llvmpipe->cs_variants_list);
llvmpipe->pipe.screen = screen;
llvmpipe->pipe.priv = priv;
@@ -164,6 +165,7 @@ llvmpipe_create_context(struct pipe_screen *screen, void *priv,
llvmpipe_init_blend_funcs(llvmpipe);
llvmpipe_init_clip_funcs(llvmpipe);
llvmpipe_init_draw_funcs(llvmpipe);
+ llvmpipe_init_compute_funcs(llvmpipe);
llvmpipe_init_sampler_funcs(llvmpipe);
llvmpipe_init_query_funcs( llvmpipe );
llvmpipe_init_vertex_funcs(llvmpipe);
@@ -171,6 +173,7 @@ llvmpipe_create_context(struct pipe_screen *screen, void *priv,
llvmpipe_init_fs_funcs(llvmpipe);
llvmpipe_init_vs_funcs(llvmpipe);
llvmpipe_init_gs_funcs(llvmpipe);
+ llvmpipe_init_tess_funcs(llvmpipe);
llvmpipe_init_rasterizer_funcs(llvmpipe);
llvmpipe_init_context_resource_funcs( &llvmpipe->pipe );
llvmpipe_init_surface_functions(llvmpipe);
@@ -199,6 +202,9 @@ llvmpipe_create_context(struct pipe_screen *screen, void *priv,
if (!llvmpipe->setup)
goto fail;
+ llvmpipe->csctx = lp_csctx_create( &llvmpipe->pipe );
+ if (!llvmpipe->csctx)
+ goto fail;
llvmpipe->pipe.stream_uploader = u_upload_create_default(&llvmpipe->pipe);
if (!llvmpipe->pipe.stream_uploader)
goto fail;
diff --git a/lib/mesa/src/gallium/drivers/llvmpipe/lp_context.h b/lib/mesa/src/gallium/drivers/llvmpipe/lp_context.h
index 8127b1626..825fde9a7 100644
--- a/lib/mesa/src/gallium/drivers/llvmpipe/lp_context.h
+++ b/lib/mesa/src/gallium/drivers/llvmpipe/lp_context.h
@@ -40,6 +40,7 @@
#include "lp_jit.h"
#include "lp_setup.h"
#include "lp_state_fs.h"
+#include "lp_state_cs.h"
#include "lp_state_setup.h"
@@ -48,6 +49,7 @@ struct draw_context;
struct draw_stage;
struct draw_vertex_shader;
struct lp_fragment_shader;
+struct lp_compute_shader;
struct lp_blend_state;
struct lp_setup_context;
struct lp_setup_variant;
@@ -65,6 +67,9 @@ struct llvmpipe_context {
struct lp_fragment_shader *fs;
struct draw_vertex_shader *vs;
const struct lp_geometry_shader *gs;
+ const struct lp_tess_ctrl_shader *tcs;
+ const struct lp_tess_eval_shader *tes;
+ struct lp_compute_shader *cs;
const struct lp_velems_state *velems;
const struct lp_so_state *so;
@@ -83,23 +88,29 @@ struct llvmpipe_context {
struct pipe_vertex_buffer vertex_buffer[PIPE_MAX_ATTRIBS];
struct pipe_shader_buffer ssbos[PIPE_SHADER_TYPES][LP_MAX_TGSI_SHADER_BUFFERS];
+ struct pipe_image_view images[PIPE_SHADER_TYPES][LP_MAX_TGSI_SHADER_IMAGES];
unsigned num_samplers[PIPE_SHADER_TYPES];
unsigned num_sampler_views[PIPE_SHADER_TYPES];
+ unsigned num_images[PIPE_SHADER_TYPES];
unsigned num_vertex_buffers;
struct draw_so_target *so_targets[PIPE_MAX_SO_BUFFERS];
int num_so_targets;
- struct pipe_query_data_so_statistics so_stats;
+ struct pipe_query_data_so_statistics so_stats[PIPE_MAX_VERTEX_STREAMS];
struct pipe_query_data_pipeline_statistics pipeline_statistics;
unsigned active_statistics_queries;
unsigned active_occlusion_queries;
- unsigned dirty; /**< Mask of LP_NEW_x flags */
+ unsigned active_primgen_queries;
+
+ bool queries_disabled;
+ unsigned dirty; /**< Mask of LP_NEW_x flags */
+ unsigned cs_dirty; /**< Mask of LP_CSNEW_x flags */
/** Mapped vertex buffers */
ubyte *mapped_vbuffer[PIPE_MAX_ATTRIBS];
@@ -147,6 +158,12 @@ struct llvmpipe_context {
struct lp_setup_variant_list_item setup_variants_list;
unsigned nr_setup_variants;
+ /** List of all compute shader variants */
+ struct lp_cs_variant_list_item cs_variants_list;
+ unsigned nr_cs_variants;
+ unsigned nr_cs_instrs;
+ struct lp_cs_context *csctx;
+
/** Conditional query object and mode */
struct pipe_query *render_cond_query;
enum pipe_render_cond_flag render_cond_mode;
@@ -154,6 +171,10 @@ struct llvmpipe_context {
/** The LLVMContext to use for LLVM related work */
LLVMContextRef context;
+
+ int max_global_buffers;
+ struct pipe_resource **global_buffers;
+
};
diff --git a/lib/mesa/src/gallium/drivers/llvmpipe/lp_draw_arrays.c b/lib/mesa/src/gallium/drivers/llvmpipe/lp_draw_arrays.c
index 3ce3d4782..d9700cfd6 100644
--- a/lib/mesa/src/gallium/drivers/llvmpipe/lp_draw_arrays.c
+++ b/lib/mesa/src/gallium/drivers/llvmpipe/lp_draw_arrays.c
@@ -105,6 +105,25 @@ llvmpipe_draw_vbo(struct pipe_context *pipe, const struct pipe_draw_info *info)
llvmpipe_prepare_geometry_sampling(lp,
lp->num_sampler_views[PIPE_SHADER_GEOMETRY],
lp->sampler_views[PIPE_SHADER_GEOMETRY]);
+ llvmpipe_prepare_tess_ctrl_sampling(lp,
+ lp->num_sampler_views[PIPE_SHADER_TESS_CTRL],
+ lp->sampler_views[PIPE_SHADER_TESS_CTRL]);
+ llvmpipe_prepare_tess_eval_sampling(lp,
+ lp->num_sampler_views[PIPE_SHADER_TESS_EVAL],
+ lp->sampler_views[PIPE_SHADER_TESS_EVAL]);
+
+ llvmpipe_prepare_vertex_images(lp,
+ lp->num_images[PIPE_SHADER_VERTEX],
+ lp->images[PIPE_SHADER_VERTEX]);
+ llvmpipe_prepare_geometry_images(lp,
+ lp->num_images[PIPE_SHADER_GEOMETRY],
+ lp->images[PIPE_SHADER_GEOMETRY]);
+ llvmpipe_prepare_tess_ctrl_images(lp,
+ lp->num_images[PIPE_SHADER_TESS_CTRL],
+ lp->images[PIPE_SHADER_TESS_CTRL]);
+ llvmpipe_prepare_tess_eval_images(lp,
+ lp->num_images[PIPE_SHADER_TESS_EVAL],
+ lp->images[PIPE_SHADER_TESS_EVAL]);
if (lp->gs && lp->gs->no_tokens) {
/* we have an empty geometry shader with stream output, so
attach the stream output info to the current vertex shader */
@@ -115,6 +134,10 @@ llvmpipe_draw_vbo(struct pipe_context *pipe, const struct pipe_draw_info *info)
draw_collect_pipeline_statistics(draw,
lp->active_statistics_queries > 0);
+ draw_collect_primitives_generated(draw,
+ lp->active_primgen_queries &&
+ !lp->queries_disabled);
+
/* draw! */
draw_vbo(draw, info);
diff --git a/lib/mesa/src/gallium/drivers/llvmpipe/lp_jit.c b/lib/mesa/src/gallium/drivers/llvmpipe/lp_jit.c
index d5527e30d..00b6477f9 100644
--- a/lib/mesa/src/gallium/drivers/llvmpipe/lp_jit.c
+++ b/lib/mesa/src/gallium/drivers/llvmpipe/lp_jit.c
@@ -32,6 +32,7 @@
* @author Jose Fonseca <jfonseca@vmware.com>
*/
+#include <llvm/Config/llvm-config.h>
#include "util/u_memory.h"
#include "gallivm/lp_bld_init.h"
@@ -40,13 +41,134 @@
#include "lp_context.h"
#include "lp_jit.h"
+static LLVMTypeRef
+create_jit_texture_type(struct gallivm_state *gallivm)
+{
+ LLVMContextRef lc = gallivm->context;
+ LLVMTypeRef texture_type;
+ LLVMTypeRef elem_types[LP_JIT_TEXTURE_NUM_FIELDS];
+
+ /* struct lp_jit_texture */
+ elem_types[LP_JIT_TEXTURE_WIDTH] =
+ elem_types[LP_JIT_TEXTURE_HEIGHT] =
+ elem_types[LP_JIT_TEXTURE_DEPTH] =
+ elem_types[LP_JIT_TEXTURE_FIRST_LEVEL] =
+ elem_types[LP_JIT_TEXTURE_LAST_LEVEL] = LLVMInt32TypeInContext(lc);
+ elem_types[LP_JIT_TEXTURE_BASE] = LLVMPointerType(LLVMInt8TypeInContext(lc), 0);
+ elem_types[LP_JIT_TEXTURE_ROW_STRIDE] =
+ elem_types[LP_JIT_TEXTURE_IMG_STRIDE] =
+ elem_types[LP_JIT_TEXTURE_MIP_OFFSETS] =
+ LLVMArrayType(LLVMInt32TypeInContext(lc), LP_MAX_TEXTURE_LEVELS);
+
+ texture_type = LLVMStructTypeInContext(lc, elem_types,
+ ARRAY_SIZE(elem_types), 0);
+
+ LP_CHECK_MEMBER_OFFSET(struct lp_jit_texture, width,
+ gallivm->target, texture_type,
+ LP_JIT_TEXTURE_WIDTH);
+ LP_CHECK_MEMBER_OFFSET(struct lp_jit_texture, height,
+ gallivm->target, texture_type,
+ LP_JIT_TEXTURE_HEIGHT);
+ LP_CHECK_MEMBER_OFFSET(struct lp_jit_texture, depth,
+ gallivm->target, texture_type,
+ LP_JIT_TEXTURE_DEPTH);
+ LP_CHECK_MEMBER_OFFSET(struct lp_jit_texture, base,
+ gallivm->target, texture_type,
+ LP_JIT_TEXTURE_BASE);
+ LP_CHECK_MEMBER_OFFSET(struct lp_jit_texture, row_stride,
+ gallivm->target, texture_type,
+ LP_JIT_TEXTURE_ROW_STRIDE);
+ LP_CHECK_MEMBER_OFFSET(struct lp_jit_texture, img_stride,
+ gallivm->target, texture_type,
+ LP_JIT_TEXTURE_IMG_STRIDE);
+ LP_CHECK_MEMBER_OFFSET(struct lp_jit_texture, first_level,
+ gallivm->target, texture_type,
+ LP_JIT_TEXTURE_FIRST_LEVEL);
+ LP_CHECK_MEMBER_OFFSET(struct lp_jit_texture, last_level,
+ gallivm->target, texture_type,
+ LP_JIT_TEXTURE_LAST_LEVEL);
+ LP_CHECK_MEMBER_OFFSET(struct lp_jit_texture, mip_offsets,
+ gallivm->target, texture_type,
+ LP_JIT_TEXTURE_MIP_OFFSETS);
+ LP_CHECK_STRUCT_SIZE(struct lp_jit_texture,
+ gallivm->target, texture_type);
+ return texture_type;
+}
+
+static LLVMTypeRef
+create_jit_sampler_type(struct gallivm_state *gallivm)
+{
+ LLVMContextRef lc = gallivm->context;
+ LLVMTypeRef sampler_type;
+ LLVMTypeRef elem_types[LP_JIT_SAMPLER_NUM_FIELDS];
+ elem_types[LP_JIT_SAMPLER_MIN_LOD] =
+ elem_types[LP_JIT_SAMPLER_MAX_LOD] =
+ elem_types[LP_JIT_SAMPLER_LOD_BIAS] = LLVMFloatTypeInContext(lc);
+ elem_types[LP_JIT_SAMPLER_BORDER_COLOR] =
+ LLVMArrayType(LLVMFloatTypeInContext(lc), 4);
+
+ sampler_type = LLVMStructTypeInContext(lc, elem_types,
+ ARRAY_SIZE(elem_types), 0);
+
+ LP_CHECK_MEMBER_OFFSET(struct lp_jit_sampler, min_lod,
+ gallivm->target, sampler_type,
+ LP_JIT_SAMPLER_MIN_LOD);
+ LP_CHECK_MEMBER_OFFSET(struct lp_jit_sampler, max_lod,
+ gallivm->target, sampler_type,
+ LP_JIT_SAMPLER_MAX_LOD);
+ LP_CHECK_MEMBER_OFFSET(struct lp_jit_sampler, lod_bias,
+ gallivm->target, sampler_type,
+ LP_JIT_SAMPLER_LOD_BIAS);
+ LP_CHECK_MEMBER_OFFSET(struct lp_jit_sampler, border_color,
+ gallivm->target, sampler_type,
+ LP_JIT_SAMPLER_BORDER_COLOR);
+ LP_CHECK_STRUCT_SIZE(struct lp_jit_sampler,
+ gallivm->target, sampler_type);
+ return sampler_type;
+}
+
+static LLVMTypeRef
+create_jit_image_type(struct gallivm_state *gallivm)
+{
+ LLVMContextRef lc = gallivm->context;
+ LLVMTypeRef image_type;
+ LLVMTypeRef elem_types[LP_JIT_IMAGE_NUM_FIELDS];
+ elem_types[LP_JIT_IMAGE_WIDTH] =
+ elem_types[LP_JIT_IMAGE_HEIGHT] =
+ elem_types[LP_JIT_IMAGE_DEPTH] = LLVMInt32TypeInContext(lc);
+ elem_types[LP_JIT_IMAGE_BASE] = LLVMPointerType(LLVMInt8TypeInContext(lc), 0);
+ elem_types[LP_JIT_IMAGE_ROW_STRIDE] =
+ elem_types[LP_JIT_IMAGE_IMG_STRIDE] = LLVMInt32TypeInContext(lc);
+
+ image_type = LLVMStructTypeInContext(lc, elem_types,
+ ARRAY_SIZE(elem_types), 0);
+ LP_CHECK_MEMBER_OFFSET(struct lp_jit_image, width,
+ gallivm->target, image_type,
+ LP_JIT_IMAGE_WIDTH);
+ LP_CHECK_MEMBER_OFFSET(struct lp_jit_image, height,
+ gallivm->target, image_type,
+ LP_JIT_IMAGE_HEIGHT);
+ LP_CHECK_MEMBER_OFFSET(struct lp_jit_image, depth,
+ gallivm->target, image_type,
+ LP_JIT_IMAGE_DEPTH);
+ LP_CHECK_MEMBER_OFFSET(struct lp_jit_image, base,
+ gallivm->target, image_type,
+ LP_JIT_IMAGE_BASE);
+ LP_CHECK_MEMBER_OFFSET(struct lp_jit_image, row_stride,
+ gallivm->target, image_type,
+ LP_JIT_IMAGE_ROW_STRIDE);
+ LP_CHECK_MEMBER_OFFSET(struct lp_jit_image, img_stride,
+ gallivm->target, image_type,
+ LP_JIT_IMAGE_IMG_STRIDE);
+ return image_type;
+}
static void
lp_jit_create_types(struct lp_fragment_shader_variant *lp)
{
struct gallivm_state *gallivm = lp->gallivm;
LLVMContextRef lc = gallivm->context;
- LLVMTypeRef viewport_type, texture_type, sampler_type;
+ LLVMTypeRef viewport_type, texture_type, sampler_type, image_type;
/* struct lp_jit_viewport */
{
@@ -68,82 +190,9 @@ lp_jit_create_types(struct lp_fragment_shader_variant *lp)
gallivm->target, viewport_type);
}
- /* struct lp_jit_texture */
- {
- LLVMTypeRef elem_types[LP_JIT_TEXTURE_NUM_FIELDS];
-
- elem_types[LP_JIT_TEXTURE_WIDTH] =
- elem_types[LP_JIT_TEXTURE_HEIGHT] =
- elem_types[LP_JIT_TEXTURE_DEPTH] =
- elem_types[LP_JIT_TEXTURE_FIRST_LEVEL] =
- elem_types[LP_JIT_TEXTURE_LAST_LEVEL] = LLVMInt32TypeInContext(lc);
- elem_types[LP_JIT_TEXTURE_BASE] = LLVMPointerType(LLVMInt8TypeInContext(lc), 0);
- elem_types[LP_JIT_TEXTURE_ROW_STRIDE] =
- elem_types[LP_JIT_TEXTURE_IMG_STRIDE] =
- elem_types[LP_JIT_TEXTURE_MIP_OFFSETS] =
- LLVMArrayType(LLVMInt32TypeInContext(lc), LP_MAX_TEXTURE_LEVELS);
-
- texture_type = LLVMStructTypeInContext(lc, elem_types,
- ARRAY_SIZE(elem_types), 0);
-
- LP_CHECK_MEMBER_OFFSET(struct lp_jit_texture, width,
- gallivm->target, texture_type,
- LP_JIT_TEXTURE_WIDTH);
- LP_CHECK_MEMBER_OFFSET(struct lp_jit_texture, height,
- gallivm->target, texture_type,
- LP_JIT_TEXTURE_HEIGHT);
- LP_CHECK_MEMBER_OFFSET(struct lp_jit_texture, depth,
- gallivm->target, texture_type,
- LP_JIT_TEXTURE_DEPTH);
- LP_CHECK_MEMBER_OFFSET(struct lp_jit_texture, first_level,
- gallivm->target, texture_type,
- LP_JIT_TEXTURE_FIRST_LEVEL);
- LP_CHECK_MEMBER_OFFSET(struct lp_jit_texture, last_level,
- gallivm->target, texture_type,
- LP_JIT_TEXTURE_LAST_LEVEL);
- LP_CHECK_MEMBER_OFFSET(struct lp_jit_texture, base,
- gallivm->target, texture_type,
- LP_JIT_TEXTURE_BASE);
- LP_CHECK_MEMBER_OFFSET(struct lp_jit_texture, row_stride,
- gallivm->target, texture_type,
- LP_JIT_TEXTURE_ROW_STRIDE);
- LP_CHECK_MEMBER_OFFSET(struct lp_jit_texture, img_stride,
- gallivm->target, texture_type,
- LP_JIT_TEXTURE_IMG_STRIDE);
- LP_CHECK_MEMBER_OFFSET(struct lp_jit_texture, mip_offsets,
- gallivm->target, texture_type,
- LP_JIT_TEXTURE_MIP_OFFSETS);
- LP_CHECK_STRUCT_SIZE(struct lp_jit_texture,
- gallivm->target, texture_type);
- }
-
- /* struct lp_jit_sampler */
- {
- LLVMTypeRef elem_types[LP_JIT_SAMPLER_NUM_FIELDS];
- elem_types[LP_JIT_SAMPLER_MIN_LOD] =
- elem_types[LP_JIT_SAMPLER_MAX_LOD] =
- elem_types[LP_JIT_SAMPLER_LOD_BIAS] = LLVMFloatTypeInContext(lc);
- elem_types[LP_JIT_SAMPLER_BORDER_COLOR] =
- LLVMArrayType(LLVMFloatTypeInContext(lc), 4);
-
- sampler_type = LLVMStructTypeInContext(lc, elem_types,
- ARRAY_SIZE(elem_types), 0);
-
- LP_CHECK_MEMBER_OFFSET(struct lp_jit_sampler, min_lod,
- gallivm->target, sampler_type,
- LP_JIT_SAMPLER_MIN_LOD);
- LP_CHECK_MEMBER_OFFSET(struct lp_jit_sampler, max_lod,
- gallivm->target, sampler_type,
- LP_JIT_SAMPLER_MAX_LOD);
- LP_CHECK_MEMBER_OFFSET(struct lp_jit_sampler, lod_bias,
- gallivm->target, sampler_type,
- LP_JIT_SAMPLER_LOD_BIAS);
- LP_CHECK_MEMBER_OFFSET(struct lp_jit_sampler, border_color,
- gallivm->target, sampler_type,
- LP_JIT_SAMPLER_BORDER_COLOR);
- LP_CHECK_STRUCT_SIZE(struct lp_jit_sampler,
- gallivm->target, sampler_type);
- }
+ texture_type = create_jit_texture_type(gallivm);
+ sampler_type = create_jit_sampler_type(gallivm);
+ image_type = create_jit_image_type(gallivm);
/* struct lp_jit_context */
{
@@ -154,16 +203,18 @@ lp_jit_create_types(struct lp_fragment_shader_variant *lp)
LLVMArrayType(LLVMPointerType(LLVMFloatTypeInContext(lc), 0), LP_MAX_TGSI_CONST_BUFFERS);
elem_types[LP_JIT_CTX_NUM_CONSTANTS] =
LLVMArrayType(LLVMInt32TypeInContext(lc), LP_MAX_TGSI_CONST_BUFFERS);
+ elem_types[LP_JIT_CTX_TEXTURES] = LLVMArrayType(texture_type,
+ PIPE_MAX_SHADER_SAMPLER_VIEWS);
+ elem_types[LP_JIT_CTX_SAMPLERS] = LLVMArrayType(sampler_type,
+ PIPE_MAX_SAMPLERS);
+ elem_types[LP_JIT_CTX_IMAGES] = LLVMArrayType(image_type,
+ PIPE_MAX_SHADER_IMAGES);
elem_types[LP_JIT_CTX_ALPHA_REF] = LLVMFloatTypeInContext(lc);
elem_types[LP_JIT_CTX_STENCIL_REF_FRONT] =
elem_types[LP_JIT_CTX_STENCIL_REF_BACK] = LLVMInt32TypeInContext(lc);
elem_types[LP_JIT_CTX_U8_BLEND_COLOR] = LLVMPointerType(LLVMInt8TypeInContext(lc), 0);
elem_types[LP_JIT_CTX_F_BLEND_COLOR] = LLVMPointerType(LLVMFloatTypeInContext(lc), 0);
elem_types[LP_JIT_CTX_VIEWPORTS] = LLVMPointerType(viewport_type, 0);
- elem_types[LP_JIT_CTX_TEXTURES] = LLVMArrayType(texture_type,
- PIPE_MAX_SHADER_SAMPLER_VIEWS);
- elem_types[LP_JIT_CTX_SAMPLERS] = LLVMArrayType(sampler_type,
- PIPE_MAX_SAMPLERS);
elem_types[LP_JIT_CTX_SSBOS] =
LLVMArrayType(LLVMPointerType(LLVMInt32TypeInContext(lc), 0), LP_MAX_TGSI_SHADER_BUFFERS);
elem_types[LP_JIT_CTX_NUM_SSBOS] =
@@ -177,6 +228,15 @@ lp_jit_create_types(struct lp_fragment_shader_variant *lp)
LP_CHECK_MEMBER_OFFSET(struct lp_jit_context, num_constants,
gallivm->target, context_type,
LP_JIT_CTX_NUM_CONSTANTS);
+ LP_CHECK_MEMBER_OFFSET(struct lp_jit_context, textures,
+ gallivm->target, context_type,
+ LP_JIT_CTX_TEXTURES);
+ LP_CHECK_MEMBER_OFFSET(struct lp_jit_context, samplers,
+ gallivm->target, context_type,
+ LP_JIT_CTX_SAMPLERS);
+ LP_CHECK_MEMBER_OFFSET(struct lp_jit_context, images,
+ gallivm->target, context_type,
+ LP_JIT_CTX_IMAGES);
LP_CHECK_MEMBER_OFFSET(struct lp_jit_context, alpha_ref_value,
gallivm->target, context_type,
LP_JIT_CTX_ALPHA_REF);
@@ -195,12 +255,6 @@ lp_jit_create_types(struct lp_fragment_shader_variant *lp)
LP_CHECK_MEMBER_OFFSET(struct lp_jit_context, viewports,
gallivm->target, context_type,
LP_JIT_CTX_VIEWPORTS);
- LP_CHECK_MEMBER_OFFSET(struct lp_jit_context, textures,
- gallivm->target, context_type,
- LP_JIT_CTX_TEXTURES);
- LP_CHECK_MEMBER_OFFSET(struct lp_jit_context, samplers,
- gallivm->target, context_type,
- LP_JIT_CTX_SAMPLERS);
LP_CHECK_MEMBER_OFFSET(struct lp_jit_context, ssbos,
gallivm->target, context_type,
LP_JIT_CTX_SSBOS);
@@ -232,13 +286,9 @@ lp_jit_create_types(struct lp_fragment_shader_variant *lp)
}
if (gallivm_debug & GALLIVM_DEBUG_IR) {
-#if HAVE_LLVM >= 0x304
char *str = LLVMPrintModuleToString(gallivm->module);
fprintf(stderr, "%s", str);
LLVMDisposeMessage(str);
-#else
- LLVMDumpModule(gallivm->module);
-#endif
}
}
@@ -263,3 +313,103 @@ lp_jit_init_types(struct lp_fragment_shader_variant *lp)
if (!lp->jit_context_ptr_type)
lp_jit_create_types(lp);
}
+
+static void
+lp_jit_create_cs_types(struct lp_compute_shader_variant *lp)
+{
+ struct gallivm_state *gallivm = lp->gallivm;
+ LLVMContextRef lc = gallivm->context;
+ LLVMTypeRef texture_type, sampler_type, image_type;
+
+ texture_type = create_jit_texture_type(gallivm);
+ sampler_type = create_jit_sampler_type(gallivm);
+ image_type = create_jit_image_type(gallivm);
+
+ /* struct lp_jit_cs_thread_data */
+ {
+ LLVMTypeRef elem_types[LP_JIT_CS_THREAD_DATA_COUNT];
+ LLVMTypeRef thread_data_type;
+
+ elem_types[LP_JIT_CS_THREAD_DATA_CACHE] =
+ LLVMPointerType(lp_build_format_cache_type(gallivm), 0);
+
+ elem_types[LP_JIT_CS_THREAD_DATA_SHARED] = LLVMPointerType(LLVMInt32TypeInContext(lc), 0);
+ thread_data_type = LLVMStructTypeInContext(lc, elem_types,
+ ARRAY_SIZE(elem_types), 0);
+
+ lp->jit_cs_thread_data_ptr_type = LLVMPointerType(thread_data_type, 0);
+ }
+
+ /* struct lp_jit_cs_context */
+ {
+ LLVMTypeRef elem_types[LP_JIT_CS_CTX_COUNT];
+ LLVMTypeRef cs_context_type;
+
+ elem_types[LP_JIT_CS_CTX_CONSTANTS] =
+ LLVMArrayType(LLVMPointerType(LLVMFloatTypeInContext(lc), 0), LP_MAX_TGSI_CONST_BUFFERS);
+ elem_types[LP_JIT_CS_CTX_NUM_CONSTANTS] =
+ LLVMArrayType(LLVMInt32TypeInContext(lc), LP_MAX_TGSI_CONST_BUFFERS);
+ elem_types[LP_JIT_CS_CTX_TEXTURES] = LLVMArrayType(texture_type,
+ PIPE_MAX_SHADER_SAMPLER_VIEWS);
+ elem_types[LP_JIT_CS_CTX_SAMPLERS] = LLVMArrayType(sampler_type,
+ PIPE_MAX_SAMPLERS);
+ elem_types[LP_JIT_CS_CTX_IMAGES] = LLVMArrayType(image_type,
+ PIPE_MAX_SHADER_IMAGES);
+ elem_types[LP_JIT_CS_CTX_SSBOS] =
+ LLVMArrayType(LLVMPointerType(LLVMInt32TypeInContext(lc), 0), LP_MAX_TGSI_SHADER_BUFFERS);
+ elem_types[LP_JIT_CS_CTX_NUM_SSBOS] =
+ LLVMArrayType(LLVMInt32TypeInContext(lc), LP_MAX_TGSI_SHADER_BUFFERS);
+
+ elem_types[LP_JIT_CS_CTX_SHARED_SIZE] = LLVMInt32TypeInContext(lc);
+
+ elem_types[LP_JIT_CS_CTX_KERNEL_ARGS] = LLVMPointerType(LLVMInt8TypeInContext(lc), 0);
+
+ cs_context_type = LLVMStructTypeInContext(lc, elem_types,
+ ARRAY_SIZE(elem_types), 0);
+
+ LP_CHECK_MEMBER_OFFSET(struct lp_jit_cs_context, constants,
+ gallivm->target, cs_context_type,
+ LP_JIT_CS_CTX_CONSTANTS);
+ LP_CHECK_MEMBER_OFFSET(struct lp_jit_cs_context, num_constants,
+ gallivm->target, cs_context_type,
+ LP_JIT_CS_CTX_NUM_CONSTANTS);
+ LP_CHECK_MEMBER_OFFSET(struct lp_jit_cs_context, textures,
+ gallivm->target, cs_context_type,
+ LP_JIT_CS_CTX_TEXTURES);
+ LP_CHECK_MEMBER_OFFSET(struct lp_jit_cs_context, samplers,
+ gallivm->target, cs_context_type,
+ LP_JIT_CS_CTX_SAMPLERS);
+ LP_CHECK_MEMBER_OFFSET(struct lp_jit_cs_context, images,
+ gallivm->target, cs_context_type,
+ LP_JIT_CS_CTX_IMAGES);
+ LP_CHECK_MEMBER_OFFSET(struct lp_jit_cs_context, ssbos,
+ gallivm->target, cs_context_type,
+ LP_JIT_CS_CTX_SSBOS);
+ LP_CHECK_MEMBER_OFFSET(struct lp_jit_cs_context, num_ssbos,
+ gallivm->target, cs_context_type,
+ LP_JIT_CS_CTX_NUM_SSBOS);
+ LP_CHECK_MEMBER_OFFSET(struct lp_jit_cs_context, shared_size,
+ gallivm->target, cs_context_type,
+ LP_JIT_CS_CTX_SHARED_SIZE);
+ LP_CHECK_MEMBER_OFFSET(struct lp_jit_cs_context, kernel_args,
+ gallivm->target, cs_context_type,
+ LP_JIT_CS_CTX_KERNEL_ARGS);
+ LP_CHECK_STRUCT_SIZE(struct lp_jit_cs_context,
+ gallivm->target, cs_context_type);
+
+ lp->jit_cs_context_ptr_type = LLVMPointerType(cs_context_type, 0);
+ }
+
+ if (gallivm_debug & GALLIVM_DEBUG_IR) {
+ char *str = LLVMPrintModuleToString(gallivm->module);
+ fprintf(stderr, "%s", str);
+ LLVMDisposeMessage(str);
+ }
+}
+
+void
+lp_jit_init_cs_types(struct lp_compute_shader_variant *lp)
+{
+ if (!lp->jit_cs_context_ptr_type)
+ lp_jit_create_cs_types(lp);
+}
diff --git a/lib/mesa/src/gallium/drivers/llvmpipe/lp_rast.c b/lib/mesa/src/gallium/drivers/llvmpipe/lp_rast.c
index a4cb211e1..3d335e2ad 100644
--- a/lib/mesa/src/gallium/drivers/llvmpipe/lp_rast.c
+++ b/lib/mesa/src/gallium/drivers/llvmpipe/lp_rast.c
@@ -33,7 +33,7 @@
#include "util/u_pack_color.h"
#include "util/u_string.h"
#include "util/u_thread.h"
-
+#include "util/u_memset.h"
#include "util/os_time.h"
#include "lp_scene_queue.h"
@@ -211,7 +211,11 @@ lp_rast_clear_zstencil(struct lp_rasterizer_task *task,
switch (block_size) {
case 1:
assert(clear_mask == 0xff);
- memset(dst, (uint8_t) clear_value, height * width);
+ for (i = 0; i < height; i++) {
+ uint8_t *row = (uint8_t *)dst;
+ memset(row, (uint8_t) clear_value, width);
+ dst += dst_stride;
+ }
break;
case 2:
if (clear_mask == 0xffff) {
@@ -236,9 +240,7 @@ lp_rast_clear_zstencil(struct lp_rasterizer_task *task,
case 4:
if (clear_mask == 0xffffffff) {
for (i = 0; i < height; i++) {
- uint32_t *row = (uint32_t *)dst;
- for (j = 0; j < width; j++)
- *row++ = clear_value;
+ util_memset32(dst, clear_value, width);
dst += dst_stride;
}
}
@@ -628,7 +630,7 @@ rasterize_bin(struct lp_rasterizer_task *task,
lp_rast_tile_end(task);
-
+#ifdef DEBUG
/* Debug/Perf flags:
*/
if (bin->head->count == 1) {
@@ -637,6 +639,7 @@ rasterize_bin(struct lp_rasterizer_task *task,
else if (bin->head->cmd[0] == LP_RAST_OP_SHADE_TILE)
LP_COUNT(nr_pure_shade_64);
}
+#endif
}
@@ -866,6 +869,10 @@ create_rast_threads(struct lp_rasterizer *rast)
pipe_semaphore_init(&rast->tasks[i].work_done, 0);
rast->threads[i] = u_thread_create(thread_function,
(void *) &rast->tasks[i]);
+ if (!rast->threads[i]) {
+ rast->num_threads = i; /* previous thread is max */
+ break;
+ }
}
}
diff --git a/lib/mesa/src/gallium/drivers/llvmpipe/lp_rast_priv.h b/lib/mesa/src/gallium/drivers/llvmpipe/lp_rast_priv.h
index 59d3a2d8c..4b5ca8192 100644
--- a/lib/mesa/src/gallium/drivers/llvmpipe/lp_rast_priv.h
+++ b/lib/mesa/src/gallium/drivers/llvmpipe/lp_rast_priv.h
@@ -28,7 +28,7 @@
#ifndef LP_RAST_PRIV_H
#define LP_RAST_PRIV_H
-#include "util/u_format.h"
+#include "util/format/u_format.h"
#include "util/u_thread.h"
#include "gallivm/lp_bld_debug.h"
#include "lp_memory.h"
diff --git a/lib/mesa/src/gallium/drivers/llvmpipe/lp_scene.c b/lib/mesa/src/gallium/drivers/llvmpipe/lp_scene.c
index ef0136c4f..beab118ac 100644
--- a/lib/mesa/src/gallium/drivers/llvmpipe/lp_scene.c
+++ b/lib/mesa/src/gallium/drivers/llvmpipe/lp_scene.c
@@ -30,7 +30,7 @@
#include "util/u_memory.h"
#include "util/u_inlines.h"
#include "util/simple_list.h"
-#include "util/u_format.h"
+#include "util/format/u_format.h"
#include "lp_scene.h"
#include "lp_fence.h"
#include "lp_debug.h"
diff --git a/lib/mesa/src/gallium/drivers/llvmpipe/lp_screen.c b/lib/mesa/src/gallium/drivers/llvmpipe/lp_screen.c
index 52372da2f..4b3e66a3d 100644
--- a/lib/mesa/src/gallium/drivers/llvmpipe/lp_screen.c
+++ b/lib/mesa/src/gallium/drivers/llvmpipe/lp_screen.c
@@ -29,14 +29,15 @@
#include "util/u_memory.h"
#include "util/u_math.h"
#include "util/u_cpu_detect.h"
-#include "util/u_format.h"
+#include "util/format/u_format.h"
#include "util/u_screen.h"
#include "util/u_string.h"
-#include "util/u_format_s3tc.h"
+#include "util/format/u_format_s3tc.h"
#include "pipe/p_defines.h"
#include "pipe/p_screen.h"
#include "draw/draw_context.h"
#include "gallivm/lp_bld_type.h"
+#include "gallivm/lp_bld_nir.h"
#include "util/os_misc.h"
#include "util/os_time.h"
@@ -49,9 +50,12 @@
#include "lp_public.h"
#include "lp_limits.h"
#include "lp_rast.h"
+#include "lp_cs_tpool.h"
#include "state_tracker/sw_winsys.h"
+#include "nir.h"
+
#ifdef DEBUG
int LP_DEBUG = 0;
@@ -68,6 +72,9 @@ static const struct debug_named_value lp_debug_flags[] = {
{ "fence", DEBUG_FENCE, NULL },
{ "mem", DEBUG_MEM, NULL },
{ "fs", DEBUG_FS, NULL },
+ { "cs", DEBUG_CS, NULL },
+ { "tgsi_ir", DEBUG_TGSI_IR, NULL },
+ { "cl", DEBUG_CL, NULL },
DEBUG_NAMED_VALUE_END
};
#endif
@@ -196,8 +203,10 @@ llvmpipe_get_param(struct pipe_screen *screen, enum pipe_cap param)
case PIPE_CAP_MAX_GEOMETRY_OUTPUT_VERTICES:
case PIPE_CAP_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS:
return 1024;
- case PIPE_CAP_MAX_VERTEX_STREAMS:
- return 1;
+ case PIPE_CAP_MAX_VERTEX_STREAMS: {
+ struct llvmpipe_screen *lscreen = llvmpipe_screen(screen);
+ return lscreen->use_tgsi ? 1 : 4;
+ }
case PIPE_CAP_MAX_VERTEX_ATTRIB_STRIDE:
return 2048;
case PIPE_CAP_STREAM_OUTPUT_PAUSE_RESUME:
@@ -215,14 +224,14 @@ llvmpipe_get_param(struct pipe_screen *screen, enum pipe_cap param)
case PIPE_CAP_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION:
return 0;
case PIPE_CAP_COMPUTE:
- return 0;
+ return GALLIVM_HAVE_CORO;
case PIPE_CAP_USER_VERTEX_BUFFERS:
return 1;
case PIPE_CAP_VERTEX_BUFFER_OFFSET_4BYTE_ALIGNED_ONLY:
case PIPE_CAP_VERTEX_BUFFER_STRIDE_4BYTE_ALIGNED_ONLY:
case PIPE_CAP_VERTEX_ELEMENT_SRC_OFFSET_4BYTE_ALIGNED_ONLY:
- case PIPE_CAP_TGSI_TEXCOORD:
return 0;
+ case PIPE_CAP_TGSI_TEXCOORD:
case PIPE_CAP_DRAW_INDIRECT:
return 1;
@@ -239,7 +248,7 @@ llvmpipe_get_param(struct pipe_screen *screen, enum pipe_cap param)
case PIPE_CAP_MAX_TEXTURE_BUFFER_SIZE:
return 65536;
case PIPE_CAP_TEXTURE_BUFFER_OFFSET_ALIGNMENT:
- return 1;
+ return 16;
case PIPE_CAP_PREFER_BLIT_BASED_TEXTURE_TRANSFER:
return 0;
case PIPE_CAP_MAX_VIEWPORTS:
@@ -259,8 +268,8 @@ llvmpipe_get_param(struct pipe_screen *screen, enum pipe_cap param)
case PIPE_CAP_TGSI_VS_WINDOW_SPACE_POSITION:
return 1;
case PIPE_CAP_TGSI_FS_FINE_DERIVATIVE:
+ return 1;
case PIPE_CAP_TGSI_TEX_TXF_LZ:
- return 0;
case PIPE_CAP_SAMPLER_VIEW_TARGET:
return 1;
case PIPE_CAP_FAKE_SW_MSAA:
@@ -315,36 +324,37 @@ llvmpipe_get_param(struct pipe_screen *screen, enum pipe_cap param)
case PIPE_CAP_MAX_VARYINGS:
return 32;
case PIPE_CAP_SHADER_BUFFER_OFFSET_ALIGNMENT:
+ return 16;
+ case PIPE_CAP_QUERY_BUFFER_OBJECT:
+ return 1;
+ case PIPE_CAP_DRAW_PARAMETERS:
+ return 1;
+ case PIPE_CAP_MULTI_DRAW_INDIRECT:
+ case PIPE_CAP_MULTI_DRAW_INDIRECT_PARAMS:
return 1;
+ case PIPE_CAP_MAX_SHADER_PATCH_VARYINGS:
+ return 32;
case PIPE_CAP_MULTISAMPLE_Z_RESOLVE:
case PIPE_CAP_RESOURCE_FROM_USER_MEMORY:
case PIPE_CAP_DEVICE_RESET_STATUS_QUERY:
- case PIPE_CAP_MAX_SHADER_PATCH_VARYINGS:
case PIPE_CAP_DEPTH_BOUNDS_TEST:
case PIPE_CAP_TGSI_TXQS:
case PIPE_CAP_FORCE_PERSAMPLE_INTERP:
case PIPE_CAP_SHAREABLE_SHADERS:
- case PIPE_CAP_DRAW_PARAMETERS:
case PIPE_CAP_TGSI_PACK_HALF_FLOAT:
- case PIPE_CAP_MULTI_DRAW_INDIRECT:
- case PIPE_CAP_MULTI_DRAW_INDIRECT_PARAMS:
case PIPE_CAP_TGSI_FS_POSITION_IS_SYSVAL:
- case PIPE_CAP_TGSI_FS_FACE_IS_INTEGER_SYSVAL:
case PIPE_CAP_INVALIDATE_BUFFER:
case PIPE_CAP_GENERATE_MIPMAP:
case PIPE_CAP_STRING_MARKER:
case PIPE_CAP_BUFFER_SAMPLER_VIEW_RGBA_ONLY:
case PIPE_CAP_SURFACE_REINTERPRET_BLOCKS:
- case PIPE_CAP_QUERY_BUFFER_OBJECT:
case PIPE_CAP_QUERY_MEMORY_INFO:
case PIPE_CAP_PCI_GROUP:
case PIPE_CAP_PCI_BUS:
case PIPE_CAP_PCI_DEVICE:
case PIPE_CAP_PCI_FUNCTION:
- case PIPE_CAP_FRAMEBUFFER_NO_ATTACHMENT:
case PIPE_CAP_ROBUST_BUFFER_ACCESS_BEHAVIOR:
case PIPE_CAP_PRIMITIVE_RESTART_FOR_PATCHES:
- case PIPE_CAP_TGSI_VOTE:
case PIPE_CAP_MAX_WINDOW_RECTANGLES:
case PIPE_CAP_POLYGON_OFFSET_UNITS_UNSCALED:
case PIPE_CAP_VIEWPORT_SUBPIXEL_BITS:
@@ -364,7 +374,6 @@ llvmpipe_get_param(struct pipe_screen *screen, enum pipe_cap param)
case PIPE_CAP_BINDLESS_TEXTURE:
case PIPE_CAP_NIR_SAMPLERS_AS_DEREF:
case PIPE_CAP_MEMOBJ:
- case PIPE_CAP_LOAD_CONSTBUF:
case PIPE_CAP_TGSI_ANY_REG_AS_ADDRESS:
case PIPE_CAP_TILE_RASTER_ORDER:
case PIPE_CAP_MAX_COMBINED_SHADER_OUTPUT_RESOURCES:
@@ -373,7 +382,6 @@ llvmpipe_get_param(struct pipe_screen *screen, enum pipe_cap param)
case PIPE_CAP_CONTEXT_PRIORITY_MASK:
case PIPE_CAP_FENCE_SIGNAL:
case PIPE_CAP_CONSTBUF0_FLAGS:
- case PIPE_CAP_PACKED_UNIFORMS:
case PIPE_CAP_CONSERVATIVE_RASTER_POST_SNAP_TRIANGLES:
case PIPE_CAP_CONSERVATIVE_RASTER_POST_SNAP_POINTS_LINES:
case PIPE_CAP_CONSERVATIVE_RASTER_PRE_SNAP_TRIANGLES:
@@ -386,6 +394,16 @@ llvmpipe_get_param(struct pipe_screen *screen, enum pipe_cap param)
return 32;
case PIPE_CAP_MAX_SHADER_BUFFER_SIZE:
return LP_MAX_TGSI_SHADER_BUFFER_SIZE;
+ case PIPE_CAP_FRAMEBUFFER_NO_ATTACHMENT:
+ case PIPE_CAP_TGSI_TG4_COMPONENT_IN_SWIZZLE:
+ case PIPE_CAP_TGSI_FS_FACE_IS_INTEGER_SYSVAL:
+ return 1;
+ case PIPE_CAP_TGSI_VOTE:
+ case PIPE_CAP_LOAD_CONSTBUF:
+ case PIPE_CAP_PACKED_UNIFORMS: {
+ struct llvmpipe_screen *lscreen = llvmpipe_screen(screen);
+ return !lscreen->use_tgsi;
+ }
default:
return u_pipe_screen_get_param_defaults(screen, param);
}
@@ -396,15 +414,37 @@ llvmpipe_get_shader_param(struct pipe_screen *screen,
enum pipe_shader_type shader,
enum pipe_shader_cap param)
{
+ struct llvmpipe_screen *lscreen = llvmpipe_screen(screen);
switch(shader)
{
+ case PIPE_SHADER_COMPUTE:
+ if ((LP_DEBUG & DEBUG_CL) && param == PIPE_SHADER_CAP_SUPPORTED_IRS)
+ return (1 << PIPE_SHADER_IR_TGSI) | (1 << PIPE_SHADER_IR_NIR) | (1 << PIPE_SHADER_IR_NIR_SERIALIZED);
case PIPE_SHADER_FRAGMENT:
+ if (param == PIPE_SHADER_CAP_PREFERRED_IR) {
+ if (lscreen->use_tgsi)
+ return PIPE_SHADER_IR_TGSI;
+ else
+ return PIPE_SHADER_IR_NIR;
+ }
switch (param) {
default:
return gallivm_get_shader_param(param);
}
+ case PIPE_SHADER_TESS_CTRL:
+ case PIPE_SHADER_TESS_EVAL:
+ /* Tessellation shader needs llvm coroutines support */
+ if (!GALLIVM_HAVE_CORO || lscreen->use_tgsi)
+ return 0;
case PIPE_SHADER_VERTEX:
case PIPE_SHADER_GEOMETRY:
+ if (param == PIPE_SHADER_CAP_PREFERRED_IR) {
+ if (lscreen->use_tgsi)
+ return PIPE_SHADER_IR_TGSI;
+ else
+ return PIPE_SHADER_IR_NIR;
+ }
+
switch (param) {
case PIPE_SHADER_CAP_MAX_TEXTURE_SAMPLERS:
/* At this time, the draw module and llvmpipe driver only
@@ -439,7 +479,7 @@ llvmpipe_get_paramf(struct pipe_screen *screen, enum pipe_capf param)
case PIPE_CAPF_MAX_POINT_WIDTH:
/* fall-through */
case PIPE_CAPF_MAX_POINT_WIDTH_AA:
- return 255.0; /* arbitrary */
+ return LP_MAX_POINT_WIDTH; /* arbitrary */
case PIPE_CAPF_MAX_TEXTURE_ANISOTROPY:
return 16.0; /* not actually signficant at this time */
case PIPE_CAPF_MAX_TEXTURE_LOD_BIAS:
@@ -456,6 +496,156 @@ llvmpipe_get_paramf(struct pipe_screen *screen, enum pipe_capf param)
return 0.0;
}
+static int
+llvmpipe_get_compute_param(struct pipe_screen *_screen,
+ enum pipe_shader_ir ir_type,
+ enum pipe_compute_cap param,
+ void *ret)
+{
+ switch (param) {
+ case PIPE_COMPUTE_CAP_IR_TARGET:
+ return 0;
+ case PIPE_COMPUTE_CAP_MAX_GRID_SIZE:
+ if (ret) {
+ uint64_t *grid_size = ret;
+ grid_size[0] = 65535;
+ grid_size[1] = 65535;
+ grid_size[2] = 65535;
+ }
+ return 3 * sizeof(uint64_t) ;
+ case PIPE_COMPUTE_CAP_MAX_BLOCK_SIZE:
+ if (ret) {
+ uint64_t *block_size = ret;
+ block_size[0] = 1024;
+ block_size[1] = 1024;
+ block_size[2] = 1024;
+ }
+ return 3 * sizeof(uint64_t);
+ case PIPE_COMPUTE_CAP_MAX_THREADS_PER_BLOCK:
+ if (ret) {
+ uint64_t *max_threads_per_block = ret;
+ *max_threads_per_block = 1024;
+ }
+ return sizeof(uint64_t);
+ case PIPE_COMPUTE_CAP_MAX_LOCAL_SIZE:
+ if (ret) {
+ uint64_t *max_local_size = ret;
+ *max_local_size = 32768;
+ }
+ return sizeof(uint64_t);
+ case PIPE_COMPUTE_CAP_GRID_DIMENSION:
+ if (ret) {
+ uint32_t *grid_dim = ret;
+ *grid_dim = 3;
+ }
+ return sizeof(uint32_t);
+ case PIPE_COMPUTE_CAP_MAX_GLOBAL_SIZE:
+ if (ret) {
+ uint64_t *max_global_size = ret;
+ *max_global_size = (1ULL << 31);
+ }
+ return sizeof(uint64_t);
+ case PIPE_COMPUTE_CAP_MAX_MEM_ALLOC_SIZE:
+ if (ret) {
+ uint64_t *max_mem_alloc_size = ret;
+ *max_mem_alloc_size = (1ULL << 31);
+ }
+ return sizeof(uint64_t);
+ case PIPE_COMPUTE_CAP_MAX_PRIVATE_SIZE:
+ if (ret) {
+ uint64_t *max_private = ret;
+ *max_private = (1UL << 31);
+ }
+ return sizeof(uint64_t);
+ case PIPE_COMPUTE_CAP_MAX_INPUT_SIZE:
+ if (ret) {
+ uint64_t *max_input = ret;
+ *max_input = 4096;
+ }
+ return sizeof(uint64_t);
+ case PIPE_COMPUTE_CAP_IMAGES_SUPPORTED:
+ if (ret) {
+ uint32_t *images = ret;
+ *images = 0;
+ }
+ return sizeof(uint32_t);
+ case PIPE_COMPUTE_CAP_MAX_VARIABLE_THREADS_PER_BLOCK:
+ return 0;
+ case PIPE_COMPUTE_CAP_SUBGROUP_SIZE:
+ if (ret) {
+ uint32_t *subgroup_size = ret;
+ *subgroup_size = 32;
+ }
+ return sizeof(uint32_t);
+ case PIPE_COMPUTE_CAP_MAX_COMPUTE_UNITS:
+ if (ret) {
+ uint32_t *max_compute_units = ret;
+ *max_compute_units = 8;
+ }
+ return sizeof(uint32_t);
+ case PIPE_COMPUTE_CAP_MAX_CLOCK_FREQUENCY:
+ if (ret) {
+ uint32_t *max_clock_freq = ret;
+ *max_clock_freq = 300;
+ }
+ return sizeof(uint32_t);
+ case PIPE_COMPUTE_CAP_ADDRESS_BITS:
+ if (ret) {
+ uint32_t *address_bits = ret;
+ *address_bits = 64;
+ }
+ return sizeof(uint32_t);
+ }
+ return 0;
+}
+
+static const struct nir_shader_compiler_options gallivm_nir_options = {
+ .lower_scmp = true,
+ .lower_flrp32 = true,
+ .lower_flrp64 = true,
+ .lower_fsat = true,
+ .lower_bitfield_insert_to_shifts = true,
+ .lower_bitfield_extract_to_shifts = true,
+ .lower_sub = true,
+ .lower_ffma = true,
+ .lower_fmod = true,
+ .lower_hadd = true,
+ .lower_add_sat = true,
+ .lower_pack_snorm_2x16 = true,
+ .lower_pack_snorm_4x8 = true,
+ .lower_pack_unorm_2x16 = true,
+ .lower_pack_unorm_4x8 = true,
+ .lower_unpack_snorm_2x16 = true,
+ .lower_unpack_snorm_4x8 = true,
+ .lower_unpack_unorm_2x16 = true,
+ .lower_unpack_unorm_4x8 = true,
+ .lower_extract_byte = true,
+ .lower_extract_word = true,
+ .lower_rotate = true,
+ .lower_ifind_msb = true,
+ .optimize_sample_mask_in = true,
+ .max_unroll_iterations = 32,
+ .use_interpolated_input_intrinsics = true,
+ .lower_to_scalar = true,
+};
+
+static void
+llvmpipe_finalize_nir(struct pipe_screen *screen,
+ void *nirptr,
+ bool optimize)
+{
+ struct nir_shader *nir = (struct nir_shader *)nirptr;
+ lp_build_opt_nir(nir);
+}
+
+static inline const void *
+llvmpipe_get_compiler_options(struct pipe_screen *screen,
+ enum pipe_shader_ir ir,
+ enum pipe_shader_type shader)
+{
+ assert(ir == PIPE_SHADER_IR_NIR);
+ return &gallivm_nir_options;
+}
/**
* Query format support for creating a texture, drawing surface, etc.
@@ -544,15 +734,11 @@ llvmpipe_is_format_supported( struct pipe_screen *_screen,
if (format_desc->colorspace != UTIL_FORMAT_COLORSPACE_ZS)
return false;
-
- /* TODO: Support stencil-only formats */
- if (format_desc->swizzle[0] == PIPE_SWIZZLE_NONE) {
- return false;
- }
}
if (format_desc->layout == UTIL_FORMAT_LAYOUT_ASTC ||
- format_desc->layout == UTIL_FORMAT_LAYOUT_ATC) {
+ format_desc->layout == UTIL_FORMAT_LAYOUT_ATC ||
+ format_desc->layout == UTIL_FORMAT_LAYOUT_FXT1) {
/* Software decoding is not hooked up. */
return false;
}
@@ -594,6 +780,9 @@ llvmpipe_destroy_screen( struct pipe_screen *_screen )
struct llvmpipe_screen *screen = llvmpipe_screen(_screen);
struct sw_winsys *winsys = screen->winsys;
+ if (screen->cs_tpool)
+ lp_cs_tpool_destroy(screen->cs_tpool);
+
if (screen->rast)
lp_rast_destroy(screen->rast);
@@ -602,8 +791,10 @@ llvmpipe_destroy_screen( struct pipe_screen *_screen )
if(winsys->destroy)
winsys->destroy(winsys);
- mtx_destroy(&screen->rast_mutex);
+ glsl_type_singleton_decref();
+ mtx_destroy(&screen->rast_mutex);
+ mtx_destroy(&screen->cs_mutex);
FREE(screen);
}
@@ -665,6 +856,8 @@ llvmpipe_create_screen(struct sw_winsys *winsys)
util_cpu_detect();
+ glsl_type_singleton_init_or_ref();
+
#ifdef DEBUG
LP_DEBUG = debug_get_flags_option("LP_DEBUG", lp_debug_flags, 0 );
#endif
@@ -689,7 +882,9 @@ llvmpipe_create_screen(struct sw_winsys *winsys)
screen->base.get_device_vendor = llvmpipe_get_vendor; // TODO should be the CPU vendor
screen->base.get_param = llvmpipe_get_param;
screen->base.get_shader_param = llvmpipe_get_shader_param;
+ screen->base.get_compute_param = llvmpipe_get_compute_param;
screen->base.get_paramf = llvmpipe_get_paramf;
+ screen->base.get_compiler_options = llvmpipe_get_compiler_options;
screen->base.is_format_supported = llvmpipe_is_format_supported;
screen->base.context_create = llvmpipe_create_context;
@@ -699,8 +894,10 @@ llvmpipe_create_screen(struct sw_winsys *winsys)
screen->base.get_timestamp = llvmpipe_get_timestamp;
+ screen->base.finalize_nir = llvmpipe_finalize_nir;
llvmpipe_init_screen_resource_funcs(&screen->base);
+ screen->use_tgsi = (LP_DEBUG & DEBUG_TGSI_IR);
screen->num_threads = util_cpu_caps.nr_cpus > 1 ? util_cpu_caps.nr_cpus : 0;
#ifdef EMBEDDED_DEVICE
screen->num_threads = 0;
@@ -716,5 +913,14 @@ llvmpipe_create_screen(struct sw_winsys *winsys)
}
(void) mtx_init(&screen->rast_mutex, mtx_plain);
+ screen->cs_tpool = lp_cs_tpool_create(screen->num_threads);
+ if (!screen->cs_tpool) {
+ lp_rast_destroy(screen->rast);
+ lp_jit_screen_cleanup(screen);
+ FREE(screen);
+ return NULL;
+ }
+ (void) mtx_init(&screen->cs_mutex, mtx_plain);
+
return &screen->base;
}
diff --git a/lib/mesa/src/gallium/drivers/llvmpipe/lp_screen.h b/lib/mesa/src/gallium/drivers/llvmpipe/lp_screen.h
index da702ad77..7c57f3ec1 100644
--- a/lib/mesa/src/gallium/drivers/llvmpipe/lp_screen.h
+++ b/lib/mesa/src/gallium/drivers/llvmpipe/lp_screen.h
@@ -41,7 +41,7 @@
struct sw_winsys;
-
+struct lp_cs_tpool;
struct llvmpipe_screen
{
@@ -57,6 +57,11 @@ struct llvmpipe_screen
struct lp_rasterizer *rast;
mtx_t rast_mutex;
+
+ struct lp_cs_tpool *cs_tpool;
+ mtx_t cs_mutex;
+
+ bool use_tgsi;
};
diff --git a/lib/mesa/src/gallium/drivers/llvmpipe/lp_setup.c b/lib/mesa/src/gallium/drivers/llvmpipe/lp_setup.c
index a3c9960bc..583c0bdba 100644
--- a/lib/mesa/src/gallium/drivers/llvmpipe/lp_setup.c
+++ b/lib/mesa/src/gallium/drivers/llvmpipe/lp_setup.c
@@ -409,23 +409,7 @@ lp_setup_try_clear_color_buffer(struct lp_setup_context *setup,
LP_DBG(DEBUG_SETUP, "%s state %d\n", __FUNCTION__, setup->state);
- if (util_format_is_pure_integer(format)) {
- /*
- * We expect int/uint clear values here, though some APIs
- * might disagree (but in any case util_pack_color()
- * couldn't handle it)...
- */
- if (util_format_is_pure_sint(format)) {
- util_format_write_4i(format, color->i, 0, &uc, 0, 0, 0, 1, 1);
- }
- else {
- assert(util_format_is_pure_uint(format));
- util_format_write_4ui(format, color->ui, 0, &uc, 0, 0, 0, 1, 1);
- }
- }
- else {
- util_pack_color(color->f, format, &uc);
- }
+ util_pack_color_union(format, &uc, color);
if (setup->state == SETUP_ACTIVE) {
struct lp_scene *scene = setup->scene;
@@ -684,6 +668,77 @@ lp_setup_set_fs_ssbos(struct lp_setup_context *setup,
setup->dirty |= LP_SETUP_NEW_SSBOS;
}
+void
+lp_setup_set_fs_images(struct lp_setup_context *setup,
+ unsigned num,
+ struct pipe_image_view *images)
+{
+ unsigned i;
+
+ LP_DBG(DEBUG_SETUP, "%s %p\n", __FUNCTION__, (void *) images);
+
+ assert(num <= ARRAY_SIZE(setup->images));
+
+ for (i = 0; i < num; ++i) {
+ struct pipe_image_view *image = &images[i];
+ util_copy_image_view(&setup->images[i].current, &images[i]);
+
+ struct pipe_resource *res = image->resource;
+ struct llvmpipe_resource *lp_res = llvmpipe_resource(res);
+ struct lp_jit_image *jit_image;
+
+ jit_image = &setup->fs.current.jit_context.images[i];
+ if (!lp_res)
+ continue;
+ if (!lp_res->dt) {
+ /* regular texture - setup array of mipmap level offsets */
+ if (llvmpipe_resource_is_texture(res)) {
+ jit_image->base = lp_res->tex_data;
+ } else
+ jit_image->base = lp_res->data;
+
+ jit_image->width = res->width0;
+ jit_image->height = res->height0;
+ jit_image->depth = res->depth0;
+
+ if (llvmpipe_resource_is_texture(res)) {
+ uint32_t mip_offset = lp_res->mip_offsets[image->u.tex.level];
+
+ jit_image->width = u_minify(jit_image->width, image->u.tex.level);
+ jit_image->height = u_minify(jit_image->height, image->u.tex.level);
+
+ if (res->target == PIPE_TEXTURE_1D_ARRAY ||
+ res->target == PIPE_TEXTURE_2D_ARRAY ||
+ res->target == PIPE_TEXTURE_3D ||
+ res->target == PIPE_TEXTURE_CUBE ||
+ res->target == PIPE_TEXTURE_CUBE_ARRAY) {
+ /*
+ * For array textures, we don't have first_layer, instead
+ * adjust last_layer (stored as depth) plus the mip level offsets
+ * (as we have mip-first layout can't just adjust base ptr).
+ * XXX For mip levels, could do something similar.
+ */
+ jit_image->depth = image->u.tex.last_layer - image->u.tex.first_layer + 1;
+ mip_offset += image->u.tex.first_layer * lp_res->img_stride[image->u.tex.level];
+ } else
+ jit_image->depth = u_minify(jit_image->depth, image->u.tex.level);
+
+ jit_image->row_stride = lp_res->row_stride[image->u.tex.level];
+ jit_image->img_stride = lp_res->img_stride[image->u.tex.level];
+ jit_image->base = (uint8_t *)jit_image->base + mip_offset;
+ }
+ else {
+ unsigned view_blocksize = util_format_get_blocksize(image->format);
+ jit_image->width = image->u.buf.size / view_blocksize;
+ jit_image->base = (uint8_t *)jit_image->base + image->u.buf.offset;
+ }
+ }
+ }
+ for (; i < ARRAY_SIZE(setup->images); i++) {
+ util_copy_image_view(&setup->images[i].current, NULL);
+ }
+ setup->dirty |= LP_SETUP_NEW_IMAGES;
+}
void
lp_setup_set_alpha_ref_value( struct lp_setup_context *setup,
@@ -1017,6 +1072,11 @@ lp_setup_is_resource_referenced( const struct lp_setup_context *setup,
return LP_REFERENCED_FOR_READ | LP_REFERENCED_FOR_WRITE;
}
+ for (i = 0; i < ARRAY_SIZE(setup->images); i++) {
+ if (setup->images[i].current.resource == texture)
+ return LP_REFERENCED_FOR_READ | LP_REFERENCED_FOR_WRITE;
+ }
+
return LP_UNREFERENCED;
}
@@ -1154,7 +1214,7 @@ try_update_scene_state( struct lp_setup_context *setup )
}
num_constants =
- setup->constants[i].stored_size / (sizeof(float) * 4);
+ DIV_ROUND_UP(setup->constants[i].stored_size, (sizeof(float) * 4));
setup->fs.current.jit_context.num_constants[i] = num_constants;
setup->dirty |= LP_SETUP_NEW_FS;
}
diff --git a/lib/mesa/src/gallium/drivers/llvmpipe/lp_setup_context.h b/lib/mesa/src/gallium/drivers/llvmpipe/lp_setup_context.h
index 9c8dde5b6..701dcadfd 100644
--- a/lib/mesa/src/gallium/drivers/llvmpipe/lp_setup_context.h
+++ b/lib/mesa/src/gallium/drivers/llvmpipe/lp_setup_context.h
@@ -50,6 +50,7 @@
#define LP_SETUP_NEW_SCISSOR 0x08
#define LP_SETUP_NEW_VIEWPORTS 0x10
#define LP_SETUP_NEW_SSBOS 0x20
+#define LP_SETUP_NEW_IMAGES 0x40
struct lp_setup_variant;
@@ -149,6 +150,10 @@ struct lp_setup_context
} ssbos[LP_MAX_TGSI_SHADER_BUFFERS];
struct {
+ struct pipe_image_view current;
+ } images[LP_MAX_TGSI_SHADER_IMAGES];
+
+ struct {
struct pipe_blend_color current;
uint8_t *stored;
} blend_color;
diff --git a/lib/mesa/src/gallium/drivers/llvmpipe/lp_setup_line.c b/lib/mesa/src/gallium/drivers/llvmpipe/lp_setup_line.c
index c1d8237a8..1357d026d 100644
--- a/lib/mesa/src/gallium/drivers/llvmpipe/lp_setup_line.c
+++ b/lib/mesa/src/gallium/drivers/llvmpipe/lp_setup_line.c
@@ -320,6 +320,10 @@ try_setup_line( struct lp_setup_context *setup,
boolean will_draw_start;
boolean will_draw_end;
+ if (lp_context->active_statistics_queries) {
+ lp_context->pipeline_statistics.c_primitives++;
+ }
+
if (0)
print_line(setup, v1, v2);
@@ -357,10 +361,10 @@ try_setup_line( struct lp_setup_context *setup,
if (fabsf(dx) >= fabsf(dy)) {
float dydx = dy / dx;
- x1diff = v1[0][0] - (float) floor(v1[0][0]) - 0.5;
- y1diff = v1[0][1] - (float) floor(v1[0][1]) - 0.5;
- x2diff = v2[0][0] - (float) floor(v2[0][0]) - 0.5;
- y2diff = v2[0][1] - (float) floor(v2[0][1]) - 0.5;
+ x1diff = v1[0][0] - floorf(v1[0][0]) - 0.5f;
+ y1diff = v1[0][1] - floorf(v1[0][1]) - 0.5f;
+ x2diff = v2[0][0] - floorf(v2[0][0]) - 0.5f;
+ y2diff = v2[0][1] - floorf(v2[0][1]) - 0.5f;
if (y2diff==-0.5 && dy<0){
y2diff = 0.5;
@@ -455,10 +459,10 @@ try_setup_line( struct lp_setup_context *setup,
const float dxdy = dx / dy;
/* Y-MAJOR LINE */
- x1diff = v1[0][0] - (float) floor(v1[0][0]) - 0.5;
- y1diff = v1[0][1] - (float) floor(v1[0][1]) - 0.5;
- x2diff = v2[0][0] - (float) floor(v2[0][0]) - 0.5;
- y2diff = v2[0][1] - (float) floor(v2[0][1]) - 0.5;
+ x1diff = v1[0][0] - floorf(v1[0][0]) - 0.5f;
+ y1diff = v1[0][1] - floorf(v1[0][1]) - 0.5f;
+ x2diff = v2[0][0] - floorf(v2[0][0]) - 0.5f;
+ y2diff = v2[0][1] - floorf(v2[0][1]) - 0.5f;
if (x2diff==-0.5 && dx<0) {
x2diff = 0.5;
@@ -616,10 +620,6 @@ try_setup_line( struct lp_setup_context *setup,
LP_COUNT(nr_tris);
- if (lp_context->active_statistics_queries) {
- lp_context->pipeline_statistics.c_primitives++;
- }
-
/* calculate the deltas */
plane = GET_PLANES(line);
plane[0].dcdy = x[0] - x[1];
@@ -724,7 +724,7 @@ try_setup_line( struct lp_setup_context *setup,
struct lp_rast_plane *plane_s = &plane[4];
if (s_planes[0]) {
- plane_s->dcdx = -1 << 8;
+ plane_s->dcdx = ~0U << 8;
plane_s->dcdy = 0;
plane_s->c = (1-scissor->x0) << 8;
plane_s->eo = 1 << 8;
@@ -746,7 +746,7 @@ try_setup_line( struct lp_setup_context *setup,
}
if (s_planes[3]) {
plane_s->dcdx = 0;
- plane_s->dcdy = -1 << 8;
+ plane_s->dcdy = ~0U << 8;
plane_s->c = (scissor->y1+1) << 8;
plane_s->eo = 0;
plane_s++;
diff --git a/lib/mesa/src/gallium/drivers/llvmpipe/lp_setup_point.c b/lib/mesa/src/gallium/drivers/llvmpipe/lp_setup_point.c
index fc1d5ef6e..fe0de06d1 100644
--- a/lib/mesa/src/gallium/drivers/llvmpipe/lp_setup_point.c
+++ b/lib/mesa/src/gallium/drivers/llvmpipe/lp_setup_point.c
@@ -224,10 +224,10 @@ setup_point_coefficients( struct lp_setup_context *setup,
boolean perspective = !!(interp == LP_INTERP_PERSPECTIVE);
unsigned i;
- if (perspective & usage_mask) {
+ if (perspective && usage_mask) {
fragcoord_usage_mask |= TGSI_WRITEMASK_W;
}
-
+
switch (interp) {
case LP_INTERP_POSITION:
/*
@@ -241,27 +241,35 @@ setup_point_coefficients( struct lp_setup_context *setup,
case LP_INTERP_LINEAR:
/* Sprite tex coords may use linear interpolation someday */
/* fall-through */
- case LP_INTERP_PERSPECTIVE:
+ case LP_INTERP_PERSPECTIVE: {
/* check if the sprite coord flag is set for this attribute.
* If so, set it up so it up so x and y vary from 0 to 1.
*/
- if (shader->info.base.input_semantic_name[slot] == TGSI_SEMANTIC_GENERIC) {
+ bool do_texcoord_coef = false;
+ if (shader->info.base.input_semantic_name[slot] == TGSI_SEMANTIC_PCOORD) {
+ do_texcoord_coef = true;
+ }
+ else if (shader->info.base.input_semantic_name[slot] == TGSI_SEMANTIC_TEXCOORD) {
unsigned semantic_index = shader->info.base.input_semantic_index[slot];
/* Note that sprite_coord enable is a bitfield of
* PIPE_MAX_SHADER_OUTPUTS bits.
*/
if (semantic_index < PIPE_MAX_SHADER_OUTPUTS &&
(setup->sprite_coord_enable & (1u << semantic_index))) {
- for (i = 0; i < NUM_CHANNELS; i++) {
- if (usage_mask & (1 << i)) {
- texcoord_coef(setup, info, slot + 1, i,
- setup->sprite_coord_origin,
- perspective);
- }
+ do_texcoord_coef = true;
+ }
+ }
+ if (do_texcoord_coef) {
+ for (i = 0; i < NUM_CHANNELS; i++) {
+ if (usage_mask & (1 << i)) {
+ texcoord_coef(setup, info, slot + 1, i,
+ setup->sprite_coord_origin,
+ perspective);
}
- break;
}
+ break;
}
+ }
/* fall-through */
case LP_INTERP_CONSTANT:
for (i = 0; i < NUM_CHANNELS; i++) {
@@ -329,10 +337,13 @@ try_setup_point( struct lp_setup_context *setup,
/* x/y positions in fixed point */
const struct lp_setup_variant_key *key = &setup->setup.variant->key;
const int sizeAttr = setup->psize_slot;
- const float size
+ float size
= (setup->point_size_per_vertex && sizeAttr > 0) ? v0[sizeAttr][0]
: setup->point_size;
+ if (size > LP_MAX_POINT_WIDTH)
+ size = LP_MAX_POINT_WIDTH;
+
/* Yes this is necessary to accurately calculate bounding boxes
* with the two fill-conventions we support. GL (normally) ends
* up needing a bottom-left fill convention, which requires
@@ -491,7 +502,7 @@ try_setup_point( struct lp_setup_context *setup,
{
struct lp_rast_plane *plane = GET_PLANES(point);
- plane[0].dcdx = -1 << 8;
+ plane[0].dcdx = ~0U << 8;
plane[0].dcdy = 0;
plane[0].c = (1-bbox.x0) << 8;
plane[0].eo = 1 << 8;
@@ -507,7 +518,7 @@ try_setup_point( struct lp_setup_context *setup,
plane[2].eo = 1 << 8;
plane[3].dcdx = 0;
- plane[3].dcdy = -1 << 8;
+ plane[3].dcdy = ~0U << 8;
plane[3].c = (bbox.y1+1) << 8;
plane[3].eo = 0;
}
diff --git a/lib/mesa/src/gallium/drivers/llvmpipe/lp_setup_tri.c b/lib/mesa/src/gallium/drivers/llvmpipe/lp_setup_tri.c
index 1852ec05d..93fbe429d 100644
--- a/lib/mesa/src/gallium/drivers/llvmpipe/lp_setup_tri.c
+++ b/lib/mesa/src/gallium/drivers/llvmpipe/lp_setup_tri.c
@@ -46,7 +46,7 @@
#if defined(PIPE_ARCH_SSE)
#include <emmintrin.h>
-#elif defined(_ARCH_PWR8) && defined(PIPE_ARCH_LITTLE_ENDIAN)
+#elif defined(_ARCH_PWR8) && UTIL_ARCH_LITTLE_ENDIAN
#include <altivec.h>
#include "util/u_pwr8.h"
#endif
@@ -273,7 +273,7 @@ do_triangle_ccw(struct lp_setup_context *setup,
const struct lp_setup_variant_key *key = &setup->setup.variant->key;
struct lp_rast_triangle *tri;
struct lp_rast_plane *plane;
- const struct u_rect *scissor;
+ const struct u_rect *scissor = NULL;
struct u_rect bbox, bboxpos;
boolean s_planes[4];
unsigned tri_bytes;
@@ -489,7 +489,7 @@ do_triangle_ccw(struct lp_setup_context *setup,
eo = _mm_shuffle_epi32(eo, _MM_SHUFFLE(0,0,0,2));
plane[2].eo = (uint32_t)_mm_cvtsi128_si32(eo);
} else
-#elif defined(_ARCH_PWR8) && defined(PIPE_ARCH_LITTLE_ENDIAN)
+#elif defined(_ARCH_PWR8) && UTIL_ARCH_LITTLE_ENDIAN
/*
* XXX this code is effectively disabled for all practical purposes,
* as the allowed fb size is tiny if FIXED_ORDER is 8.
@@ -513,7 +513,7 @@ do_triangle_ccw(struct lp_setup_context *setup,
__m128i zero = vec_splats((unsigned char) 0);
PIPE_ALIGN_VAR(16) int32_t temp_vec[4];
-#ifdef PIPE_ARCH_LITTLE_ENDIAN
+#if UTIL_ARCH_LITTLE_ENDIAN
vshuf_mask.i[0] = 0x07060504;
vshuf_mask.i[1] = 0x0B0A0908;
vshuf_mask.i[2] = 0x03020100;
@@ -687,7 +687,7 @@ do_triangle_ccw(struct lp_setup_context *setup,
struct lp_rast_plane *plane_s = &plane[3];
if (s_planes[0]) {
- plane_s->dcdx = -1 << 8;
+ plane_s->dcdx = ~0U << 8;
plane_s->dcdy = 0;
plane_s->c = (1-scissor->x0) << 8;
plane_s->eo = 1 << 8;
@@ -709,7 +709,7 @@ do_triangle_ccw(struct lp_setup_context *setup,
}
if (s_planes[3]) {
plane_s->dcdx = 0;
- plane_s->dcdy = -1 << 8;
+ plane_s->dcdy = ~0U << 8;
plane_s->c = (scissor->y1+1) << 8;
plane_s->eo = 0;
plane_s++;
diff --git a/lib/mesa/src/gallium/drivers/llvmpipe/lp_state_derived.c b/lib/mesa/src/gallium/drivers/llvmpipe/lp_state_derived.c
index f93bc434c..9fe0ddf1f 100644
--- a/lib/mesa/src/gallium/drivers/llvmpipe/lp_state_derived.c
+++ b/lib/mesa/src/gallium/drivers/llvmpipe/lp_state_derived.c
@@ -195,6 +195,8 @@ void llvmpipe_update_derived( struct llvmpipe_context *llvmpipe )
if (llvmpipe->dirty & (LP_NEW_RASTERIZER |
LP_NEW_FS |
LP_NEW_GS |
+ LP_NEW_TCS |
+ LP_NEW_TES |
LP_NEW_VS))
compute_vertex_info(llvmpipe);
@@ -260,6 +262,11 @@ void llvmpipe_update_derived( struct llvmpipe_context *llvmpipe )
ARRAY_SIZE(llvmpipe->ssbos[PIPE_SHADER_FRAGMENT]),
llvmpipe->ssbos[PIPE_SHADER_FRAGMENT]);
+ if (llvmpipe->dirty & LP_NEW_FS_IMAGES)
+ lp_setup_set_fs_images(llvmpipe->setup,
+ ARRAY_SIZE(llvmpipe->images[PIPE_SHADER_FRAGMENT]),
+ llvmpipe->images[PIPE_SHADER_FRAGMENT]);
+
if (llvmpipe->dirty & (LP_NEW_SAMPLER_VIEW))
lp_setup_set_fragment_sampler_views(llvmpipe->setup,
llvmpipe->num_sampler_views[PIPE_SHADER_FRAGMENT],
diff --git a/lib/mesa/src/gallium/drivers/llvmpipe/lp_state_fs.c b/lib/mesa/src/gallium/drivers/llvmpipe/lp_state_fs.c
index 101877ded..8826d499b 100644
--- a/lib/mesa/src/gallium/drivers/llvmpipe/lp_state_fs.c
+++ b/lib/mesa/src/gallium/drivers/llvmpipe/lp_state_fs.c
@@ -62,7 +62,7 @@
#include "util/u_inlines.h"
#include "util/u_memory.h"
#include "util/u_pointer.h"
-#include "util/u_format.h"
+#include "util/format/u_format.h"
#include "util/u_dump.h"
#include "util/u_string.h"
#include "util/simple_list.h"
@@ -80,6 +80,7 @@
#include "gallivm/lp_bld_intr.h"
#include "gallivm/lp_bld_logic.h"
#include "gallivm/lp_bld_tgsi.h"
+#include "gallivm/lp_bld_nir.h"
#include "gallivm/lp_bld_swizzle.h"
#include "gallivm/lp_bld_flow.h"
#include "gallivm/lp_bld_debug.h"
@@ -102,7 +103,7 @@
#include "lp_flush.h"
#include "lp_state_fs.h"
#include "lp_rast.h"
-
+#include "nir/nir_to_tgsi_info.h"
/** Fragment shader number (for debugging) */
static unsigned fs_no = 0;
@@ -300,6 +301,7 @@ generate_fs_loop(struct gallivm_state *gallivm,
LLVMValueRef num_loop,
struct lp_build_interp_soa_context *interp,
const struct lp_build_sampler_soa *sampler,
+ const struct lp_build_image_soa *image,
LLVMValueRef mask_store,
LLVMValueRef (*out_color)[4],
LLVMValueRef depth_ptr,
@@ -340,14 +342,22 @@ generate_fs_loop(struct gallivm_state *gallivm,
memset(&system_values, 0, sizeof(system_values));
+ /* truncate then sign extend. */
+ system_values.front_facing = LLVMBuildTrunc(gallivm->builder, facing, LLVMInt1TypeInContext(gallivm->context), "");
+ system_values.front_facing = LLVMBuildSExt(gallivm->builder, system_values.front_facing, LLVMInt32TypeInContext(gallivm->context), "");
+
if (key->depth.enabled ||
key->stencil[0].enabled) {
zs_format_desc = util_format_description(key->zsbuf_format);
assert(zs_format_desc);
- if (!shader->info.base.writes_z && !shader->info.base.writes_stencil) {
- if (key->alpha.enabled ||
+ if (shader->info.base.properties[TGSI_PROPERTY_FS_EARLY_DEPTH_STENCIL])
+ depth_mode = EARLY_DEPTH_TEST | EARLY_DEPTH_WRITE;
+ else if (!shader->info.base.writes_z && !shader->info.base.writes_stencil) {
+ if (shader->info.base.writes_memory)
+ depth_mode = LATE_DEPTH_TEST | LATE_DEPTH_WRITE;
+ else if (key->alpha.enabled ||
key->blend.alpha_to_coverage ||
shader->info.base.uses_kill ||
shader->info.base.writes_samplemask) {
@@ -493,10 +503,15 @@ generate_fs_loop(struct gallivm_state *gallivm,
params.info = &shader->info.base;
params.ssbo_ptr = ssbo_ptr;
params.ssbo_sizes_ptr = num_ssbo_ptr;
+ params.image = image;
/* Build the actual shader */
- lp_build_tgsi_soa(gallivm, tokens, &params,
- outputs);
+ if (shader->base.type == PIPE_SHADER_IR_TGSI)
+ lp_build_tgsi_soa(gallivm, tokens, &params,
+ outputs);
+ else
+ lp_build_nir_soa(gallivm, shader->base.ir.nir, &params,
+ outputs);
/* Alpha test */
if (key->alpha.enabled) {
@@ -1393,7 +1408,7 @@ convert_to_blend_type(struct gallivm_state *gallivm,
for (j = 0; j < src_fmt->nr_channels; ++j) {
unsigned mask = 0;
unsigned sa = src_fmt->channel[j].shift;
-#ifdef PIPE_ARCH_LITTLE_ENDIAN
+#if UTIL_ARCH_LITTLE_ENDIAN
unsigned from_lsb = j;
#else
unsigned from_lsb = src_fmt->nr_channels - j - 1;
@@ -1575,7 +1590,8 @@ convert_from_blend_type(struct gallivm_state *gallivm,
for (j = 0; j < src_fmt->nr_channels; ++j) {
unsigned mask = 0;
unsigned sa = src_fmt->channel[j].shift;
-#ifdef PIPE_ARCH_LITTLE_ENDIAN
+ unsigned sz_a = src_fmt->channel[j].size;
+#if UTIL_ARCH_LITTLE_ENDIAN
unsigned from_lsb = j;
#else
unsigned from_lsb = src_fmt->nr_channels - j - 1;
@@ -1603,6 +1619,10 @@ convert_from_blend_type(struct gallivm_state *gallivm,
if (src_type.norm) {
chans[j] = scale_bits(gallivm, blend_type.width,
src_fmt->channel[j].size, chans[j], src_type);
+ } else if (!src_type.floating && sz_a < blend_type.width) {
+ LLVMValueRef mask_val = lp_build_const_int_vec(gallivm, src_type, (1UL << sz_a) - 1);
+ LLVMValueRef mask = LLVMBuildICmp(builder, LLVMIntUGT, chans[j], mask_val, "");
+ chans[j] = LLVMBuildSelect(builder, mask, mask_val, chans[j], "");
}
/* Insert bits */
@@ -2420,7 +2440,7 @@ generate_fragment(struct llvmpipe_context *lp,
unsigned partial_mask)
{
struct gallivm_state *gallivm = variant->gallivm;
- const struct lp_fragment_shader_variant_key *key = &variant->key;
+ struct lp_fragment_shader_variant_key *key = &variant->key;
struct lp_shader_input inputs[PIPE_MAX_SHADER_INPUTS];
char func_name[64];
struct lp_type fs_type;
@@ -2446,6 +2466,7 @@ generate_fragment(struct llvmpipe_context *lp,
LLVMBasicBlockRef block;
LLVMBuilderRef builder;
struct lp_build_sampler_soa *sampler;
+ struct lp_build_image_soa *image;
struct lp_build_interp_soa_context interp;
LLVMValueRef fs_mask[16 / 4];
LLVMValueRef fs_out_color[PIPE_MAX_COLOR_BUFS][TGSI_NUM_CHANNELS][16 / 4];
@@ -2591,7 +2612,8 @@ generate_fragment(struct llvmpipe_context *lp,
}
/* code generated texture sampling */
- sampler = lp_llvm_sampler_soa_create(key->state);
+ sampler = lp_llvm_sampler_soa_create(key->samplers);
+ image = lp_llvm_image_soa_create(lp_fs_variant_key_images(key));
num_fs = 16 / fs_type.length; /* number of loops per 4x4 stamp */
/* for 1d resources only run "upper half" of stamp */
@@ -2646,6 +2668,7 @@ generate_fragment(struct llvmpipe_context *lp,
num_loop,
&interp,
sampler,
+ image,
mask_store, /* output */
color_store,
depth_ptr,
@@ -2680,7 +2703,7 @@ generate_fragment(struct llvmpipe_context *lp,
}
sampler->destroy(sampler);
-
+ image->destroy(image);
/* Loop over color outputs / color buffers to do blending.
*/
for(cbuf = 0; cbuf < key->nr_cbufs; cbuf++) {
@@ -2720,7 +2743,7 @@ generate_fragment(struct llvmpipe_context *lp,
static void
-dump_fs_variant_key(const struct lp_fragment_shader_variant_key *key)
+dump_fs_variant_key(struct lp_fragment_shader_variant_key *key)
{
unsigned i;
@@ -2775,7 +2798,7 @@ dump_fs_variant_key(const struct lp_fragment_shader_variant_key *key)
debug_printf("blend.alpha_to_coverage is enabled\n");
}
for (i = 0; i < key->nr_samplers; ++i) {
- const struct lp_static_sampler_state *sampler = &key->state[i].sampler_state;
+ const struct lp_static_sampler_state *sampler = &key->samplers[i].sampler_state;
debug_printf("sampler[%u] = \n", i);
debug_printf(" .wrap = %s %s %s\n",
util_str_tex_wrap(sampler->wrap_s, TRUE),
@@ -2796,7 +2819,7 @@ dump_fs_variant_key(const struct lp_fragment_shader_variant_key *key)
debug_printf(" .apply_max_lod = %u\n", sampler->apply_max_lod);
}
for (i = 0; i < key->nr_sampler_views; ++i) {
- const struct lp_static_texture_state *texture = &key->state[i].texture_state;
+ const struct lp_static_texture_state *texture = &key->samplers[i].texture_state;
debug_printf("texture[%u] = \n", i);
debug_printf(" .format = %s\n",
util_format_name(texture->format));
@@ -2809,15 +2832,33 @@ dump_fs_variant_key(const struct lp_fragment_shader_variant_key *key)
texture->pot_height,
texture->pot_depth);
}
+ struct lp_image_static_state *images = lp_fs_variant_key_images(key);
+ for (i = 0; i < key->nr_images; ++i) {
+ const struct lp_static_texture_state *image = &images[i].image_state;
+ debug_printf("image[%u] = \n", i);
+ debug_printf(" .format = %s\n",
+ util_format_name(image->format));
+ debug_printf(" .target = %s\n",
+ util_str_tex_target(image->target, TRUE));
+ debug_printf(" .level_zero_only = %u\n",
+ image->level_zero_only);
+ debug_printf(" .pot = %u %u %u\n",
+ image->pot_width,
+ image->pot_height,
+ image->pot_depth);
+ }
}
void
-lp_debug_fs_variant(const struct lp_fragment_shader_variant *variant)
+lp_debug_fs_variant(struct lp_fragment_shader_variant *variant)
{
- debug_printf("llvmpipe: Fragment shader #%u variant #%u:\n",
+ debug_printf("llvmpipe: Fragment shader #%u variant #%u:\n",
variant->shader->no, variant->no);
- tgsi_dump(variant->shader->base.tokens, 0);
+ if (variant->shader->base.type == PIPE_SHADER_IR_TGSI)
+ tgsi_dump(variant->shader->base.tokens, 0);
+ else
+ nir_print_shader(variant->shader->base.ir.nir, stderr);
dump_fs_variant_key(&variant->key);
debug_printf("variant->opaque = %u\n", variant->opaque);
debug_printf("\n");
@@ -2838,10 +2879,11 @@ generate_variant(struct llvmpipe_context *lp,
boolean fullcolormask;
char module_name[64];
- variant = CALLOC_STRUCT(lp_fragment_shader_variant);
+ variant = MALLOC(sizeof *variant + shader->variant_key_size - sizeof variant->key);
if (!variant)
return NULL;
+ memset(variant, 0, sizeof(*variant));
snprintf(module_name, sizeof(module_name), "fs%u_variant%u",
shader->no, shader->variants_created);
@@ -2931,6 +2973,7 @@ llvmpipe_create_fs_state(struct pipe_context *pipe,
struct lp_fragment_shader *shader;
int nr_samplers;
int nr_sampler_views;
+ int nr_images;
int i;
shader = CALLOC_STRUCT(lp_fragment_shader);
@@ -2940,11 +2983,17 @@ llvmpipe_create_fs_state(struct pipe_context *pipe,
shader->no = fs_no++;
make_empty_list(&shader->variants);
- /* get/save the summary info for this shader */
- lp_build_tgsi_info(templ->tokens, &shader->info);
+ shader->base.type = templ->type;
+ if (templ->type == PIPE_SHADER_IR_TGSI) {
+ /* get/save the summary info for this shader */
+ lp_build_tgsi_info(templ->tokens, &shader->info);
- /* we need to keep a local copy of the tokens */
- shader->base.tokens = tgsi_dup_tokens(templ->tokens);
+ /* we need to keep a local copy of the tokens */
+ shader->base.tokens = tgsi_dup_tokens(templ->tokens);
+ } else {
+ shader->base.ir.nir = templ->ir.nir;
+ nir_tgsi_scan_shader(templ->ir.nir, &shader->info.base, true);
+ }
shader->draw_data = draw_create_fragment_shader(llvmpipe->draw, templ);
if (shader->draw_data == NULL) {
@@ -2955,9 +3004,8 @@ llvmpipe_create_fs_state(struct pipe_context *pipe,
nr_samplers = shader->info.base.file_max[TGSI_FILE_SAMPLER] + 1;
nr_sampler_views = shader->info.base.file_max[TGSI_FILE_SAMPLER_VIEW] + 1;
-
- shader->variant_key_size = Offset(struct lp_fragment_shader_variant_key,
- state[MAX2(nr_samplers, nr_sampler_views)]);
+ nr_images = shader->info.base.file_max[TGSI_FILE_IMAGE] + 1;
+ shader->variant_key_size = lp_fs_variant_key_size(MAX2(nr_samplers, nr_sampler_views), nr_images);
for (i = 0; i < shader->info.base.num_inputs; i++) {
shader->inputs[i].usage_mask = shader->info.base.input_usage_mask[i];
@@ -3095,6 +3143,8 @@ llvmpipe_delete_fs_state(struct pipe_context *pipe, void *fs)
/* Delete draw module's data */
draw_delete_fragment_shader(llvmpipe->draw, shader->draw_data);
+ if (shader->base.ir.nir)
+ ralloc_free(shader->base.ir.nir);
assert(shader->variants_cached == 0);
FREE((void *) shader->base.tokens);
FREE(shader);
@@ -3124,7 +3174,9 @@ llvmpipe_set_constant_buffer(struct pipe_context *pipe,
}
if (shader == PIPE_SHADER_VERTEX ||
- shader == PIPE_SHADER_GEOMETRY) {
+ shader == PIPE_SHADER_GEOMETRY ||
+ shader == PIPE_SHADER_TESS_CTRL ||
+ shader == PIPE_SHADER_TESS_EVAL) {
/* Pass the constants to the 'draw' module */
const unsigned size = cb ? cb->buffer_size : 0;
const ubyte *data;
@@ -3145,9 +3197,10 @@ llvmpipe_set_constant_buffer(struct pipe_context *pipe,
draw_set_mapped_constant_buffer(llvmpipe->draw, shader,
index, data, size);
}
- else {
+ else if (shader == PIPE_SHADER_COMPUTE)
+ llvmpipe->cs_dirty |= LP_CSNEW_CONSTANTS;
+ else
llvmpipe->dirty |= LP_NEW_FS_CONSTANTS;
- }
if (cb && cb->user_buffer) {
pipe_resource_reference(&constants, NULL);
@@ -3168,7 +3221,9 @@ llvmpipe_set_shader_buffers(struct pipe_context *pipe,
util_copy_shader_buffer(&llvmpipe->ssbos[shader][i], buffer);
if (shader == PIPE_SHADER_VERTEX ||
- shader == PIPE_SHADER_GEOMETRY) {
+ shader == PIPE_SHADER_GEOMETRY ||
+ shader == PIPE_SHADER_TESS_CTRL ||
+ shader == PIPE_SHADER_TESS_EVAL) {
const unsigned size = buffer ? buffer->buffer_size : 0;
const ubyte *data = NULL;
if (buffer && buffer->buffer)
@@ -3177,12 +3232,44 @@ llvmpipe_set_shader_buffers(struct pipe_context *pipe,
data += buffer->buffer_offset;
draw_set_mapped_shader_buffer(llvmpipe->draw, shader,
i, data, size);
+ } else if (shader == PIPE_SHADER_COMPUTE) {
+ llvmpipe->cs_dirty |= LP_CSNEW_SSBOS;
} else if (shader == PIPE_SHADER_FRAGMENT) {
llvmpipe->dirty |= LP_NEW_FS_SSBOS;
}
}
}
+static void
+llvmpipe_set_shader_images(struct pipe_context *pipe,
+ enum pipe_shader_type shader, unsigned start_slot,
+ unsigned count, const struct pipe_image_view *images)
+{
+ struct llvmpipe_context *llvmpipe = llvmpipe_context(pipe);
+ unsigned i, idx;
+
+ draw_flush(llvmpipe->draw);
+ for (i = start_slot, idx = 0; i < start_slot + count; i++, idx++) {
+ const struct pipe_image_view *image = images ? &images[idx] : NULL;
+
+ util_copy_image_view(&llvmpipe->images[shader][i], image);
+ }
+
+ llvmpipe->num_images[shader] = start_slot + count;
+ if (shader == PIPE_SHADER_VERTEX ||
+ shader == PIPE_SHADER_GEOMETRY ||
+ shader == PIPE_SHADER_TESS_CTRL ||
+ shader == PIPE_SHADER_TESS_EVAL) {
+ draw_set_images(llvmpipe->draw,
+ shader,
+ llvmpipe->images[shader],
+ start_slot + count);
+ } else if (shader == PIPE_SHADER_COMPUTE)
+ llvmpipe->cs_dirty |= LP_CSNEW_IMAGES;
+ else
+ llvmpipe->dirty |= LP_NEW_FS_IMAGES;
+}
+
/**
* Return the blend factor equivalent to a destination alpha of one.
*/
@@ -3212,14 +3299,17 @@ force_dst_alpha_one(unsigned factor, boolean clamped_zero)
* TODO: there is actually no reason to tie this to context state -- the
* generated code could be cached globally in the screen.
*/
-static void
+static struct lp_fragment_shader_variant_key *
make_variant_key(struct llvmpipe_context *lp,
struct lp_fragment_shader *shader,
- struct lp_fragment_shader_variant_key *key)
+ char *store)
{
unsigned i;
+ struct lp_fragment_shader_variant_key *key;
+
+ key = (struct lp_fragment_shader_variant_key *)store;
- memset(key, 0, shader->variant_key_size);
+ memset(key, 0, offsetof(struct lp_fragment_shader_variant_key, samplers[1]));
if (lp->framebuffer.zsbuf) {
enum pipe_format zsbuf_format = lp->framebuffer.zsbuf->format;
@@ -3271,7 +3361,7 @@ make_variant_key(struct llvmpipe_context *lp,
/* alpha.ref_value is passed in jit_context */
key->flatshade = lp->rasterizer->flatshade;
- if (lp->active_occlusion_queries) {
+ if (lp->active_occlusion_queries && !lp->queries_disabled) {
key->occlusion_count = TRUE;
}
@@ -3365,9 +3455,15 @@ make_variant_key(struct llvmpipe_context *lp,
*/
key->nr_samplers = shader->info.base.file_max[TGSI_FILE_SAMPLER] + 1;
+ struct lp_sampler_static_state *fs_sampler;
+
+ fs_sampler = key->samplers;
+
+ memset(fs_sampler, 0, MAX2(key->nr_samplers, key->nr_sampler_views) * sizeof *fs_sampler);
+
for(i = 0; i < key->nr_samplers; ++i) {
if(shader->info.base.file_mask[TGSI_FILE_SAMPLER] & (1 << i)) {
- lp_sampler_static_sampler_state(&key->state[i].sampler_state,
+ lp_sampler_static_sampler_state(&fs_sampler[i].sampler_state,
lp->samplers[PIPE_SHADER_FRAGMENT][i]);
}
}
@@ -3386,7 +3482,7 @@ make_variant_key(struct llvmpipe_context *lp,
* used views may be included in the shader key.
*/
if(shader->info.base.file_mask[TGSI_FILE_SAMPLER_VIEW] & (1u << (i & 31))) {
- lp_sampler_static_texture_state(&key->state[i].texture_state,
+ lp_sampler_static_texture_state(&fs_sampler[i].texture_state,
lp->sampler_views[PIPE_SHADER_FRAGMENT][i]);
}
}
@@ -3395,11 +3491,22 @@ make_variant_key(struct llvmpipe_context *lp,
key->nr_sampler_views = key->nr_samplers;
for(i = 0; i < key->nr_sampler_views; ++i) {
if(shader->info.base.file_mask[TGSI_FILE_SAMPLER] & (1 << i)) {
- lp_sampler_static_texture_state(&key->state[i].texture_state,
+ lp_sampler_static_texture_state(&fs_sampler[i].texture_state,
lp->sampler_views[PIPE_SHADER_FRAGMENT][i]);
}
}
}
+
+ struct lp_image_static_state *lp_image;
+ lp_image = lp_fs_variant_key_images(key);
+ key->nr_images = shader->info.base.file_max[TGSI_FILE_IMAGE] + 1;
+ for (i = 0; i < key->nr_images; ++i) {
+ if (shader->info.base.file_mask[TGSI_FILE_IMAGE] & (1 << i)) {
+ lp_sampler_static_texture_state_image(&lp_image[i].image_state,
+ &lp->images[PIPE_SHADER_FRAGMENT][i]);
+ }
+ }
+ return key;
}
@@ -3412,16 +3519,17 @@ void
llvmpipe_update_fs(struct llvmpipe_context *lp)
{
struct lp_fragment_shader *shader = lp->fs;
- struct lp_fragment_shader_variant_key key;
+ struct lp_fragment_shader_variant_key *key;
struct lp_fragment_shader_variant *variant = NULL;
struct lp_fs_variant_list_item *li;
+ char store[LP_FS_MAX_VARIANT_KEY_SIZE];
- make_variant_key(lp, shader, &key);
+ key = make_variant_key(lp, shader, store);
/* Search the variants for one which matches the key */
li = first_elem(&shader->variants);
while(!at_end(&shader->variants, li)) {
- if(memcmp(&li->base->key, &key, shader->variant_key_size) == 0) {
+ if(memcmp(&li->base->key, key, shader->variant_key_size) == 0) {
variant = li->base;
break;
}
@@ -3493,7 +3601,7 @@ llvmpipe_update_fs(struct llvmpipe_context *lp)
* Generate the new variant.
*/
t0 = os_time_get();
- variant = generate_variant(lp, shader, &key);
+ variant = generate_variant(lp, shader, key);
t1 = os_time_get();
dt = t1 - t0;
LP_COUNT_ADD(llvm_compile_time, dt);
@@ -3527,6 +3635,7 @@ llvmpipe_init_fs_funcs(struct llvmpipe_context *llvmpipe)
llvmpipe->pipe.set_constant_buffer = llvmpipe_set_constant_buffer;
llvmpipe->pipe.set_shader_buffers = llvmpipe_set_shader_buffers;
+ llvmpipe->pipe.set_shader_images = llvmpipe_set_shader_images;
}
diff --git a/lib/mesa/src/gallium/drivers/llvmpipe/lp_state_sampler.c b/lib/mesa/src/gallium/drivers/llvmpipe/lp_state_sampler.c
index 72823e4c8..485822df6 100644
--- a/lib/mesa/src/gallium/drivers/llvmpipe/lp_state_sampler.c
+++ b/lib/mesa/src/gallium/drivers/llvmpipe/lp_state_sampler.c
@@ -92,13 +92,18 @@ llvmpipe_bind_sampler_states(struct pipe_context *pipe,
llvmpipe->num_samplers[shader] = j;
}
- if (shader == PIPE_SHADER_VERTEX || shader == PIPE_SHADER_GEOMETRY) {
+ if (shader == PIPE_SHADER_VERTEX ||
+ shader == PIPE_SHADER_GEOMETRY ||
+ shader == PIPE_SHADER_TESS_CTRL ||
+ shader == PIPE_SHADER_TESS_EVAL) {
draw_set_samplers(llvmpipe->draw,
shader,
llvmpipe->samplers[shader],
llvmpipe->num_samplers[shader]);
}
- else {
+ else if (shader == PIPE_SHADER_COMPUTE) {
+ llvmpipe->cs_dirty |= LP_CSNEW_SAMPLER;
+ } else {
llvmpipe->dirty |= LP_NEW_SAMPLER;
}
}
@@ -144,13 +149,18 @@ llvmpipe_set_sampler_views(struct pipe_context *pipe,
llvmpipe->num_sampler_views[shader] = j;
}
- if (shader == PIPE_SHADER_VERTEX || shader == PIPE_SHADER_GEOMETRY) {
+ if (shader == PIPE_SHADER_VERTEX ||
+ shader == PIPE_SHADER_GEOMETRY ||
+ shader == PIPE_SHADER_TESS_CTRL ||
+ shader == PIPE_SHADER_TESS_EVAL) {
draw_set_sampler_views(llvmpipe->draw,
shader,
llvmpipe->sampler_views[shader],
llvmpipe->num_sampler_views[shader]);
}
- else {
+ else if (shader == PIPE_SHADER_COMPUTE) {
+ llvmpipe->cs_dirty |= LP_CSNEW_SAMPLER_VIEW;
+ } else {
llvmpipe->dirty |= LP_NEW_SAMPLER_VIEW;
}
}
@@ -356,6 +366,161 @@ llvmpipe_prepare_geometry_sampling(struct llvmpipe_context *lp,
prepare_shader_sampling(lp, num, views, PIPE_SHADER_GEOMETRY);
}
+/**
+ * Called whenever we're about to draw (no dirty flag, FIXME?).
+ */
+void
+llvmpipe_prepare_tess_ctrl_sampling(struct llvmpipe_context *lp,
+ unsigned num,
+ struct pipe_sampler_view **views)
+{
+ prepare_shader_sampling(lp, num, views, PIPE_SHADER_TESS_CTRL);
+}
+
+/**
+ * Called whenever we're about to draw (no dirty flag, FIXME?).
+ */
+void
+llvmpipe_prepare_tess_eval_sampling(struct llvmpipe_context *lp,
+ unsigned num,
+ struct pipe_sampler_view **views)
+{
+ prepare_shader_sampling(lp, num, views, PIPE_SHADER_TESS_EVAL);
+}
+
+static void
+prepare_shader_images(
+ struct llvmpipe_context *lp,
+ unsigned num,
+ struct pipe_image_view *views,
+ enum pipe_shader_type shader_type)
+{
+
+ unsigned i;
+ uint32_t row_stride;
+ uint32_t img_stride;
+ const void *addr;
+
+ assert(num <= PIPE_MAX_SHADER_SAMPLER_VIEWS);
+ if (!num)
+ return;
+
+ for (i = 0; i < num; i++) {
+ struct pipe_image_view *view = i < num ? &views[i] : NULL;
+
+ if (view) {
+ struct pipe_resource *img = view->resource;
+ struct llvmpipe_resource *lp_img = llvmpipe_resource(img);
+ if (!img)
+ continue;
+
+ unsigned width = u_minify(img->width0, view->u.tex.level);
+ unsigned height = u_minify(img->height0, view->u.tex.level);
+ unsigned num_layers = img->depth0;
+
+ if (!lp_img->dt) {
+ /* regular texture - setup array of mipmap level offsets */
+ struct pipe_resource *res = view->resource;
+
+ if (llvmpipe_resource_is_texture(res)) {
+ uint32_t mip_offset = lp_img->mip_offsets[view->u.tex.level];
+ addr = lp_img->tex_data;
+
+ if (img->target == PIPE_TEXTURE_1D_ARRAY ||
+ img->target == PIPE_TEXTURE_2D_ARRAY ||
+ img->target == PIPE_TEXTURE_3D ||
+ img->target == PIPE_TEXTURE_CUBE ||
+ img->target == PIPE_TEXTURE_CUBE_ARRAY) {
+ num_layers = view->u.tex.last_layer - view->u.tex.first_layer + 1;
+ assert(view->u.tex.first_layer <= view->u.tex.last_layer);
+ mip_offset += view->u.tex.first_layer * lp_img->img_stride[view->u.tex.level];
+ }
+
+ row_stride = lp_img->row_stride[view->u.tex.level];
+ img_stride = lp_img->img_stride[view->u.tex.level];
+ addr = (uint8_t *)addr + mip_offset;
+ }
+ else {
+ unsigned view_blocksize = util_format_get_blocksize(view->format);
+ addr = lp_img->data;
+ /* probably don't really need to fill that out */
+ row_stride = 0;
+ img_stride = 0;
+
+ /* everything specified in number of elements here. */
+ width = view->u.buf.size / view_blocksize;
+ addr = (uint8_t *)addr + view->u.buf.offset;
+ assert(view->u.buf.offset + view->u.buf.size <= res->width0);
+ }
+ }
+ else {
+ /* display target texture/surface */
+ /*
+ * XXX: Where should this be unmapped?
+ */
+ struct llvmpipe_screen *screen = llvmpipe_screen(img->screen);
+ struct sw_winsys *winsys = screen->winsys;
+ addr = winsys->displaytarget_map(winsys, lp_img->dt,
+ PIPE_TRANSFER_READ);
+ row_stride = lp_img->row_stride[0];
+ img_stride = lp_img->img_stride[0];
+ assert(addr);
+ }
+ draw_set_mapped_image(lp->draw,
+ shader_type,
+ i,
+ width, height, num_layers,
+ addr,
+ row_stride, img_stride);
+ }
+ }
+}
+
+
+/**
+ * Called whenever we're about to draw (no dirty flag, FIXME?).
+ */
+void
+llvmpipe_prepare_vertex_images(struct llvmpipe_context *lp,
+ unsigned num,
+ struct pipe_image_view *views)
+{
+ prepare_shader_images(lp, num, views, PIPE_SHADER_VERTEX);
+}
+
+
+/**
+ * Called whenever we're about to draw (no dirty flag, FIXME?).
+ */
+void
+llvmpipe_prepare_geometry_images(struct llvmpipe_context *lp,
+ unsigned num,
+ struct pipe_image_view *views)
+{
+ prepare_shader_images(lp, num, views, PIPE_SHADER_GEOMETRY);
+}
+
+/**
+ * Called whenever we're about to draw (no dirty flag, FIXME?).
+ */
+void
+llvmpipe_prepare_tess_ctrl_images(struct llvmpipe_context *lp,
+ unsigned num,
+ struct pipe_image_view *views)
+{
+ prepare_shader_images(lp, num, views, PIPE_SHADER_TESS_CTRL);
+}
+
+/**
+ * Called whenever we're about to draw (no dirty flag, FIXME?).
+ */
+void
+llvmpipe_prepare_tess_eval_images(struct llvmpipe_context *lp,
+ unsigned num,
+ struct pipe_image_view *views)
+{
+ prepare_shader_images(lp, num, views, PIPE_SHADER_TESS_EVAL);
+}
void
llvmpipe_init_sampler_funcs(struct llvmpipe_context *llvmpipe)
diff --git a/lib/mesa/src/gallium/drivers/llvmpipe/lp_surface.c b/lib/mesa/src/gallium/drivers/llvmpipe/lp_surface.c
index 953b26e8c..1cdabbb6c 100644
--- a/lib/mesa/src/gallium/drivers/llvmpipe/lp_surface.c
+++ b/lib/mesa/src/gallium/drivers/llvmpipe/lp_surface.c
@@ -102,6 +102,8 @@ static void lp_blit(struct pipe_context *pipe,
util_blitter_save_scissor(lp->blitter, &lp->scissors[0]);
util_blitter_save_fragment_shader(lp->blitter, lp->fs);
util_blitter_save_blend(lp->blitter, (void*)lp->blend);
+ util_blitter_save_tessctrl_shader(lp->blitter, (void*)lp->tcs);
+ util_blitter_save_tesseval_shader(lp->blitter, (void*)lp->tes);
util_blitter_save_depth_stencil_alpha(lp->blitter, (void*)lp->depth_stencil);
util_blitter_save_stencil_ref(lp->blitter, &lp->stencil_ref);
/*util_blitter_save_sample_mask(sp->blitter, lp->sample_mask);*/