From 63e38bd0f6a1958f174a98e4b06be3fb152048b4 Mon Sep 17 00:00:00 2001 From: Marek Olšák Date: Tue, 14 Jun 2011 01:23:20 +0200 Subject: target-helpers: remove copy-pasted function inline_noop_helper --- .../auxiliary/target-helpers/inline_debug_helper.h | 8 ++++ .../auxiliary/target-helpers/inline_noop_helper.h | 51 ---------------------- 2 files changed, 8 insertions(+), 51 deletions(-) delete mode 100644 src/gallium/auxiliary/target-helpers/inline_noop_helper.h (limited to 'src/gallium/auxiliary') diff --git a/src/gallium/auxiliary/target-helpers/inline_debug_helper.h b/src/gallium/auxiliary/target-helpers/inline_debug_helper.h index 0433da6141d..c6630c40f5c 100644 --- a/src/gallium/auxiliary/target-helpers/inline_debug_helper.h +++ b/src/gallium/auxiliary/target-helpers/inline_debug_helper.h @@ -22,6 +22,10 @@ #include "galahad/glhd_public.h" #endif +#ifdef GALLIUM_NOOP +#include "noop/noop_public.h" +#endif + static INLINE struct pipe_screen * debug_screen_wrap(struct pipe_screen *screen) { @@ -38,6 +42,10 @@ debug_screen_wrap(struct pipe_screen *screen) screen = galahad_screen_create(screen); #endif +#if defined(GALLIUM_NOOP) + screen = noop_screen_create(screen); +#endif + return screen; } diff --git a/src/gallium/auxiliary/target-helpers/inline_noop_helper.h b/src/gallium/auxiliary/target-helpers/inline_noop_helper.h deleted file mode 100644 index 77c7cfd0c20..00000000000 --- a/src/gallium/auxiliary/target-helpers/inline_noop_helper.h +++ /dev/null @@ -1,51 +0,0 @@ - -#ifndef INLINE_DEBUG_HELPER_H -#define INLINE_DEBUG_HELPER_H - -#include "pipe/p_compiler.h" -#include "util/u_debug.h" - - -/* Helper function to wrap a screen with - * one or more debug driver: rbug, trace. - */ - -#ifdef GALLIUM_TRACE -#include "trace/tr_public.h" -#endif - -#ifdef GALLIUM_RBUG -#include "rbug/rbug_public.h" -#endif - -#ifdef GALLIUM_GALAHAD -#include "galahad/glhd_public.h" -#endif - -#ifdef GALLIUM_NOOP -#include "noop/noop_public.h" -#endif - -static INLINE struct pipe_screen * -debug_screen_wrap(struct pipe_screen *screen) -{ -#if defined(GALLIUM_RBUG) - screen = rbug_screen_create(screen); -#endif - -#if defined(GALLIUM_TRACE) - screen = trace_screen_create(screen); -#endif - -#if defined(GALLIUM_GALAHAD) - screen = galahad_screen_create(screen); -#endif - -#if defined(GALLIUM_NOOP) - screen = noop_screen_create(screen); -#endif - - return screen; -} - -#endif -- cgit v1.2.3 From 41750107496858a047afa8d81d20fe903f285a78 Mon Sep 17 00:00:00 2001 From: José Fonseca Date: Fri, 17 Jun 2011 14:48:28 +0100 Subject: scons: make embedding orthogonal to the platform To enable embedding in platforms other than linux. --- SConstruct | 19 +------- common.py | 3 +- scons/gallium.py | 6 ++- src/gallium/SConscript | 74 ++++++++++++++++---------------- src/gallium/auxiliary/os/os_memory.h | 2 +- src/gallium/auxiliary/os/os_misc.h | 4 -- src/gallium/auxiliary/os/os_thread.h | 12 +++--- src/gallium/auxiliary/os/os_time.c | 5 --- src/gallium/auxiliary/util/u_debug.c | 2 +- src/gallium/drivers/llvmpipe/SConscript | 2 +- src/gallium/drivers/llvmpipe/lp_screen.c | 2 +- src/gallium/include/pipe/p_config.h | 4 -- src/glsl/SConscript | 4 +- 13 files changed, 56 insertions(+), 83 deletions(-) (limited to 'src/gallium/auxiliary') diff --git a/SConstruct b/SConstruct index 8607d2cd8e0..dc5fd776a71 100644 --- a/SConstruct +++ b/SConstruct @@ -80,23 +80,6 @@ env.Append(CPPPATH = [ if env['msvc']: env.Append(CPPPATH = ['#include/c99']) -# Embedded -if env['platform'] == 'embedded': - env.Append(CPPDEFINES = [ - '_POSIX_SOURCE', - ('_POSIX_C_SOURCE', '199309L'), - '_SVID_SOURCE', - '_BSD_SOURCE', - '_GNU_SOURCE', - - 'PTHREADS', - ]) - env.Append(LIBS = [ - 'm', - 'pthread', - 'dl', - ]) - # Posix if env['platform'] in ('posix', 'linux', 'freebsd', 'darwin'): env.Append(CPPDEFINES = [ @@ -130,7 +113,7 @@ if env['platform'] in ('posix', 'linux', 'freebsd', 'darwin'): # # Create host environent -if env['crosscompile'] and env['platform'] != 'embedded': +if env['crosscompile'] and not env['embedded']: host_env = Environment( options = opts, # no tool used diff --git a/common.py b/common.py index 0a3dcdcf543..052929e2bb0 100644 --- a/common.py +++ b/common.py @@ -83,7 +83,8 @@ def AddOptions(opts): opts.Add(EnumOption('machine', 'use machine-specific assembly code', default_machine, allowed_values=('generic', 'ppc', 'x86', 'x86_64'))) opts.Add(EnumOption('platform', 'target platform', host_platform, - allowed_values=('linux', 'cell', 'windows', 'winddk', 'wince', 'darwin', 'embedded', 'cygwin', 'sunos', 'freebsd8'))) + allowed_values=('linux', 'cell', 'windows', 'winddk', 'wince', 'darwin', 'cygwin', 'sunos', 'freebsd8'))) + opts.Add(BoolOption('embedded', 'embedded build', 'no')) opts.Add('toolchain', 'compiler toolchain', default_toolchain) opts.Add(BoolOption('gles', 'EXPERIMENTAL: enable OpenGL ES support', 'no')) opts.Add(BoolOption('llvm', 'use LLVM', default_llvm)) diff --git a/scons/gallium.py b/scons/gallium.py index a94bf736480..57acfe032f2 100755 --- a/scons/gallium.py +++ b/scons/gallium.py @@ -247,6 +247,8 @@ def generate(env): # configuration. See also http://www.scons.org/wiki/AdvancedBuildExample build_topdir = 'build' build_subdir = env['platform'] + if env['embedded']: + build_subdir = 'embedded-' + build_subdir if env['machine'] != 'generic': build_subdir += '-' + env['machine'] if env['build'] != 'release': @@ -349,8 +351,8 @@ def generate(env): if platform == 'wince': cppdefines += ['PIPE_SUBSYSTEM_WINDOWS_CE'] cppdefines += ['PIPE_SUBSYSTEM_WINDOWS_CE_OGL'] - if platform == 'embedded': - cppdefines += ['PIPE_OS_EMBEDDED'] + if env['embedded']: + cppdefines += ['PIPE_SUBSYSTEM_EMBEDDED'] env.Append(CPPDEFINES = cppdefines) # C compiler options diff --git a/src/gallium/SConscript b/src/gallium/SConscript index 428bc31f86b..3072ee936f2 100644 --- a/src/gallium/SConscript +++ b/src/gallium/SConscript @@ -53,7 +53,7 @@ if env['drm']: # Needed by some state trackers SConscript('winsys/sw/null/SConscript') -if env['platform'] != 'embedded': +if not env['embedded']: SConscript('state_trackers/vega/SConscript') SConscript('state_trackers/egl/SConscript') @@ -66,8 +66,8 @@ if env['platform'] != 'embedded': if env['dri'] and env['xorg']: SConscript('state_trackers/xorg/SConscript') -if env['platform'] == 'windows': - SConscript('state_trackers/wgl/SConscript') + if env['platform'] == 'windows': + SConscript('state_trackers/wgl/SConscript') # # Winsys @@ -83,55 +83,55 @@ SConscript([ 'targets/graw-null/SConscript', ]) -if env['platform'] != 'embedded': +if not env['embedded']: SConscript([ 'targets/egl-static/SConscript' ]) -if env['x11']: - SConscript([ - 'targets/graw-xlib/SConscript', - 'targets/libgl-xlib/SConscript', - ]) + if env['x11']: + SConscript([ + 'targets/graw-xlib/SConscript', + 'targets/libgl-xlib/SConscript', + ]) -if env['platform'] == 'windows': - SConscript([ - 'targets/graw-gdi/SConscript', - 'targets/libgl-gdi/SConscript', - ]) + if env['platform'] == 'windows': + SConscript([ + 'targets/graw-gdi/SConscript', + 'targets/libgl-gdi/SConscript', + ]) -if env['dri']: - SConscript([ - 'targets/SConscript.dri', - 'targets/dri-swrast/SConscript', - 'targets/dri-vmwgfx/SConscript', - #'targets/dri-nouveau/SConscript', - ]) - if env['drm_intel']: + if env['dri']: SConscript([ - 'targets/dri-i915/SConscript', - 'targets/dri-i965/SConscript', + 'targets/SConscript.dri', + 'targets/dri-swrast/SConscript', + 'targets/dri-vmwgfx/SConscript', + #'targets/dri-nouveau/SConscript', ]) - if env['drm_radeon']: + if env['drm_intel']: + SConscript([ + 'targets/dri-i915/SConscript', + 'targets/dri-i965/SConscript', + ]) + if env['drm_radeon']: + SConscript([ + 'targets/dri-r300/SConscript', + 'targets/dri-r600/SConscript', + ]) + + if env['xorg'] and env['drm']: SConscript([ - 'targets/dri-r300/SConscript', - 'targets/dri-r600/SConscript', + #'targets/xorg-i915/SConscript', + #'targets/xorg-i965/SConscript', + #'targets/xorg-nouveau/SConscript', + #'targets/xorg-radeon/SConscript', + 'targets/xorg-vmwgfx/SConscript', ]) -if env['xorg'] and env['drm']: - SConscript([ - #'targets/xorg-i915/SConscript', - #'targets/xorg-i965/SConscript', - #'targets/xorg-nouveau/SConscript', - #'targets/xorg-radeon/SConscript', - 'targets/xorg-vmwgfx/SConscript', - ]) - # # Unit tests & tools # -if env['platform'] != 'embedded': +if not env['embedded']: SConscript('tests/unit/SConscript') SConscript('tests/graw/SConscript') diff --git a/src/gallium/auxiliary/os/os_memory.h b/src/gallium/auxiliary/os/os_memory.h index 556662d35e1..91a84a24bc8 100644 --- a/src/gallium/auxiliary/os/os_memory.h +++ b/src/gallium/auxiliary/os/os_memory.h @@ -39,7 +39,7 @@ #include "pipe/p_compiler.h" -#if defined(PIPE_OS_EMBEDDED) +#if defined(PIPE_SUBSYSTEM_EMBEDDED) #ifdef __cplusplus extern "C" { diff --git a/src/gallium/auxiliary/os/os_misc.h b/src/gallium/auxiliary/os/os_misc.h index d59f9819fec..48522dac4d7 100644 --- a/src/gallium/auxiliary/os/os_misc.h +++ b/src/gallium/auxiliary/os/os_misc.h @@ -58,8 +58,6 @@ extern "C" { # define os_break() __debugbreak() #elif defined(PIPE_OS_UNIX) # define os_break() kill(getpid(), SIGTRAP) -#elif defined(PIPE_OS_EMBEDDED) -void os_break(void); #else # define os_break() abort() #endif @@ -70,8 +68,6 @@ void os_break(void); */ #if defined(DEBUG) || defined(PIPE_SUBSYSTEM_WINDOWS_DISPLAY) || defined(PIPE_SUBSYSTEM_WINDOWS_MINIPORT) # define os_abort() os_break() -#elif defined(PIPE_OS_EMBEDDED) -void os_abort(void); #else # define os_abort() abort() #endif diff --git a/src/gallium/auxiliary/os/os_thread.h b/src/gallium/auxiliary/os/os_thread.h index 6b4281ad661..8f1245bff55 100644 --- a/src/gallium/auxiliary/os/os_thread.h +++ b/src/gallium/auxiliary/os/os_thread.h @@ -40,7 +40,7 @@ #include "util/u_debug.h" /* for assert */ -#if defined(PIPE_OS_LINUX) || defined(PIPE_OS_BSD) || defined(PIPE_OS_SOLARIS) || defined(PIPE_OS_APPLE) || defined(PIPE_OS_HAIKU) || defined(PIPE_OS_EMBEDDED) || defined(PIPE_OS_CYGWIN) +#if defined(PIPE_OS_LINUX) || defined(PIPE_OS_BSD) || defined(PIPE_OS_SOLARIS) || defined(PIPE_OS_APPLE) || defined(PIPE_OS_HAIKU) || defined(PIPE_OS_CYGWIN) #include /* POSIX threads headers */ #include /* for perror() */ @@ -314,7 +314,7 @@ typedef int64_t pipe_condvar; * pipe_barrier */ -#if defined(PIPE_OS_LINUX) || defined(PIPE_OS_BSD) || defined(PIPE_OS_SOLARIS) || defined(PIPE_OS_HAIKU) || defined(PIPE_OS_EMBEDDED) +#if defined(PIPE_OS_LINUX) || defined(PIPE_OS_BSD) || defined(PIPE_OS_SOLARIS) || defined(PIPE_OS_HAIKU) typedef pthread_barrier_t pipe_barrier; @@ -442,7 +442,7 @@ pipe_semaphore_wait(pipe_semaphore *sema) */ typedef struct { -#if defined(PIPE_OS_LINUX) || defined(PIPE_OS_BSD) || defined(PIPE_OS_SOLARIS) || defined(PIPE_OS_APPLE) || defined(PIPE_OS_HAIKU) || defined(PIPE_OS_EMBEDDED) || defined(PIPE_OS_CYGWIN) +#if defined(PIPE_OS_LINUX) || defined(PIPE_OS_BSD) || defined(PIPE_OS_SOLARIS) || defined(PIPE_OS_APPLE) || defined(PIPE_OS_HAIKU) || defined(PIPE_OS_CYGWIN) pthread_key_t key; #elif defined(PIPE_SUBSYSTEM_WINDOWS_USER) DWORD key; @@ -457,7 +457,7 @@ typedef struct { static INLINE void pipe_tsd_init(pipe_tsd *tsd) { -#if defined(PIPE_OS_LINUX) || defined(PIPE_OS_BSD) || defined(PIPE_OS_SOLARIS) || defined(PIPE_OS_APPLE) || defined(PIPE_OS_HAIKU) || defined(PIPE_OS_EMBEDDED) || defined(PIPE_OS_CYGWIN) +#if defined(PIPE_OS_LINUX) || defined(PIPE_OS_BSD) || defined(PIPE_OS_SOLARIS) || defined(PIPE_OS_APPLE) || defined(PIPE_OS_HAIKU) || defined(PIPE_OS_CYGWIN) if (pthread_key_create(&tsd->key, NULL/*free*/) != 0) { perror("pthread_key_create(): failed to allocate key for thread specific data"); exit(-1); @@ -474,7 +474,7 @@ pipe_tsd_get(pipe_tsd *tsd) if (tsd->initMagic != (int) PIPE_TSD_INIT_MAGIC) { pipe_tsd_init(tsd); } -#if defined(PIPE_OS_LINUX) || defined(PIPE_OS_BSD) || defined(PIPE_OS_SOLARIS) || defined(PIPE_OS_APPLE) || defined(PIPE_OS_HAIKU) || defined(PIPE_OS_EMBEDDED) || defined(PIPE_OS_CYGWIN) +#if defined(PIPE_OS_LINUX) || defined(PIPE_OS_BSD) || defined(PIPE_OS_SOLARIS) || defined(PIPE_OS_APPLE) || defined(PIPE_OS_HAIKU) || defined(PIPE_OS_CYGWIN) return pthread_getspecific(tsd->key); #elif defined(PIPE_SUBSYSTEM_WINDOWS_USER) assert(0); @@ -491,7 +491,7 @@ pipe_tsd_set(pipe_tsd *tsd, void *value) if (tsd->initMagic != (int) PIPE_TSD_INIT_MAGIC) { pipe_tsd_init(tsd); } -#if defined(PIPE_OS_LINUX) || defined(PIPE_OS_BSD) || defined(PIPE_OS_SOLARIS) || defined(PIPE_OS_APPLE) || defined(PIPE_OS_HAIKU) || defined(PIPE_OS_EMBEDDED) || defined(PIPE_OS_CYGWIN) +#if defined(PIPE_OS_LINUX) || defined(PIPE_OS_BSD) || defined(PIPE_OS_SOLARIS) || defined(PIPE_OS_APPLE) || defined(PIPE_OS_HAIKU) || defined(PIPE_OS_CYGWIN) if (pthread_setspecific(tsd->key, value) != 0) { perror("pthread_set_specific() failed"); exit(-1); diff --git a/src/gallium/auxiliary/os/os_time.c b/src/gallium/auxiliary/os/os_time.c index 325f316784c..73d86296d91 100644 --- a/src/gallium/auxiliary/os/os_time.c +++ b/src/gallium/auxiliary/os/os_time.c @@ -35,8 +35,6 @@ #include "pipe/p_config.h" -#if !defined(PIPE_OS_EMBEDDED) - #if defined(PIPE_OS_UNIX) # include /* timeval */ #elif defined(PIPE_SUBSYSTEM_WINDOWS_DISPLAY) @@ -123,6 +121,3 @@ os_time_sleep(int64_t usecs) } #endif - - -#endif /* !PIPE_OS_EMBEDDED */ diff --git a/src/gallium/auxiliary/util/u_debug.c b/src/gallium/auxiliary/util/u_debug.c index 36ce4b57713..004df439ff5 100644 --- a/src/gallium/auxiliary/util/u_debug.c +++ b/src/gallium/auxiliary/util/u_debug.c @@ -48,7 +48,7 @@ void _debug_vprintf(const char *format, va_list ap) { -#if defined(PIPE_OS_WINDOWS) || defined(PIPE_OS_EMBEDDED) +#if defined(PIPE_OS_WINDOWS) || defined(PIPE_SUBSYSTEM_EMBEDDED) /* We buffer until we find a newline. */ static char buf[4096] = {'\0'}; size_t len = strlen(buf); diff --git a/src/gallium/drivers/llvmpipe/SConscript b/src/gallium/drivers/llvmpipe/SConscript index c10a8cbc12c..d6b20ceb5ce 100644 --- a/src/gallium/drivers/llvmpipe/SConscript +++ b/src/gallium/drivers/llvmpipe/SConscript @@ -79,7 +79,7 @@ llvmpipe = env.ConvenienceLibrary( env.Alias('llvmpipe', llvmpipe) -if env['platform'] != 'embedded': +if not env['embedded']: env = env.Clone() env.Prepend(LIBS = [llvmpipe] + gallium) diff --git a/src/gallium/drivers/llvmpipe/lp_screen.c b/src/gallium/drivers/llvmpipe/lp_screen.c index 036a6e0c379..4b2ae1436ea 100644 --- a/src/gallium/drivers/llvmpipe/lp_screen.c +++ b/src/gallium/drivers/llvmpipe/lp_screen.c @@ -423,7 +423,7 @@ llvmpipe_create_screen(struct sw_winsys *winsys) lp_jit_screen_init(screen); screen->num_threads = util_cpu_caps.nr_cpus > 1 ? util_cpu_caps.nr_cpus : 0; -#ifdef PIPE_OS_EMBEDDED +#ifdef PIPE_SUBSYSTEM_EMBEDDED screen->num_threads = 0; #endif screen->num_threads = debug_get_num_option("LP_NUM_THREADS", screen->num_threads); diff --git a/src/gallium/include/pipe/p_config.h b/src/gallium/include/pipe/p_config.h index 40f6f2bcb5f..eea3d79e64b 100644 --- a/src/gallium/include/pipe/p_config.h +++ b/src/gallium/include/pipe/p_config.h @@ -134,8 +134,6 @@ #error Unknown Endianness #endif -#if !defined(PIPE_OS_EMBEDDED) - /* * Auto-detect the operating system family. * @@ -222,7 +220,5 @@ #endif #endif /* PIPE_OS_WINDOWS */ -#endif /* !PIPE_OS_EMBEDDED */ - #endif /* P_CONFIG_H_ */ diff --git a/src/glsl/SConscript b/src/glsl/SConscript index c3255835fb4..1441cc74bd8 100644 --- a/src/glsl/SConscript +++ b/src/glsl/SConscript @@ -102,7 +102,7 @@ if env['msvc']: env.Prepend(CPPPATH = ['#/src/getopt']) env.PrependUnique(LIBS = [getopt]) -if env['crosscompile'] and env['platform'] != 'embedded': +if env['crosscompile'] and not env['embedded']: Import('builtin_glsl_function') else: # Copy these files to avoid generation object files into src/mesa/program @@ -156,7 +156,7 @@ Export('glsl') # Skip building these programs as they will cause SCons error "Two environments # with different actions were specified for the same target" -if env['crosscompile'] or env['platform'] == 'embedded': +if env['crosscompile'] or env['embedded']: Return() env = env.Clone() -- cgit v1.2.3 From 0d58723cde31703f13f2e8e0747cde30b9e5d6de Mon Sep 17 00:00:00 2001 From: Marek Olšák Date: Sun, 19 Jun 2011 19:38:48 +0200 Subject: u_vbuf_mgr: fix uploading if format size is greater than stride --- src/gallium/auxiliary/util/u_vbuf_mgr.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/gallium/auxiliary') diff --git a/src/gallium/auxiliary/util/u_vbuf_mgr.c b/src/gallium/auxiliary/util/u_vbuf_mgr.c index 04149525ea7..fdfa9fcca3d 100644 --- a/src/gallium/auxiliary/util/u_vbuf_mgr.c +++ b/src/gallium/auxiliary/util/u_vbuf_mgr.c @@ -537,6 +537,11 @@ static void u_vbuf_upload_buffers(struct u_vbuf_mgr_priv *mgr, } else if (vb->stride) { first = vb->stride * min_index; size = vb->stride * count; + + /* Unusual case when stride is smaller than the format size. + * XXX This won't work with interleaved arrays. */ + if (mgr->ve->native_format_size[i] > vb->stride) + size += mgr->ve->native_format_size[i] - vb->stride; } else { first = 0; size = mgr->ve->native_format_size[i]; -- cgit v1.2.3 From d1f66a9424d087f81d0040aafde033bd5cb1ca72 Mon Sep 17 00:00:00 2001 From: Marek Olšák Date: Sun, 19 Jun 2011 21:02:42 +0200 Subject: u_vbuf_mgr: make u_vbuf_mgr_draw_begin return flags in a bitmask --- src/gallium/auxiliary/util/u_vbuf_mgr.c | 53 ++++++++++++++-------------- src/gallium/auxiliary/util/u_vbuf_mgr.h | 12 ++++--- src/gallium/drivers/r300/r300_render.c | 5 +-- src/gallium/drivers/r600/r600_state_common.c | 2 +- 4 files changed, 36 insertions(+), 36 deletions(-) (limited to 'src/gallium/auxiliary') diff --git a/src/gallium/auxiliary/util/u_vbuf_mgr.c b/src/gallium/auxiliary/util/u_vbuf_mgr.c index fdfa9fcca3d..374fc336b83 100644 --- a/src/gallium/auxiliary/util/u_vbuf_mgr.c +++ b/src/gallium/auxiliary/util/u_vbuf_mgr.c @@ -152,9 +152,9 @@ void u_vbuf_mgr_destroy(struct u_vbuf_mgr *mgrb) } -static void u_vbuf_translate_begin(struct u_vbuf_mgr_priv *mgr, - int min_index, int max_index, - boolean *upload_flushed) +static enum u_vbuf_return_flags +u_vbuf_translate_begin(struct u_vbuf_mgr_priv *mgr, + int min_index, int max_index) { struct translate_key key; struct translate_element *te; @@ -166,6 +166,7 @@ static void u_vbuf_translate_begin(struct u_vbuf_mgr_priv *mgr, struct pipe_resource *out_buffer = NULL; unsigned i, num_verts, out_offset; struct pipe_vertex_element new_velems[PIPE_MAX_ATTRIBS]; + boolean upload_flushed = FALSE; memset(&key, 0, sizeof(key)); memset(tr_elem_index, 0xff, sizeof(tr_elem_index)); @@ -248,7 +249,7 @@ static void u_vbuf_translate_begin(struct u_vbuf_mgr_priv *mgr, u_upload_alloc(mgr->b.uploader, key.output_stride * min_index, key.output_stride * num_verts, - &out_offset, &out_buffer, upload_flushed, + &out_offset, &out_buffer, &upload_flushed, (void**)&out_map); out_offset -= key.output_stride * min_index; @@ -308,6 +309,8 @@ static void u_vbuf_translate_begin(struct u_vbuf_mgr_priv *mgr, } pipe_resource_reference(&out_buffer, NULL); + + return upload_flushed ? U_VBUF_UPLOAD_FLUSHED : 0; } static void u_vbuf_translate_end(struct u_vbuf_mgr_priv *mgr) @@ -510,14 +513,15 @@ void u_vbuf_mgr_set_vertex_buffers(struct u_vbuf_mgr *mgrb, mgr->b.nr_real_vertex_buffers = count; } -static void u_vbuf_upload_buffers(struct u_vbuf_mgr_priv *mgr, - int min_index, int max_index, - unsigned instance_count, - boolean *upload_flushed) +static enum u_vbuf_return_flags +u_vbuf_upload_buffers(struct u_vbuf_mgr_priv *mgr, + int min_index, int max_index, + unsigned instance_count) { unsigned i, nr = mgr->ve->count; unsigned count = max_index + 1 - min_index; boolean uploaded[PIPE_MAX_ATTRIBS] = {0}; + enum u_vbuf_return_flags retval = 0; for (i = 0; i < nr; i++) { unsigned index = mgr->ve->ve[i].vertex_buffer_index; @@ -556,11 +560,14 @@ static void u_vbuf_upload_buffers(struct u_vbuf_mgr_priv *mgr, vb->buffer_offset -= first; uploaded[index] = TRUE; - *upload_flushed = *upload_flushed || flushed; + if (flushed) + retval |= U_VBUF_UPLOAD_FLUSHED; } else { assert(mgr->b.real_vertex_buffer[index]); } } + + return retval; } static void u_vbuf_mgr_compute_max_index(struct u_vbuf_mgr_priv *mgr) @@ -602,14 +609,13 @@ static void u_vbuf_mgr_compute_max_index(struct u_vbuf_mgr_priv *mgr) } } -void u_vbuf_mgr_draw_begin(struct u_vbuf_mgr *mgrb, - const struct pipe_draw_info *info, - boolean *buffers_updated, - boolean *uploader_flushed) +enum u_vbuf_return_flags +u_vbuf_mgr_draw_begin(struct u_vbuf_mgr *mgrb, + const struct pipe_draw_info *info) { struct u_vbuf_mgr_priv *mgr = (struct u_vbuf_mgr_priv*)mgrb; - boolean bufs_updated = FALSE, upload_flushed = FALSE; int min_index, max_index; + enum u_vbuf_return_flags retval = 0; u_vbuf_mgr_compute_max_index(mgr); @@ -622,27 +628,20 @@ void u_vbuf_mgr_draw_begin(struct u_vbuf_mgr *mgrb, /* Translate vertices with non-native layouts or formats. */ if (mgr->incompatible_vb_layout || mgr->ve->incompatible_layout) { - u_vbuf_translate_begin(mgr, min_index, max_index, &upload_flushed); + retval |= u_vbuf_translate_begin(mgr, min_index, max_index); if (mgr->fallback_ve) { - bufs_updated = TRUE; + retval |= U_VBUF_BUFFERS_UPDATED; } } /* Upload user buffers. */ if (mgr->any_user_vbs) { - u_vbuf_upload_buffers(mgr, min_index, max_index, info->instance_count, - &upload_flushed); - bufs_updated = TRUE; - } - - /* Set the return values. */ - if (buffers_updated) { - *buffers_updated = bufs_updated; - } - if (uploader_flushed) { - *uploader_flushed = upload_flushed; + retval |= u_vbuf_upload_buffers(mgr, min_index, max_index, + info->instance_count); + retval |= U_VBUF_BUFFERS_UPDATED; } + return retval; } void u_vbuf_mgr_draw_end(struct u_vbuf_mgr *mgrb) diff --git a/src/gallium/auxiliary/util/u_vbuf_mgr.h b/src/gallium/auxiliary/util/u_vbuf_mgr.h index 9380dce4f72..4e6372435d8 100644 --- a/src/gallium/auxiliary/util/u_vbuf_mgr.h +++ b/src/gallium/auxiliary/util/u_vbuf_mgr.h @@ -78,6 +78,11 @@ enum u_fetch_alignment { U_VERTEX_FETCH_DWORD_ALIGNED }; +enum u_vbuf_return_flags { + U_VBUF_BUFFERS_UPDATED = 1, + U_VBUF_UPLOAD_FLUSHED = 2 +}; + struct u_vbuf_mgr * u_vbuf_mgr_create(struct pipe_context *pipe, @@ -105,10 +110,9 @@ void u_vbuf_mgr_set_vertex_buffers(struct u_vbuf_mgr *mgr, unsigned count, const struct pipe_vertex_buffer *bufs); -void u_vbuf_mgr_draw_begin(struct u_vbuf_mgr *mgr, - const struct pipe_draw_info *info, - boolean *buffers_updated, - boolean *uploader_flushed); +enum u_vbuf_return_flags +u_vbuf_mgr_draw_begin(struct u_vbuf_mgr *mgr, + const struct pipe_draw_info *info); void u_vbuf_mgr_draw_end(struct u_vbuf_mgr *mgr); diff --git a/src/gallium/drivers/r300/r300_render.c b/src/gallium/drivers/r300/r300_render.c index 7cf0aba2ed0..b31141a518e 100644 --- a/src/gallium/drivers/r300/r300_render.c +++ b/src/gallium/drivers/r300/r300_render.c @@ -768,7 +768,6 @@ static void r300_draw_vbo(struct pipe_context* pipe, { struct r300_context* r300 = r300_context(pipe); struct pipe_draw_info info = *dinfo; - boolean buffers_updated, uploader_flushed; info.indexed = info.indexed && r300->index_buffer.buffer; @@ -780,9 +779,7 @@ static void r300_draw_vbo(struct pipe_context* pipe, r300_update_derived_state(r300); /* Start the vbuf manager and update buffers if needed. */ - u_vbuf_mgr_draw_begin(r300->vbuf_mgr, &info, - &buffers_updated, &uploader_flushed); - if (buffers_updated) { + if (u_vbuf_mgr_draw_begin(r300->vbuf_mgr, &info) & U_VBUF_BUFFERS_UPDATED) { r300->vertex_arrays_dirty = TRUE; } diff --git a/src/gallium/drivers/r600/r600_state_common.c b/src/gallium/drivers/r600/r600_state_common.c index 5f9f398bf25..816508a3bef 100644 --- a/src/gallium/drivers/r600/r600_state_common.c +++ b/src/gallium/drivers/r600/r600_state_common.c @@ -543,7 +543,7 @@ void r600_draw_vbo(struct pipe_context *ctx, const struct pipe_draw_info *info) if (rctx->have_depth_fb || rctx->have_depth_texture) r600_flush_depth_textures(rctx); } - u_vbuf_mgr_draw_begin(rctx->vbuf_mgr, info, NULL, NULL); + u_vbuf_mgr_draw_begin(rctx->vbuf_mgr, info); r600_vertex_buffer_update(rctx); draw.info = *info; -- cgit v1.2.3 From ad7387fe12c034d32da4bf4e078d494cbaca5288 Mon Sep 17 00:00:00 2001 From: Vinson Lee Date: Thu, 23 Jun 2011 20:48:05 -0700 Subject: gallivm: Fix x86 build with llvm-3.0svn. LLVM revision 133739 renamed StackAlignment to StackAlignmentOverride. --- src/gallium/auxiliary/gallivm/lp_bld_misc.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/gallium/auxiliary') diff --git a/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp b/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp index d2d7eccd92f..85fabc574b2 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp +++ b/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp @@ -83,8 +83,12 @@ lp_set_target_options(void) * to only assume a 4 bytes alignment for backwards compatibility. */ #if defined(PIPE_ARCH_X86) +#if HAVE_LLVM >= 0x0300 + llvm::StackAlignmentOverride = 4; +#else llvm::StackAlignment = 4; #endif +#endif #if defined(DEBUG) || defined(PROFILE) llvm::NoFramePointerElim = true; -- cgit v1.2.3 From 6b28b44d458177209705637f759d03a27fa100f1 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Thu, 23 Jun 2011 18:44:42 -0600 Subject: indices: fix conversion of PIPE_PRIM_POLYGON to lines When the fill mode is PIPE_POLYGON_MODE_LINE we were basically converting the polygon into triangles, then drawing the outline of all the triangles. But we really only want to draw the lines around the perimeter of the polygon, not the interior lines. NOTE: This is a candidate for the 7.10 branch. --- src/gallium/auxiliary/indices/u_unfilled_gen.py | 4 ++-- src/gallium/auxiliary/indices/u_unfilled_indices.c | 7 ++++++- 2 files changed, 8 insertions(+), 3 deletions(-) (limited to 'src/gallium/auxiliary') diff --git a/src/gallium/auxiliary/indices/u_unfilled_gen.py b/src/gallium/auxiliary/indices/u_unfilled_gen.py index 36896ce605d..085c47a114a 100644 --- a/src/gallium/auxiliary/indices/u_unfilled_gen.py +++ b/src/gallium/auxiliary/indices/u_unfilled_gen.py @@ -167,8 +167,8 @@ def trifan(intype, outtype): def polygon(intype, outtype): preamble(intype, outtype, prim='polygon') - print ' for (j = i = 0; j < nr; j+=6, i++) { ' - do_tri( intype, outtype, 'out+j', '0', 'i+1', 'i+2' ); + print ' for (j = i = 0; j < nr; j+=2, i++) { ' + line( intype, outtype, 'out+j', 'i', '(i+1)%(nr/2)' ) print ' }' postamble() diff --git a/src/gallium/auxiliary/indices/u_unfilled_indices.c b/src/gallium/auxiliary/indices/u_unfilled_indices.c index 26c5d4d4c72..c353717d656 100644 --- a/src/gallium/auxiliary/indices/u_unfilled_indices.c +++ b/src/gallium/auxiliary/indices/u_unfilled_indices.c @@ -71,6 +71,11 @@ static void generate_linear_uint( unsigned nr, } +/** + * Given a primitive type and number of vertices, return the number of vertices + * needed to draw the primitive with fill mode = PIPE_POLYGON_MODE_LINE using + * separate lines (PIPE_PRIM_LINES). + */ static unsigned nr_lines( unsigned prim, unsigned nr ) { @@ -86,7 +91,7 @@ static unsigned nr_lines( unsigned prim, case PIPE_PRIM_QUAD_STRIP: return (nr - 2) / 2 * 8; case PIPE_PRIM_POLYGON: - return (nr - 2) * 6; + return 2 * nr; /* a line (two verts) for each polygon edge */ default: assert(0); return 0; -- cgit v1.2.3 From 5349b95920c82ab9187fe965f3921bd564fe6524 Mon Sep 17 00:00:00 2001 From: Stéphane Marchesin Date: Tue, 28 Jun 2011 20:45:07 -0700 Subject: Gallium:draw:aaline and aapoint: Restore the old hooks when we destroy our stage. --- src/gallium/auxiliary/draw/draw_pipe_aaline.c | 8 ++++++++ src/gallium/auxiliary/draw/draw_pipe_aapoint.c | 9 +++++++++ 2 files changed, 17 insertions(+) (limited to 'src/gallium/auxiliary') diff --git a/src/gallium/auxiliary/draw/draw_pipe_aaline.c b/src/gallium/auxiliary/draw/draw_pipe_aaline.c index 32af29ae144..458f85def2c 100644 --- a/src/gallium/auxiliary/draw/draw_pipe_aaline.c +++ b/src/gallium/auxiliary/draw/draw_pipe_aaline.c @@ -784,6 +784,14 @@ aaline_destroy(struct draw_stage *stage) draw_free_temp_verts( stage ); + /* restore the old entry points */ + pipe->create_fs_state = aaline->driver_create_fs_state; + pipe->bind_fs_state = aaline->driver_bind_fs_state; + pipe->delete_fs_state = aaline->driver_delete_fs_state; + + pipe->bind_fragment_sampler_states = aaline->driver_bind_sampler_states; + pipe->set_fragment_sampler_views = aaline->driver_set_sampler_views; + FREE( stage ); } diff --git a/src/gallium/auxiliary/draw/draw_pipe_aapoint.c b/src/gallium/auxiliary/draw/draw_pipe_aapoint.c index 60f6380c503..9265c379de8 100644 --- a/src/gallium/auxiliary/draw/draw_pipe_aapoint.c +++ b/src/gallium/auxiliary/draw/draw_pipe_aapoint.c @@ -768,7 +768,16 @@ aapoint_reset_stipple_counter(struct draw_stage *stage) static void aapoint_destroy(struct draw_stage *stage) { + struct aapoint_stage* aapoint = aapoint_stage(stage); + struct pipe_context *pipe = stage->draw->pipe; + draw_free_temp_verts( stage ); + + /* restore the old entry points */ + pipe->create_fs_state = aapoint->driver_create_fs_state; + pipe->bind_fs_state = aapoint->driver_bind_fs_state; + pipe->delete_fs_state = aapoint->driver_delete_fs_state; + FREE( stage ); } -- cgit v1.2.3 From b61e56756c2d61a94a8dd90abb4dc83e0c0349ae Mon Sep 17 00:00:00 2001 From: Vinson Lee Date: Thu, 30 Jun 2011 15:07:57 -0700 Subject: gallivm: Rename TargetInstrDesc to MCInstrDesc when using llvm-3.0. llvm-3.0svn revision 134021 renamed TargetInstrDesc to MCInstrDesc. --- src/gallium/auxiliary/gallivm/lp_bld_debug.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/gallium/auxiliary') diff --git a/src/gallium/auxiliary/gallivm/lp_bld_debug.cpp b/src/gallium/auxiliary/gallivm/lp_bld_debug.cpp index 0b724a34948..5036608b571 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_debug.cpp +++ b/src/gallium/auxiliary/gallivm/lp_bld_debug.cpp @@ -287,7 +287,11 @@ lp_disassemble(const void* func) pc += Size; +#if HAVE_LLVM >= 0x0300 + const MCInstrDesc &TID = TII->get(Inst.getOpcode()); +#else const TargetInstrDesc &TID = TII->get(Inst.getOpcode()); +#endif /* * Keep track of forward jumps to a nearby address. -- cgit v1.2.3 From f8fcaf0215f0434baf13bb5c45545c58f97846b6 Mon Sep 17 00:00:00 2001 From: Vinson Lee Date: Thu, 30 Jun 2011 15:48:41 -0700 Subject: gallivm: Pass in CPU name to createTargetMachine when on llvm-3.0. llvm-3.0svn revision 134127 changed createTargetMachine to take in an additional argument of the CPU name. --- src/gallium/auxiliary/gallivm/lp_bld_debug.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/gallium/auxiliary') diff --git a/src/gallium/auxiliary/gallivm/lp_bld_debug.cpp b/src/gallium/auxiliary/gallivm/lp_bld_debug.cpp index 5036608b571..01e660ef7d9 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_debug.cpp +++ b/src/gallium/auxiliary/gallivm/lp_bld_debug.cpp @@ -207,7 +207,11 @@ lp_disassemble(const void* func) } raw_debug_ostream Out; +#if HAVE_LLVM >= 0x0300 + TargetMachine *TM = T->createTargetMachine(Triple, sys::getHostCPUName(), ""); +#else TargetMachine *TM = T->createTargetMachine(Triple, ""); +#endif #if HAVE_LLVM >= 0x0300 unsigned int AsmPrinterVariant = AsmInfo->getAssemblerDialect(); -- cgit v1.2.3 From cf4cd8592ab54b9c959ea3b5f21437e8dca6bbcf Mon Sep 17 00:00:00 2001 From: Thomas Hellstrom Date: Thu, 10 Mar 2011 14:53:46 +0100 Subject: gallium/util: Upload manager optimizations Make sure that the upload manager doesn't upload data that's not dirty. This speeds up the viewperf test proe-04/1 a factor 5 or so on svga. Also introduce an u_upload_unmap() function that can be used instead of u_upload_flush() so that we can pack even more data in upload buffers. With this we can basically reuse the upload buffer across flushes. Signed-off-by: Thomas Hellstrom --- src/gallium/auxiliary/util/u_upload_mgr.c | 35 +++++++++++++++++++++++-------- src/gallium/auxiliary/util/u_upload_mgr.h | 20 ++++++++++++++---- 2 files changed, 42 insertions(+), 13 deletions(-) (limited to 'src/gallium/auxiliary') diff --git a/src/gallium/auxiliary/util/u_upload_mgr.c b/src/gallium/auxiliary/util/u_upload_mgr.c index 9562acb8210..d36697db4ec 100644 --- a/src/gallium/auxiliary/util/u_upload_mgr.c +++ b/src/gallium/auxiliary/util/u_upload_mgr.c @@ -72,6 +72,22 @@ struct u_upload_mgr *u_upload_create( struct pipe_context *pipe, return upload; } +void u_upload_unmap( struct u_upload_mgr *upload ) +{ + if (upload->transfer) { + struct pipe_box *box = &upload->transfer->box; + if (upload->offset > box->x) { + + pipe_buffer_flush_mapped_range(upload->pipe, upload->transfer, + box->x, upload->offset - box->x); + } + pipe_transfer_unmap(upload->pipe, upload->transfer); + pipe_transfer_destroy(upload->pipe, upload->transfer); + upload->transfer = NULL; + upload->map = NULL; + } +} + /* Release old buffer. * * This must usually be called prior to firing the command stream @@ -84,15 +100,7 @@ struct u_upload_mgr *u_upload_create( struct pipe_context *pipe, void u_upload_flush( struct u_upload_mgr *upload ) { /* Unmap and unreference the upload buffer. */ - if (upload->transfer) { - if (upload->offset) { - pipe_buffer_flush_mapped_range(upload->pipe, upload->transfer, - 0, upload->offset); - } - pipe_transfer_unmap(upload->pipe, upload->transfer); - pipe_transfer_destroy(upload->pipe, upload->transfer); - upload->transfer = NULL; - } + u_upload_unmap(upload); pipe_resource_reference( &upload->buffer, NULL ); upload->size = 0; } @@ -172,6 +180,15 @@ enum pipe_error u_upload_alloc( struct u_upload_mgr *upload, offset = MAX2(upload->offset, alloc_offset); + if (!upload->map) { + upload->map = pipe_buffer_map_range(upload->pipe, upload->buffer, + offset, upload->size - offset, + PIPE_TRANSFER_WRITE | + PIPE_TRANSFER_FLUSH_EXPLICIT | + PIPE_TRANSFER_UNSYNCHRONIZED, + &upload->transfer); + } + assert(offset < upload->buffer->width0); assert(offset + size <= upload->buffer->width0); assert(size); diff --git a/src/gallium/auxiliary/util/u_upload_mgr.h b/src/gallium/auxiliary/util/u_upload_mgr.h index c9a2ffeb572..98915139801 100644 --- a/src/gallium/auxiliary/util/u_upload_mgr.h +++ b/src/gallium/auxiliary/util/u_upload_mgr.h @@ -56,15 +56,27 @@ struct u_upload_mgr *u_upload_create( struct pipe_context *pipe, */ void u_upload_destroy( struct u_upload_mgr *upload ); -/* Unmap and release old buffer. +/* Unmap and release old upload buffer. * + * This is like u_upload_unmap() except the upload buffer is released for + * recycling. This should be called on real hardware flushes on systems + * that don't support the PIPE_TRANSFER_UNSYNCHRONIZED flag, as otherwise + * the next u_upload_buffer will cause a sync on the buffer. + */ + +void u_upload_flush( struct u_upload_mgr *upload ); + +/** + * Unmap upload buffer + * + * \param upload Upload manager + * * This must usually be called prior to firing the command stream * which references the upload buffer, as many memory managers either * don't like firing a mapped buffer or cause subsequent maps of a - * fired buffer to wait. For now, it's easiest just to grab a new - * buffer. + * fired buffer to wait. */ -void u_upload_flush( struct u_upload_mgr *upload ); +void u_upload_unmap( struct u_upload_mgr *upload ); /** * Sub-allocate new memory from the upload buffer. -- cgit v1.2.3 From 7d39ff44a2256a08fac725ae0ee8a4475fbf9de5 Mon Sep 17 00:00:00 2001 From: Micael Dias Date: Thu, 30 Jun 2011 03:33:47 +0100 Subject: Gallium: fix buffer overflow MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: José Fonseca --- src/gallium/auxiliary/draw/draw_llvm.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/gallium/auxiliary') diff --git a/src/gallium/auxiliary/draw/draw_llvm.c b/src/gallium/auxiliary/draw/draw_llvm.c index 56c26f57cce..f33c9078c9c 100644 --- a/src/gallium/auxiliary/draw/draw_llvm.c +++ b/src/gallium/auxiliary/draw/draw_llvm.c @@ -1163,6 +1163,7 @@ draw_llvm_generate(struct draw_llvm *llvm, struct draw_llvm_variant *variant) struct lp_build_loop_state lp_loop; const int max_vertices = 4; LLVMValueRef outputs[PIPE_MAX_SHADER_OUTPUTS][NUM_CHANNELS]; + LLVMValueRef fetch_max; void *code; struct lp_build_sampler_soa *sampler = 0; LLVMValueRef ret, ret_ptr; @@ -1234,6 +1235,10 @@ draw_llvm_generate(struct draw_llvm *llvm, struct draw_llvm_variant *variant) draw_llvm_variant_key_samplers(&variant->key), context_ptr); + fetch_max = LLVMBuildSub(builder, count, + lp_build_const_int32(gallivm, 1), + "fetch_max"); + #if DEBUG_STORE lp_build_printf(builder, "start = %d, end = %d, step = %d\n", start, end, step); @@ -1257,6 +1262,12 @@ draw_llvm_generate(struct draw_llvm *llvm, struct draw_llvm_variant *variant) builder, lp_loop.counter, lp_build_const_int32(gallivm, i), ""); + + /* make sure we're not out of bounds which can happen + * if fetch_count % 4 != 0, because on the last iteration + * a few of the 4 vertex fetches will be out of bounds */ + true_index = lp_build_min(&bld, true_index, fetch_max); + for (j = 0; j < draw->pt.nr_vertex_elements; ++j) { struct pipe_vertex_element *velem = &draw->pt.vertex_element[j]; LLVMValueRef vb_index = lp_build_const_int32(gallivm, velem->vertex_buffer_index); -- cgit v1.2.3 From dda8d7ac3f0e5148d9738a57f7bc03216f6514d1 Mon Sep 17 00:00:00 2001 From: José Fonseca Date: Fri, 1 Jul 2011 17:05:30 +0100 Subject: u_upload_mgr: Use pipe_buffer_map_range istead of pipe_buffer_map. pipe_buffer_map_range makes stricter assertions, and would have saved us grief detecting a bug in svga user buffer uploads. --- src/gallium/auxiliary/util/u_upload_mgr.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'src/gallium/auxiliary') diff --git a/src/gallium/auxiliary/util/u_upload_mgr.c b/src/gallium/auxiliary/util/u_upload_mgr.c index d36697db4ec..e50db6d67fe 100644 --- a/src/gallium/auxiliary/util/u_upload_mgr.c +++ b/src/gallium/auxiliary/util/u_upload_mgr.c @@ -240,10 +240,11 @@ enum pipe_error u_upload_buffer( struct u_upload_mgr *upload, struct pipe_transfer *transfer = NULL; const char *map = NULL; - map = (const char *)pipe_buffer_map(upload->pipe, - inbuf, - PIPE_TRANSFER_READ, - &transfer); + map = (const char *)pipe_buffer_map_range(upload->pipe, + inbuf, + offset, size, + PIPE_TRANSFER_READ, + &transfer); if (map == NULL) { ret = PIPE_ERROR_OUT_OF_MEMORY; @@ -256,7 +257,7 @@ enum pipe_error u_upload_buffer( struct u_upload_mgr *upload, ret = u_upload_data( upload, min_out_offset, size, - map + offset, + map, out_offset, outbuf, flushed ); -- cgit v1.2.3