Re: [Mesa-dev] [PATCH] scons: Do not build glx on Solaris.
On Sam, 2012-06-23 at 14:55 -0700, Alan Coopersmith wrote: > On 06/23/12 01:43 PM, Vinson Lee wrote: > > On Wed, Jun 20, 2012 at 6:49 AM, Alan Coopersmith > > wrote: > >> On 06/19/12 11:34 PM, Vinson Lee wrote: > >>> The GLX headers on Solaris are not recent enough. > >> > >> Huh? Which Solaris? Solaris 11 ships with X.Org's glproto 1.4.10 - > >> how new do you need? Or what headers do you need if not glproto? > >> > >> (Not that I know anyone who uses scons, so maybe this doesn't matter.) > > > > Compiling src/glx/glxext.c ... > > "src/glx/glxext.c", line 136: undefined symbol: xGLXBufferSwapComplete2 > > Looks like that was defined in 1.4.14 so I guess the headers shipped on > Solaris 11 are too old. > > Though really, this whole scons setup seems like a really really really > bad idea - going back to the imake model of having to manually keep track > of what each distro or OS ships, and in this case deciding that because > one version of an OS ships with an older header than you need that no > version ever will ship it, and that no user will ever install a newer > version on their own - this is why X.Org moved from imake to autoconf, > automake, pkg-config, etc. so that we detected what was actually present, > not what someone upstream thought would be there. > > I admit I've completely ignored everything involving scons as it seemed > irrelevant to me, but I really have to wonder why anyone thinks it's a > good idea to take such a huge step backwards in dependency/requirements > detection and management. So you admit you don't really know anything about SCons, but write a diatribe about its alleged shortcomings anyway? Nice. ;) Of course it's possible to check with pkg-config or whatever with SCons, and I agree that would probably be a better solution. -- Earthling Michel Dänzer | http://www.amd.com Libre software enthusiast | Debian, X and DRI developer ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH] builtin_variables: Only advertise gl_InstanceIDARB when GLSL handle integers.
It can be argued it makes to sense to advertise an integer system variable in GLSL levels where integers aren't handled. Signed-off-by: Olivier Galibert --- I don't really know if that's a patch we want, but otoh having gl_InstanceIDARB being a different type depending on the GLSL version would be... weird. diff --git a/src/glsl/builtin_variables.cpp b/src/glsl/builtin_variables.cpp index 03b64c9..f9a341f 100644 --- a/src/glsl/builtin_variables.cpp +++ b/src/glsl/builtin_variables.cpp @@ -888,12 +888,13 @@ generate_ARB_draw_instanced_variables(exec_list *instructions, bool warn, _mesa_glsl_parser_targets target) { - /* gl_InstanceIDARB is only available in the vertex shader. + /* gl_InstanceIDARB is only available in the vertex shader, and +* only if the glsl level can handle integers. */ if (target != vertex_shader) return; - if (state->ARB_draw_instanced_enable) { + if (state->ARB_draw_instanced_enable && state->language_version >= 130) { ir_variable *inst = add_variable(instructions, state->symbols, "gl_InstanceIDARB", glsl_type::int_type, ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH] [RFC] r600g: improve flushed depth texture allocation
2012/6/24 Vadim Girlin : > On Sun, 2012-06-24 at 17:43 +0400, Vadim Girlin wrote: >> Allocate flushed depth texture in the VRAM if we aren't going to access it by >> CPU. If we need CPU access later, then it'll be reallocated in the GTT. >> Currently it's not reallocated in the opposite direction (GTT->VRAM), though >> probably we might want to do it too. Anyway, it helps the apps that don't >> need >> to access flushed depth texture by CPU at all, e.g. Lightsmark. >> >> Improves performance for Lightsmark. >> >> Signed-off-by: Vadim Girlin >> --- > > You can also find this patch and some other patches that aren't > committed yet (shader caching, dual export) in the r600-perf branch in > my github mesa repo: > > git://github.com/VadimGirlin/mesa.git > > www: https://github.com/VadimGirlin/mesa/compare/r600-perf > > Could anybody test them for regressions on non-evergreen cards > (R6xx/7xx/CAYMAN)? > > Vadim > > ___ > mesa-dev mailing list > mesa-dev@lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/mesa-dev following piglit tests regresses on my rv770: ./piglit-run.py --tests=fbo-draw-buffers-blend --tests=fbo-drawbuffers-arbfp --tests=fbo-drawbuffers2-* --tests=fbo-drawbuffers-blend-add --tests=fbo-drawbuffers-maxtarget --tests=mixed-mrt --tests=arb_draw_buffers-state_change --tests=arbfp-no-index --tests=ati_draw_buffers-arbfp tests/quick.tests results/regression [Mon Jun 25 12:03:52 2012] :: running :: fbo/fbo-drawbuffers-arbfp [Mon Jun 25 12:03:52 2012] :: fail :: fbo/fbo-drawbuffers-arbfp [Mon Jun 25 12:03:52 2012] :: running :: fbo/fbo-drawbuffers2-colormask [Mon Jun 25 12:03:52 2012] :: fail :: fbo/fbo-drawbuffers2-colormask [Mon Jun 25 12:03:52 2012] :: running :: spec/ARB_color_buffer_float/mixed-mrt [Mon Jun 25 12:03:52 2012] :: fail :: spec/ARB_color_buffer_float/mixed-mrt [Mon Jun 25 12:03:52 2012] :: running :: fbo/fbo-draw-buffers-blend [Mon Jun 25 12:03:52 2012] :: fail :: fbo/fbo-draw-buffers-blend [Mon Jun 25 12:03:52 2012] :: running :: spec/ATI_draw_buffers/arbfp-no-index [Mon Jun 25 12:03:52 2012] :: fail :: spec/ATI_draw_buffers/arbfp-no-index [Mon Jun 25 12:03:52 2012] :: running :: spec/ATI_draw_buffers/ati_draw_buffers-arbfp [Mon Jun 25 12:03:52 2012] :: fail :: spec/ATI_draw_buffers/ati_draw_buffers-arbfp [Mon Jun 25 12:03:52 2012] :: running :: fbo/fbo-drawbuffers2-blend [Mon Jun 25 12:03:52 2012] :: fail :: fbo/fbo-drawbuffers2-blend [Mon Jun 25 12:03:52 2012] :: running :: fbo/fbo-drawbuffers-blend-add [Mon Jun 25 12:03:52 2012] :: fail :: fbo/fbo-drawbuffers-blend-add [Mon Jun 25 12:03:52 2012] :: running :: fbo/fbo-drawbuffers-maxtargets [Mon Jun 25 12:03:53 2012] :: fail :: fbo/fbo-drawbuffers-maxtargets [Mon Jun 25 12:03:53 2012] :: running :: spec/ARB_draw_buffers/arb_draw_buffers-state_change [Mon Jun 25 12:03:53 2012] :: fail :: spec/ARB_draw_buffers/arb_draw_buffers-state_change the regressions are introduced with the first commit of your branch: r600g: avoid unnecessary shader exports ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] Comparison of llvmpipe with 2.9 and 3.1
Hi, I've just finished two piglit runs of llvmpipe with glsl 1.40 and gl 3.1 forced on, one with LLVM 2.9, the other with 3.1. The least we can say is that there aren't many differences. - fp-indirections2, didn't have the patience to wait to see whether it would eventually stop. Looks like something quadratic or worse in the LLVM optimizers. - 17000-consecutive-chars-identifier, the memory corruption it creates behaved differently (probably due to the different glibc, it wasn't on the same box), causing a deadlock in malloc() - texCombine fails on 3.1 only with: Returncode: -5 Errors: src/gallium/auxiliary/draw/draw_llvm.c:309:create_jit_vertex_header: Assertion `LLVMABISizeOfType(target, vertex_header) == __builtin_offsetof (struct vertex_header, data[data_elems])' failed. Output: -- GL_EXT_texture_env_combine verification test. We only test a subset of all possible texture env combinations because there's simply too many to exhaustively test them all. So, in total, the story isn't bad. Best, OG. ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] Comparison of llvmpipe with 2.9 and 3.1
- Original Message - > Hi, > > I've just finished two piglit runs of llvmpipe with glsl 1.40 and gl > 3.1 forced on, one with LLVM 2.9, the other with 3.1. > > The least we can say is that there aren't many differences. > > - fp-indirections2, didn't have the patience to wait to see whether > it > would eventually stop. Looks like something quadratic or worse in > the LLVM optimizers. > > - 17000-consecutive-chars-identifier, the memory corruption it > creates > behaved differently (probably due to the different glibc, it wasn't > on > the same box), causing a deadlock in malloc() > > - texCombine fails on 3.1 only with: > Returncode: -5 > > Errors: > src/gallium/auxiliary/draw/draw_llvm.c:309:create_jit_vertex_header: > Assertion `LLVMABISizeOfType(target, vertex_header) == > __builtin_offsetof (struct vertex_header, data[data_elems])' failed. I investigated this issue. This is caused because the ability to invalidate structure layouts was removed from llvm 3.0. This only happens when gallivm's garabbage collection kicks in. I have some patches which replace global LLVMContext + garbagge collection with many LLVMContext -- something necessary for other reasons, namely, using MC-JIT --, which fix this. For best results, the fixes in http://cgit.freedesktop.org/~jrfonseca/llvm/log/?h=backports_31 should be applied. Jose > > > Output: > -- > GL_EXT_texture_env_combine verification test. > We only test a subset of all possible texture env combinations > because there's simply too many to exhaustively test them all. > > > > So, in total, the story isn't bad. > > Best, > > OG. > ___ > mesa-dev mailing list > mesa-dev@lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/mesa-dev > ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH] llvmpipe: Remove the ARB_draw_instanced capability.
On 25.06.2012 08:37, Olivier Galibert wrote: > That capability requires integer handling and that's not yet active, > ending with a failure in draw-non-instanced unless you force it on. > See bug 51366. > > Frankly, I'd rather have that patch rejected and integer/glsl 130 > capability activated instead. There still are things missing, but > they mostly have their own extension anyway. And the overall picture > ain't so bad. > > Signed-off-by: Olivier Galibert > > diff --git a/src/gallium/drivers/llvmpipe/lp_screen.c > b/src/gallium/drivers/llvmpipe/lp_screen.c > index 40037a5..5eb826e 100644 > --- a/src/gallium/drivers/llvmpipe/lp_screen.c > +++ b/src/gallium/drivers/llvmpipe/lp_screen.c > @@ -152,8 +152,6 @@ llvmpipe_get_param(struct pipe_screen *screen, enum > pipe_cap param) >return 1; > case PIPE_CAP_DEPTH_CLIP_DISABLE: >return 0; > - case PIPE_CAP_TGSI_INSTANCEID: > - case PIPE_CAP_VERTEX_ELEMENT_INSTANCE_DIVISOR: With VERTEX_ELEMENT_INSTANCE_DIVISOR you'd be removing GL_ARB_instanced_arrays, which doesn't need integers. > case PIPE_CAP_MIXED_COLORBUFFER_FORMATS: > case PIPE_CAP_CONDITIONAL_RENDER: >return 1; > ___ > mesa-dev mailing list > mesa-dev@lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/mesa-dev ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH] [RFC] r600g: improve flushed depth texture allocation
On Mon, 2012-06-25 at 12:19 +0200, Andreas Boll wrote: > 2012/6/24 Vadim Girlin : > > On Sun, 2012-06-24 at 17:43 +0400, Vadim Girlin wrote: > >> Allocate flushed depth texture in the VRAM if we aren't going to access it > >> by > >> CPU. If we need CPU access later, then it'll be reallocated in the GTT. > >> Currently it's not reallocated in the opposite direction (GTT->VRAM), > >> though > >> probably we might want to do it too. Anyway, it helps the apps that don't > >> need > >> to access flushed depth texture by CPU at all, e.g. Lightsmark. > >> > >> Improves performance for Lightsmark. > >> > >> Signed-off-by: Vadim Girlin > >> --- > > > > You can also find this patch and some other patches that aren't > > committed yet (shader caching, dual export) in the r600-perf branch in > > my github mesa repo: > > > > git://github.com/VadimGirlin/mesa.git > > > > www: https://github.com/VadimGirlin/mesa/compare/r600-perf > > > > Could anybody test them for regressions on non-evergreen cards > > (R6xx/7xx/CAYMAN)? > > > > Vadim > > > > ___ > > mesa-dev mailing list > > mesa-dev@lists.freedesktop.org > > http://lists.freedesktop.org/mailman/listinfo/mesa-dev > > following piglit tests regresses on my rv770: > Thanks. I've updated the branch with a possible fix, could you test it again? Vadim > ./piglit-run.py --tests=fbo-draw-buffers-blend > --tests=fbo-drawbuffers-arbfp --tests=fbo-drawbuffers2-* > --tests=fbo-drawbuffers-blend-add --tests=fbo-drawbuffers-maxtarget > --tests=mixed-mrt --tests=arb_draw_buffers-state_change > --tests=arbfp-no-index --tests=ati_draw_buffers-arbfp > tests/quick.tests results/regression > [Mon Jun 25 12:03:52 2012] :: running :: fbo/fbo-drawbuffers-arbfp > [Mon Jun 25 12:03:52 2012] :: fail :: fbo/fbo-drawbuffers-arbfp > [Mon Jun 25 12:03:52 2012] :: running :: fbo/fbo-drawbuffers2-colormask > [Mon Jun 25 12:03:52 2012] :: fail :: fbo/fbo-drawbuffers2-colormask > [Mon Jun 25 12:03:52 2012] :: running :: > spec/ARB_color_buffer_float/mixed-mrt > [Mon Jun 25 12:03:52 2012] :: fail :: > spec/ARB_color_buffer_float/mixed-mrt > [Mon Jun 25 12:03:52 2012] :: running :: fbo/fbo-draw-buffers-blend > [Mon Jun 25 12:03:52 2012] :: fail :: fbo/fbo-draw-buffers-blend > [Mon Jun 25 12:03:52 2012] :: running :: spec/ATI_draw_buffers/arbfp-no-index > [Mon Jun 25 12:03:52 2012] :: fail :: spec/ATI_draw_buffers/arbfp-no-index > [Mon Jun 25 12:03:52 2012] :: running :: > spec/ATI_draw_buffers/ati_draw_buffers-arbfp > [Mon Jun 25 12:03:52 2012] :: fail :: > spec/ATI_draw_buffers/ati_draw_buffers-arbfp > [Mon Jun 25 12:03:52 2012] :: running :: fbo/fbo-drawbuffers2-blend > [Mon Jun 25 12:03:52 2012] :: fail :: fbo/fbo-drawbuffers2-blend > [Mon Jun 25 12:03:52 2012] :: running :: fbo/fbo-drawbuffers-blend-add > [Mon Jun 25 12:03:52 2012] :: fail :: fbo/fbo-drawbuffers-blend-add > [Mon Jun 25 12:03:52 2012] :: running :: fbo/fbo-drawbuffers-maxtargets > [Mon Jun 25 12:03:53 2012] :: fail :: fbo/fbo-drawbuffers-maxtargets > [Mon Jun 25 12:03:53 2012] :: running :: > spec/ARB_draw_buffers/arb_draw_buffers-state_change > [Mon Jun 25 12:03:53 2012] :: fail :: > spec/ARB_draw_buffers/arb_draw_buffers-state_change > > the regressions are introduced with the first commit of your branch: > > r600g: avoid unnecessary shader exports ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH] softpipe: Do round-to-even, not round-up.
- Original Message - > On Fri, May 18, 2012 at 08:55:39AM -0600, Brian Paul wrote: > > In any case, I think this function could be moved into u_math.c so > > it > > could be used elsewhere. > [...] > > I was looking at the GLSL round() and roundEven() functions. The > > GLSL > > spec says round() can use whatever method is fastest. But in > > builtin_functions.cpp the round() function is implemented in terms > > of > > the round_even builtin. It seems to me that we should have a > > generic > > 'round' builtin function and separate TGSI_ROUND and > > TGSI_ROUND_EVEN > > opcodes so that drivers can really have the option of using a > > faster/looser round function. > > I've tried doing that. I've moved the function to u_math.c, then > made > src/glsl/ir_constant_expression.cpp use it. That blew up. > > If I compile with scons, I get: > Linking build/linux-x86_64-debug/glsl/builtin_compiler ... > build/linux-x86_64-debug/glsl/ir_constant_expression.o: In function > `dot': > /home/galibert/X/work/mesa-play/src/glsl/ir_constant_expression.cpp:47: > undefined reference to `_debug_assert_fail' > [...] > /home/galibert/X/work/mesa-play/src/glsl/ir_constant_expression.cpp:265: > undefined reference to `ieee754_fp32_round_half_to_even' > [etc] > > If I compile with autoconf/make I get: > ir_constant_expression.cpp:42:25: fatal error: util/u_math.h: No such > file or directory > > So at that point src/glsl and src/gallium are not supposed to meet > each other. And changing that is not a responsability I feel like > taking. Any advice? This is a long standing janitorial task that everybody agrees but nobody taken due to lack of time: we need to create a shared top level module (e,g., src/cgrt, for Common Graphics Runtime), with the math/os/portability inlines/defines/helpers, so that all other modules (Mesa, glsl, gallium) can depend on, without introducing cyclic dependencies between them. Fixing this, is a big task, likely too big for you to take. But you can take a first step in that direction with this work, by creating the src/cgrt/cgrt_math.[ch] with this function, and include/link it everywhere it's used. Others can start moving stuff into there as time/opportunity allows. Jose ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH] llvmpipe: Remove the ARB_draw_instanced capability.
- Original Message - > That capability requires integer handling and that's not yet active, > ending with a failure in draw-non-instanced unless you force it on. > See bug 51366. > > Frankly, I'd rather have that patch rejected and integer/glsl 130 > capability activated instead. There still are things missing, but > they mostly have their own extension anyway. And the overall picture > ain't so bad. I'm personally also more interested in seeing llvmpipe to get the missing features for GLSL 1.30 / OGL 3. What's the overall picture of llvmpipe w/ integer/glsl 130? That is, how many piglit tests go from skipped to passed/failed? Jose ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH] llvmpipe: fix the LP_NO_RAST debug option
Looks good to me. Reviewed-by: Jose Fonseca Jose - Original Message - > It was only no-oping the clear() function, not actual triangle > rasterization. Move the no_rast field from lp_context down into > lp_rasterizer so it's accessible where it's needed. > --- > src/gallium/drivers/llvmpipe/lp_clear.c |3 -- > src/gallium/drivers/llvmpipe/lp_context.c |6 > src/gallium/drivers/llvmpipe/lp_rast.c | 36 > +++--- > src/gallium/drivers/llvmpipe/lp_rast_priv.h |1 + > 4 files changed, 22 insertions(+), 24 deletions(-) > > diff --git a/src/gallium/drivers/llvmpipe/lp_clear.c > b/src/gallium/drivers/llvmpipe/lp_clear.c > index 0b37347..cc90dc4 100644 > --- a/src/gallium/drivers/llvmpipe/lp_clear.c > +++ b/src/gallium/drivers/llvmpipe/lp_clear.c > @@ -53,9 +53,6 @@ llvmpipe_clear(struct pipe_context *pipe, > { > struct llvmpipe_context *llvmpipe = llvmpipe_context(pipe); > > - if (llvmpipe->no_rast) > - return; > - > if (!llvmpipe_check_render_cond(llvmpipe)) >return; > > diff --git a/src/gallium/drivers/llvmpipe/lp_context.c > b/src/gallium/drivers/llvmpipe/lp_context.c > index 8c0206b..7f92a5f 100644 > --- a/src/gallium/drivers/llvmpipe/lp_context.c > +++ b/src/gallium/drivers/llvmpipe/lp_context.c > @@ -47,9 +47,6 @@ > #include "lp_setup.h" > > > -DEBUG_GET_ONCE_BOOL_OPTION(lp_no_rast, "LP_NO_RAST", FALSE) > - > - > /** shared by all contexts */ > unsigned llvmpipe_variant_count; > > @@ -207,9 +204,6 @@ llvmpipe_create_context( struct pipe_screen > *screen, void *priv ) > > /* FIXME: devise alternative to draw_texture_samplers */ > > - if (debug_get_option_lp_no_rast()) > - llvmpipe->no_rast = TRUE; > - > llvmpipe->setup = lp_setup_create( &llvmpipe->pipe, >llvmpipe->draw ); > if (!llvmpipe->setup) > diff --git a/src/gallium/drivers/llvmpipe/lp_rast.c > b/src/gallium/drivers/llvmpipe/lp_rast.c > index efa5024..7e94055 100644 > --- a/src/gallium/drivers/llvmpipe/lp_rast.c > +++ b/src/gallium/drivers/llvmpipe/lp_rast.c > @@ -701,28 +701,32 @@ rasterize_scene(struct lp_rasterizer_task > *task, > struct lp_scene *scene) > { > task->scene = scene; > - /* loop over scene bins, rasterize each */ > + > + if (!task->rast->no_rast) { > + /* loop over scene bins, rasterize each */ > #if 0 > - { > - unsigned i, j; > - for (i = 0; i < scene->tiles_x; i++) { > - for (j = 0; j < scene->tiles_y; j++) { > -struct cmd_bin *bin = lp_scene_get_bin(scene, i, j); > -rasterize_bin(task, bin, i, j); > + { > + unsigned i, j; > + for (i = 0; i < scene->tiles_x; i++) { > +for (j = 0; j < scene->tiles_y; j++) { > + struct cmd_bin *bin = lp_scene_get_bin(scene, i, j); > + rasterize_bin(task, bin, i, j); > +} > } >} > - } > #else > - { > - struct cmd_bin *bin; > + { > + struct cmd_bin *bin; > > - assert(scene); > - while ((bin = lp_scene_bin_iter_next(scene))) { > - if (!is_empty_bin( bin )) > -rasterize_bin(task, bin); > + assert(scene); > + while ((bin = lp_scene_bin_iter_next(scene))) { > +if (!is_empty_bin( bin )) > + rasterize_bin(task, bin); > + } >} > - } > #endif > + } > + > > if (scene->fence) { >lp_fence_signal(scene->fence); > @@ -896,6 +900,8 @@ lp_rast_create( unsigned num_threads ) > > rast->num_threads = num_threads; > > + rast->no_rast = debug_get_bool_option("LP_NO_RAST", FALSE); > + > create_rast_threads(rast); > > /* for synchronizing rasterization threads */ > diff --git a/src/gallium/drivers/llvmpipe/lp_rast_priv.h > b/src/gallium/drivers/llvmpipe/lp_rast_priv.h > index d0bda35..b5d0074 100644 > --- a/src/gallium/drivers/llvmpipe/lp_rast_priv.h > +++ b/src/gallium/drivers/llvmpipe/lp_rast_priv.h > @@ -111,6 +111,7 @@ struct lp_rasterizer_task > struct lp_rasterizer > { > boolean exit_flag; > + boolean no_rast; /**< For debugging/profiling */ > > /** The incoming queue of scenes ready to rasterize */ > struct lp_scene_queue *full_scenes; > -- > 1.7.3.4 > > ___ > mesa-dev mailing list > mesa-dev@lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/mesa-dev > ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH] [RFC] r600g: improve flushed depth texture allocation
On Son, 2012-06-24 at 17:43 +0400, Vadim Girlin wrote: > Allocate flushed depth texture in the VRAM if we aren't going to access it by > CPU. If we need CPU access later, then it'll be reallocated in the GTT. > Currently it's not reallocated in the opposite direction (GTT->VRAM), though > probably we might want to do it too. Indeed; FWIW, it can be achieved by setting the write domain to only VRAM. -- Earthling Michel Dänzer | http://www.amd.com Libre software enthusiast | Debian, X and DRI developer ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH] scons: Do not build glx on Solaris.
On 06/25/12 12:09 AM, Michel Dänzer wrote: > On Sam, 2012-06-23 at 14:55 -0700, Alan Coopersmith wrote: >> On 06/23/12 01:43 PM, Vinson Lee wrote: >>> On Wed, Jun 20, 2012 at 6:49 AM, Alan Coopersmith >>> wrote: On 06/19/12 11:34 PM, Vinson Lee wrote: > The GLX headers on Solaris are not recent enough. Huh? Which Solaris? Solaris 11 ships with X.Org's glproto 1.4.10 - how new do you need? Or what headers do you need if not glproto? (Not that I know anyone who uses scons, so maybe this doesn't matter.) >>> >>> Compiling src/glx/glxext.c ... >>> "src/glx/glxext.c", line 136: undefined symbol: xGLXBufferSwapComplete2 >> >> Looks like that was defined in 1.4.14 so I guess the headers shipped on >> Solaris 11 are too old. >> >> Though really, this whole scons setup seems like a really really really >> bad idea - going back to the imake model of having to manually keep track >> of what each distro or OS ships, and in this case deciding that because >> one version of an OS ships with an older header than you need that no >> version ever will ship it, and that no user will ever install a newer >> version on their own - this is why X.Org moved from imake to autoconf, >> automake, pkg-config, etc. so that we detected what was actually present, >> not what someone upstream thought would be there. >> >> I admit I've completely ignored everything involving scons as it seemed >> irrelevant to me, but I really have to wonder why anyone thinks it's a >> good idea to take such a huge step backwards in dependency/requirements >> detection and management. > > So you admit you don't really know anything about SCons, but write a > diatribe about its alleged shortcomings anyway? Nice. ;) About "this scons setup" - i.e. the way it's being used here, using the kernel name as an indication of what libraries are available, assuming all kernels with the same name ship with the same set of libraries. (Why isn't "linux" in this list of incompatible kernels? I bet RHEL 5 and Ubuntu 10.04 don't ship with the needed glproto from 2011.) > Of course it's possible to check with pkg-config or whatever with SCons, > and I agree that would probably be a better solution. Great. -- -Alan Coopersmith- alan.coopersm...@oracle.com Oracle Solaris Engineering - http://blogs.oracle.com/alanc ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH] softpipe: Do round-to-even, not round-up.
On 06/25/2012 12:49 AM, Olivier Galibert wrote: On Fri, May 18, 2012 at 08:55:39AM -0600, Brian Paul wrote: In any case, I think this function could be moved into u_math.c so it could be used elsewhere. [...] I was looking at the GLSL round() and roundEven() functions. The GLSL spec says round() can use whatever method is fastest. But in builtin_functions.cpp the round() function is implemented in terms of the round_even builtin. It seems to me that we should have a generic 'round' builtin function and separate TGSI_ROUND and TGSI_ROUND_EVEN opcodes so that drivers can really have the option of using a faster/looser round function. I've tried doing that. I've moved the function to u_math.c, then made src/glsl/ir_constant_expression.cpp use it. That blew up. If I compile with scons, I get: Linking build/linux-x86_64-debug/glsl/builtin_compiler ... build/linux-x86_64-debug/glsl/ir_constant_expression.o: In function `dot': /home/galibert/X/work/mesa-play/src/glsl/ir_constant_expression.cpp:47: undefined reference to `_debug_assert_fail' [...] /home/galibert/X/work/mesa-play/src/glsl/ir_constant_expression.cpp:265: undefined reference to `ieee754_fp32_round_half_to_even' [etc] If I compile with autoconf/make I get: ir_constant_expression.cpp:42:25: fatal error: util/u_math.h: No such file or directory So at that point src/glsl and src/gallium are not supposed to meet each other. And changing that is not a responsability I feel like taking. Any advice? For the time being (until we can do the code sharing that Jose mentioned) you can just duplicate the code in imports.[ch] -Brian ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH] [RFC] r600g: improve flushed depth texture allocation
2012/6/25 Vadim Girlin : > On Mon, 2012-06-25 at 12:19 +0200, Andreas Boll wrote: >> 2012/6/24 Vadim Girlin : >> > On Sun, 2012-06-24 at 17:43 +0400, Vadim Girlin wrote: >> >> Allocate flushed depth texture in the VRAM if we aren't going to access >> >> it by >> >> CPU. If we need CPU access later, then it'll be reallocated in the GTT. >> >> Currently it's not reallocated in the opposite direction (GTT->VRAM), >> >> though >> >> probably we might want to do it too. Anyway, it helps the apps that don't >> >> need >> >> to access flushed depth texture by CPU at all, e.g. Lightsmark. >> >> >> >> Improves performance for Lightsmark. >> >> >> >> Signed-off-by: Vadim Girlin >> >> --- >> > >> > You can also find this patch and some other patches that aren't >> > committed yet (shader caching, dual export) in the r600-perf branch in >> > my github mesa repo: >> > >> > git://github.com/VadimGirlin/mesa.git >> > >> > www: https://github.com/VadimGirlin/mesa/compare/r600-perf >> > >> > Could anybody test them for regressions on non-evergreen cards >> > (R6xx/7xx/CAYMAN)? >> > >> > Vadim >> > >> > ___ >> > mesa-dev mailing list >> > mesa-dev@lists.freedesktop.org >> > http://lists.freedesktop.org/mailman/listinfo/mesa-dev >> >> following piglit tests regresses on my rv770: >> > > Thanks. I've updated the branch with a possible fix, could you test it > again? > > Vadim > >> ./piglit-run.py --tests=fbo-draw-buffers-blend >> --tests=fbo-drawbuffers-arbfp --tests=fbo-drawbuffers2-* >> --tests=fbo-drawbuffers-blend-add --tests=fbo-drawbuffers-maxtarget >> --tests=mixed-mrt --tests=arb_draw_buffers-state_change >> --tests=arbfp-no-index --tests=ati_draw_buffers-arbfp >> tests/quick.tests results/regression >> [Mon Jun 25 12:03:52 2012] :: running :: fbo/fbo-drawbuffers-arbfp >> [Mon Jun 25 12:03:52 2012] :: fail :: fbo/fbo-drawbuffers-arbfp >> [Mon Jun 25 12:03:52 2012] :: running :: fbo/fbo-drawbuffers2-colormask >> [Mon Jun 25 12:03:52 2012] :: fail :: fbo/fbo-drawbuffers2-colormask >> [Mon Jun 25 12:03:52 2012] :: running :: >> spec/ARB_color_buffer_float/mixed-mrt >> [Mon Jun 25 12:03:52 2012] :: fail :: >> spec/ARB_color_buffer_float/mixed-mrt >> [Mon Jun 25 12:03:52 2012] :: running :: fbo/fbo-draw-buffers-blend >> [Mon Jun 25 12:03:52 2012] :: fail :: fbo/fbo-draw-buffers-blend >> [Mon Jun 25 12:03:52 2012] :: running :: >> spec/ATI_draw_buffers/arbfp-no-index >> [Mon Jun 25 12:03:52 2012] :: fail :: >> spec/ATI_draw_buffers/arbfp-no-index >> [Mon Jun 25 12:03:52 2012] :: running :: >> spec/ATI_draw_buffers/ati_draw_buffers-arbfp >> [Mon Jun 25 12:03:52 2012] :: fail :: >> spec/ATI_draw_buffers/ati_draw_buffers-arbfp >> [Mon Jun 25 12:03:52 2012] :: running :: fbo/fbo-drawbuffers2-blend >> [Mon Jun 25 12:03:52 2012] :: fail :: fbo/fbo-drawbuffers2-blend >> [Mon Jun 25 12:03:52 2012] :: running :: fbo/fbo-drawbuffers-blend-add >> [Mon Jun 25 12:03:52 2012] :: fail :: fbo/fbo-drawbuffers-blend-add >> [Mon Jun 25 12:03:52 2012] :: running :: fbo/fbo-drawbuffers-maxtargets >> [Mon Jun 25 12:03:53 2012] :: fail :: fbo/fbo-drawbuffers-maxtargets >> [Mon Jun 25 12:03:53 2012] :: running :: >> spec/ARB_draw_buffers/arb_draw_buffers-state_change >> [Mon Jun 25 12:03:53 2012] :: fail :: >> spec/ARB_draw_buffers/arb_draw_buffers-state_change >> >> the regressions are introduced with the first commit of your branch: >> >> r600g: avoid unnecessary shader exports > > With the updated branch I have 4 remaining regressions on my rv770: ./piglit-run.py --tests=fbo-drawbuffers-arbfp --tests=fbo-drawbuffers-blend-add --tests=arbfp-no-index --tests=ati_draw_buffers-arbfp tests/quick.tests results/regression [Mon Jun 25 17:29:14 2012] :: running :: fbo/fbo-drawbuffers-arbfp [Mon Jun 25 17:29:14 2012] :: fail :: fbo/fbo-drawbuffers-arbfp [Mon Jun 25 17:29:14 2012] :: running :: spec/ATI_draw_buffers/ati_draw_buffers-arbfp [Mon Jun 25 17:29:14 2012] :: fail :: spec/ATI_draw_buffers/ati_draw_buffers-arbfp [Mon Jun 25 17:29:14 2012] :: running :: spec/ATI_draw_buffers/arbfp-no-index [Mon Jun 25 17:29:14 2012] :: fail :: spec/ATI_draw_buffers/arbfp-no-index [Mon Jun 25 17:29:14 2012] :: running :: fbo/fbo-drawbuffers-blend-add [Mon Jun 25 17:29:14 2012] :: fail :: fbo/fbo-drawbuffers-blend-add ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH] u2f_emit: Fix type parameter in LLVM call.
The type is the destination type (i.e. float vector) and not the source type. Fixes piglit fs-{in,de}crement-uint. Signed-off-by: Olivier Galibert --- src/gallium/auxiliary/gallivm/lp_bld_tgsi_action.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/auxiliary/gallivm/lp_bld_tgsi_action.c b/src/gallium/auxiliary/gallivm/lp_bld_tgsi_action.c index cbc5945..17f288f 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_tgsi_action.c +++ b/src/gallium/auxiliary/gallivm/lp_bld_tgsi_action.c @@ -693,7 +693,7 @@ u2f_emit( { emit_data->output[emit_data->chan] = LLVMBuildUIToFP(bld_base->base.gallivm->builder, emit_data->args[0], - bld_base->uint_bld.vec_type, ""); + bld_base->base.vec_type, ""); } static void -- 1.7.10.280.gaa39 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH] lp_build_lod_selector: Disable brilinear folding on explicit lod.
Brilinear folding must only be used if the log2 was computed with brilinear too. Fixes fs-textureLod-miplevels. Signed-off-by: Olivier Galibert --- src/gallium/auxiliary/gallivm/lp_bld_sample.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/auxiliary/gallivm/lp_bld_sample.c b/src/gallium/auxiliary/gallivm/lp_bld_sample.c index d966788..9deda61 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_sample.c +++ b/src/gallium/auxiliary/gallivm/lp_bld_sample.c @@ -513,7 +513,7 @@ lp_build_lod_selector(struct lp_build_sample_context *bld, } if (mip_filter == PIPE_TEX_MIPFILTER_LINEAR) { - if (!(gallivm_debug & GALLIVM_DEBUG_NO_BRILINEAR)) { + if (!explicit_lod && !(gallivm_debug & GALLIVM_DEBUG_NO_BRILINEAR)) { lp_build_brilinear_lod(float_bld, lod, BRILINEAR_FACTOR, out_lod_ipart, out_lod_fpart); } -- 1.7.10.280.gaa39 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH] u2f_emit: Fix type parameter in LLVM call.
Looks good. Thanks. Reviewed-by: Jose Fonseca Jose - Original Message - > The type is the destination type (i.e. float vector) and not the > source type. Fixes piglit fs-{in,de}crement-uint. > > Signed-off-by: Olivier Galibert > --- > src/gallium/auxiliary/gallivm/lp_bld_tgsi_action.c |2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/src/gallium/auxiliary/gallivm/lp_bld_tgsi_action.c > b/src/gallium/auxiliary/gallivm/lp_bld_tgsi_action.c > index cbc5945..17f288f 100644 > --- a/src/gallium/auxiliary/gallivm/lp_bld_tgsi_action.c > +++ b/src/gallium/auxiliary/gallivm/lp_bld_tgsi_action.c > @@ -693,7 +693,7 @@ u2f_emit( > { > emit_data->output[emit_data->chan] = > LLVMBuildUIToFP(bld_base->base.gallivm->builder, > emit_data->args[0], > - > bld_base->uint_bld.vec_type, ""); > + > bld_base->base.vec_type, ""); > } > > static void > -- > 1.7.10.280.gaa39 > > ___ > mesa-dev mailing list > mesa-dev@lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/mesa-dev > ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH] mesa: new MESA_LOG_FILE env var to log errors, warnings, etc., to a file
--- docs/envvars.html |2 ++ src/mesa/main/errors.c | 14 -- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/docs/envvars.html b/docs/envvars.html index fffb50a..102ea28 100644 --- a/docs/envvars.html +++ b/docs/envvars.html @@ -42,6 +42,8 @@ sometimes be useful for debugging end-user issues. printed to stderr. If the value of MESA_DEBUG is 'FP' floating point arithmetic errors will generate exceptions. +MESA_LOG_FILE - specifies a file name for logging all errors, warnings, +etc., rather than stderr MESA_TEX_PROG - if set, implement conventional texture env modes with fragment programs (intended for developers only) MESA_TNL_PROG - if set, implement conventional vertex transformation diff --git a/src/mesa/main/errors.c b/src/mesa/main/errors.c index 69dbb65..ef78a0b 100644 --- a/src/mesa/main/errors.c +++ b/src/mesa/main/errors.c @@ -801,12 +801,21 @@ output_if_debug(const char *prefixString, const char *outputString, GLboolean newline) { static int debug = -1; + static FILE *fout = NULL; /* Init the local 'debug' var once. * Note: the _mesa_init_debug() function should have been called * by now so MESA_DEBUG_FLAGS will be initialized. */ if (debug == -1) { + /* If MESA_LOG_FILE env var is set, log Mesa errors, warnings, + * etc to the named file. Otherwise, output to stderr. + */ + const char *logFile = _mesa_getenv("MESA_LOG_FILE"); + if (logFile) + fout = fopen(logFile, "w"); + if (!fout) + fout = stderr; #ifdef DEBUG /* in debug builds, print messages unless MESA_DEBUG="silent" */ if (MESA_DEBUG_FLAGS & DEBUG_SILENT) @@ -821,9 +830,10 @@ output_if_debug(const char *prefixString, const char *outputString, /* Now only print the string if we're required to do so. */ if (debug) { - fprintf(stderr, "%s: %s", prefixString, outputString); + fprintf(fout, "%s: %s", prefixString, outputString); if (newline) - fprintf(stderr, "\n"); + fprintf(fout, "\n"); + fflush(fout); #if defined(_WIN32) && !defined(_WIN32_WCE) /* stderr from windows applications without console is not usually -- 1.7.3.4 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] Mesa (master): draw: fix flat shading and screen-space linear interpolation in clipper
Hi Olivier, On top of the GL_SELECT regressions reported by Brian, this patch series is causing regressions on i915g for: draw-instanced draw-instanced-divisor draw-elements-instanced-base-vertex draw-elements-instanced-base-vertex-user_varrays draw-non-instanced instance-array-dereference Stéphane On Thu, Jun 21, 2012 at 10:39 AM, Olivier Galibert wrote: > On Thu, Jun 21, 2012 at 10:28:22AM -0700, Jose Fonseca wrote: >> This patch series is causing regressions in select/feedback mode. Can you >> take a look? > > Sure. I wouldn't have expected that case to ever happen, but it makes > sense now that I think of it. > > commit edc7b26b03c0393582ff5ec8c963207c7553850a > Author: Olivier Galibert > Date: Thu Jun 21 19:37:11 2012 +0200 > > clip_init_state: Handle the case when there isn't a fragment shader. > > Signed-off-by: Olivier Galibert > > diff --git a/src/gallium/auxiliary/draw/draw_pipe_clip.c > b/src/gallium/auxiliary/draw/draw_pipe_clip.c > index 2d36eb3..c02d0ef 100644 > --- a/src/gallium/auxiliary/draw/draw_pipe_clip.c > +++ b/src/gallium/auxiliary/draw/draw_pipe_clip.c > @@ -586,6 +586,9 @@ clip_init_state( struct draw_stage *stage ) > * two outputs for one input, so we tuck the information in a > * specific array. Second if they don't have qualifiers, the > * default value has to be picked from the global shade mode. > + * > + * Of course, if we don't have a fragment shader in the first > + * place, defaults should be used. > */ > > /* First pick up the interpolation mode for > @@ -595,10 +598,12 @@ clip_init_state( struct draw_stage *stage ) > indexed_interp[0] = indexed_interp[1] = stage->draw->rasterizer->flatshade > ? > TGSI_INTERPOLATE_CONSTANT : TGSI_INTERPOLATE_PERSPECTIVE; > > - for (i = 0; i < fs->info.num_inputs; i++) { > - if (fs->info.input_semantic_name[i] == TGSI_SEMANTIC_COLOR) { > - if (fs->info.input_interpolate[i] != TGSI_INTERPOLATE_COLOR) > - indexed_interp[fs->info.input_semantic_index[i]] = > fs->info.input_interpolate[i]; > + if (fs) { > + for (i = 0; i < fs->info.num_inputs; i++) { > + if (fs->info.input_semantic_name[i] == TGSI_SEMANTIC_COLOR) { > + if (fs->info.input_interpolate[i] != TGSI_INTERPOLATE_COLOR) > + indexed_interp[fs->info.input_semantic_index[i]] = > fs->info.input_interpolate[i]; > + } > } > } > > @@ -627,12 +632,14 @@ clip_init_state( struct draw_stage *stage ) > */ > uint j; > interp = TGSI_INTERPOLATE_PERSPECTIVE; > - for (j = 0; j < fs->info.num_inputs; j++) { > - if (vs->info.output_semantic_name[i] == > fs->info.input_semantic_name[j] && > - vs->info.output_semantic_index[i] == > fs->info.input_semantic_index[j]) { > - interp = fs->info.input_interpolate[j]; > - break; > - } > + if (fs) { > + for (j = 0; j < fs->info.num_inputs; j++) { > + if (vs->info.output_semantic_name[i] == > fs->info.input_semantic_name[j] && > + vs->info.output_semantic_index[i] == > fs->info.input_semantic_index[j]) { > + interp = fs->info.input_interpolate[j]; > + break; > + } > + } > } > } > > ___ > mesa-dev mailing list > mesa-dev@lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/mesa-dev ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH] mesa: new MESA_LOG_FILE env var to log errors, warnings, etc., to a file
Looks good to me. Reviewed-by: Jose Fonseca Jose - Original Message - > --- > docs/envvars.html |2 ++ > src/mesa/main/errors.c | 14 -- > 2 files changed, 14 insertions(+), 2 deletions(-) > > diff --git a/docs/envvars.html b/docs/envvars.html > index fffb50a..102ea28 100644 > --- a/docs/envvars.html > +++ b/docs/envvars.html > @@ -42,6 +42,8 @@ sometimes be useful for debugging end-user issues. > printed to stderr. > If the value of MESA_DEBUG is 'FP' floating point arithmetic > errors will > generate exceptions. > +MESA_LOG_FILE - specifies a file name for logging all errors, > warnings, > +etc., rather than stderr > MESA_TEX_PROG - if set, implement conventional texture env modes > with > fragment programs (intended for developers only) > MESA_TNL_PROG - if set, implement conventional vertex > transformation > diff --git a/src/mesa/main/errors.c b/src/mesa/main/errors.c > index 69dbb65..ef78a0b 100644 > --- a/src/mesa/main/errors.c > +++ b/src/mesa/main/errors.c > @@ -801,12 +801,21 @@ output_if_debug(const char *prefixString, const > char *outputString, > GLboolean newline) > { > static int debug = -1; > + static FILE *fout = NULL; > > /* Init the local 'debug' var once. > * Note: the _mesa_init_debug() function should have been called > * by now so MESA_DEBUG_FLAGS will be initialized. > */ > if (debug == -1) { > + /* If MESA_LOG_FILE env var is set, log Mesa errors, warnings, > + * etc to the named file. Otherwise, output to stderr. > + */ > + const char *logFile = _mesa_getenv("MESA_LOG_FILE"); > + if (logFile) > + fout = fopen(logFile, "w"); > + if (!fout) > + fout = stderr; > #ifdef DEBUG >/* in debug builds, print messages unless MESA_DEBUG="silent" >*/ >if (MESA_DEBUG_FLAGS & DEBUG_SILENT) > @@ -821,9 +830,10 @@ output_if_debug(const char *prefixString, const > char *outputString, > > /* Now only print the string if we're required to do so. */ > if (debug) { > - fprintf(stderr, "%s: %s", prefixString, outputString); > + fprintf(fout, "%s: %s", prefixString, outputString); >if (newline) > - fprintf(stderr, "\n"); > + fprintf(fout, "\n"); > + fflush(fout); > > #if defined(_WIN32) && !defined(_WIN32_WCE) >/* stderr from windows applications without console is not >usually > -- > 1.7.3.4 > > ___ > mesa-dev mailing list > mesa-dev@lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/mesa-dev > ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH] llvmpipe: Remove the ARB_draw_instanced capability.
On Mon, Jun 25, 2012 at 05:34:25AM -0700, Jose Fonseca wrote: > - Original Message - > > That capability requires integer handling and that's not yet active, > > ending with a failure in draw-non-instanced unless you force it on. > > See bug 51366. > > > > Frankly, I'd rather have that patch rejected and integer/glsl 130 > > capability activated instead. There still are things missing, but > > they mostly have their own extension anyway. And the overall picture > > ain't so bad. > > I'm personally also more interested in seeing llvmpipe to get the missing > features for GLSL 1.30 / OGL 3. > > What's the overall picture of llvmpipe w/ integer/glsl 130? That is, how many > piglit tests go from skipped to passed/failed? To failed: precision-05.vert link-mismatch-layout-02 no-redeclaration-01.vert feature-macro.vert fs-exec-after-break - general failures, everybody has them vs-clip-distance-bulk-assign vs-clip-distance-inout-param vs-clip-distance-out-param vs-clip-distance-retval - haven't checked what the problem is, softpipe has it right fs-isinf-vec2 fs-isinf-vec3 fs-isinf-vec4 vs-isinf-vec2 vs-isinf-vec3 vs-isinf-vec4 - test is iffy fs-texelFetch-2D fs-texelFetchOffset-2D - no texelFetch support yet fs-texture-sampler2dshadow-10 fs-texture-sampler2dshadow-11 - dunno what's going on, softpipe fails it too vs-attrib-ivec4-implied vs-attrib-ivec4-precision vs-attrib-uvec4-implied vs-attrib-uvec4-precision - use glVertexAttribIPointer, which is GL 3.0+ only vs-textureLod-miplevels - issue with vertex shader invalidation when sampler mode changes (as in, it's not done) vs-textureLod-miplevels-2 - you know that one, it's nowhere near fixed yet (the softpipe patch is awaiting review too :-) texel-offset-limits - no limits defined in lp_screen.c, udnno whether texture() would take it into account either To pass: 1503 total, it seems, you can be sure I'm not going to list them :-) Best, OG. ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH] lp_build_lod_selector: Disable brilinear folding on explicit lod.
Does this fix the test because lp_build_brilinear_lod produces bogus values in this case or just because the test is strict about such filtering optimizations? In the latter case I'm not sure I really see much point. I'm surprised it can actually pass in either case since we drop all but the first lod per quad values on the floor anyway so I think you will get neither the right filtering weights between mipmaps nor even the right mip levels (if the integer part of the lod isn't the same) for anything but the first texel per quad. Roland On 06/25/2012 05:50 PM, Olivier Galibert wrote: Brilinear folding must only be used if the log2 was computed with brilinear too. Fixes fs-textureLod-miplevels. Signed-off-by: Olivier Galibert --- src/gallium/auxiliary/gallivm/lp_bld_sample.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/auxiliary/gallivm/lp_bld_sample.c b/src/gallium/auxiliary/gallivm/lp_bld_sample.c index d966788..9deda61 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_sample.c +++ b/src/gallium/auxiliary/gallivm/lp_bld_sample.c @@ -513,7 +513,7 @@ lp_build_lod_selector(struct lp_build_sample_context *bld, } if (mip_filter == PIPE_TEX_MIPFILTER_LINEAR) { - if (!(gallivm_debug & GALLIVM_DEBUG_NO_BRILINEAR)) { + if (!explicit_lod && !(gallivm_debug & GALLIVM_DEBUG_NO_BRILINEAR)) { lp_build_brilinear_lod(float_bld, lod, BRILINEAR_FACTOR, out_lod_ipart, out_lod_fpart); } ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH] lp_build_lod_selector: Disable brilinear folding on explicit lod.
My thoughts too. Brilinear filtering provides a significant boost, and I don't see why skip the optimization for explicit lod over implicit lods. We could make llvmpipe brilinear filtering conditional -- only do it when the mipmap levels are proper minifications (as opposed to totally different colors), so that behaviour on weird usage (and tests) is unaltered. We could also have an environment variable LP_CORRECTNESS_OVER_PERFORMANCE... Jose - Original Message - > Does this fix the test because lp_build_brilinear_lod produces bogus > values in this case or just because the test is strict about such > filtering optimizations? In the latter case I'm not sure I really see > much point. > I'm surprised it can actually pass in either case since we drop all > but > the first lod per quad values on the floor anyway so I think you will > get neither the right filtering weights between mipmaps nor even the > right mip levels (if the integer part of the lod isn't the same) for > anything but the first texel per quad. > > Roland > > On 06/25/2012 05:50 PM, Olivier Galibert wrote: > > Brilinear folding must only be used if the log2 was computed with > > brilinear too. Fixes fs-textureLod-miplevels. > > > > Signed-off-by: Olivier Galibert > > --- > > src/gallium/auxiliary/gallivm/lp_bld_sample.c |2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/src/gallium/auxiliary/gallivm/lp_bld_sample.c > > b/src/gallium/auxiliary/gallivm/lp_bld_sample.c > > index d966788..9deda61 100644 > > --- a/src/gallium/auxiliary/gallivm/lp_bld_sample.c > > +++ b/src/gallium/auxiliary/gallivm/lp_bld_sample.c > > @@ -513,7 +513,7 @@ lp_build_lod_selector(struct > > lp_build_sample_context *bld, > > } > > > > if (mip_filter == PIPE_TEX_MIPFILTER_LINEAR) { > > - if (!(gallivm_debug & GALLIVM_DEBUG_NO_BRILINEAR)) { > > + if (!explicit_lod && !(gallivm_debug & > > GALLIVM_DEBUG_NO_BRILINEAR)) { > >lp_build_brilinear_lod(float_bld, lod, BRILINEAR_FACTOR, > > out_lod_ipart, out_lod_fpart); > > } > > > > > ___ > mesa-dev mailing list > mesa-dev@lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/mesa-dev > ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] Mesa (master): draw: fix flat shading and screen-space linear interpolation in clipper
The specific commit that seems to break it is: 46931ecf480e1d231bb6c2236d91b5390f2465ac llvmpipe: Simplify and fix system variables fetch. On Mon, Jun 25, 2012 at 10:46 AM, Stéphane Marchesin wrote: > Hi Olivier, > > On top of the GL_SELECT regressions reported by Brian, this patch > series is causing regressions on i915g for: > > draw-instanced > draw-instanced-divisor > draw-elements-instanced-base-vertex > draw-elements-instanced-base-vertex-user_varrays > draw-non-instanced > instance-array-dereference > > Stéphane > > > On Thu, Jun 21, 2012 at 10:39 AM, Olivier Galibert wrote: >> On Thu, Jun 21, 2012 at 10:28:22AM -0700, Jose Fonseca wrote: >>> This patch series is causing regressions in select/feedback mode. Can you >>> take a look? >> >> Sure. I wouldn't have expected that case to ever happen, but it makes >> sense now that I think of it. >> >> commit edc7b26b03c0393582ff5ec8c963207c7553850a >> Author: Olivier Galibert >> Date: Thu Jun 21 19:37:11 2012 +0200 >> >> clip_init_state: Handle the case when there isn't a fragment shader. >> >> Signed-off-by: Olivier Galibert >> >> diff --git a/src/gallium/auxiliary/draw/draw_pipe_clip.c >> b/src/gallium/auxiliary/draw/draw_pipe_clip.c >> index 2d36eb3..c02d0ef 100644 >> --- a/src/gallium/auxiliary/draw/draw_pipe_clip.c >> +++ b/src/gallium/auxiliary/draw/draw_pipe_clip.c >> @@ -586,6 +586,9 @@ clip_init_state( struct draw_stage *stage ) >> * two outputs for one input, so we tuck the information in a >> * specific array. Second if they don't have qualifiers, the >> * default value has to be picked from the global shade mode. >> + * >> + * Of course, if we don't have a fragment shader in the first >> + * place, defaults should be used. >> */ >> >> /* First pick up the interpolation mode for >> @@ -595,10 +598,12 @@ clip_init_state( struct draw_stage *stage ) >> indexed_interp[0] = indexed_interp[1] = >> stage->draw->rasterizer->flatshade ? >> TGSI_INTERPOLATE_CONSTANT : TGSI_INTERPOLATE_PERSPECTIVE; >> >> - for (i = 0; i < fs->info.num_inputs; i++) { >> - if (fs->info.input_semantic_name[i] == TGSI_SEMANTIC_COLOR) { >> - if (fs->info.input_interpolate[i] != TGSI_INTERPOLATE_COLOR) >> - indexed_interp[fs->info.input_semantic_index[i]] = >> fs->info.input_interpolate[i]; >> + if (fs) { >> + for (i = 0; i < fs->info.num_inputs; i++) { >> + if (fs->info.input_semantic_name[i] == TGSI_SEMANTIC_COLOR) { >> + if (fs->info.input_interpolate[i] != TGSI_INTERPOLATE_COLOR) >> + indexed_interp[fs->info.input_semantic_index[i]] = >> fs->info.input_interpolate[i]; >> + } >> } >> } >> >> @@ -627,12 +632,14 @@ clip_init_state( struct draw_stage *stage ) >> */ >> uint j; >> interp = TGSI_INTERPOLATE_PERSPECTIVE; >> - for (j = 0; j < fs->info.num_inputs; j++) { >> - if (vs->info.output_semantic_name[i] == >> fs->info.input_semantic_name[j] && >> - vs->info.output_semantic_index[i] == >> fs->info.input_semantic_index[j]) { >> - interp = fs->info.input_interpolate[j]; >> - break; >> - } >> + if (fs) { >> + for (j = 0; j < fs->info.num_inputs; j++) { >> + if (vs->info.output_semantic_name[i] == >> fs->info.input_semantic_name[j] && >> + vs->info.output_semantic_index[i] == >> fs->info.input_semantic_index[j]) { >> + interp = fs->info.input_interpolate[j]; >> + break; >> + } >> + } >> } >> } >> >> ___ >> mesa-dev mailing list >> mesa-dev@lists.freedesktop.org >> http://lists.freedesktop.org/mailman/listinfo/mesa-dev ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH] llvmpipe: Remove the ARB_draw_instanced capability.
- Original Message - > On Mon, Jun 25, 2012 at 05:34:25AM -0700, Jose Fonseca wrote: > > - Original Message - > > > That capability requires integer handling and that's not yet > > > active, > > > ending with a failure in draw-non-instanced unless you force it > > > on. > > > See bug 51366. > > > > > > Frankly, I'd rather have that patch rejected and integer/glsl 130 > > > capability activated instead. There still are things missing, > > > but > > > they mostly have their own extension anyway. And the overall > > > picture > > > ain't so bad. > > > > I'm personally also more interested in seeing llvmpipe to get the > > missing features for GLSL 1.30 / OGL 3. > > > > What's the overall picture of llvmpipe w/ integer/glsl 130? That > > is, how many piglit tests go from skipped to passed/failed? > > To failed: > > precision-05.vert > link-mismatch-layout-02 > no-redeclaration-01.vert > feature-macro.vert > fs-exec-after-break > - general failures, everybody has them > > vs-clip-distance-bulk-assign > vs-clip-distance-inout-param > vs-clip-distance-out-param > vs-clip-distance-retval > - haven't checked what the problem is, softpipe has it right > > fs-isinf-vec2 > fs-isinf-vec3 > fs-isinf-vec4 > vs-isinf-vec2 > vs-isinf-vec3 > vs-isinf-vec4 > - test is iffy > > fs-texelFetch-2D > fs-texelFetchOffset-2D > - no texelFetch support yet > > fs-texture-sampler2dshadow-10 > fs-texture-sampler2dshadow-11 > - dunno what's going on, softpipe fails it too > > vs-attrib-ivec4-implied > vs-attrib-ivec4-precision > vs-attrib-uvec4-implied > vs-attrib-uvec4-precision > - use glVertexAttribIPointer, which is GL 3.0+ only > > vs-textureLod-miplevels > - issue with vertex shader invalidation when sampler mode changes > (as in, it's not done) > > vs-textureLod-miplevels-2 > - you know that one, it's nowhere near fixed yet (the softpipe > patch is awaiting review too :-) > > texel-offset-limits > - no limits defined in lp_screen.c, udnno whether texture() would > take it into account either > > To pass: > 1503 total, it seems, you can be sure I'm not going to list them :-) Thanks for the summary. I think that the biggest missing feature is texelFetch -- once there's a patch for it I'm happy to advertise GLSL 1.30, and treat the rest as bugs. Jose ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH 2/2] i965/msaa: Implement GL_SAMPLE_ALPHA_TO_{COVERAGE, ONE}.
On Fri, Jun 22, 2012 at 10:02 PM, Paul Berry wrote: > This patch enables the multisampling parameters > GL_SAMPLE_ALPHA_TO_COVERAGE and GL_SAMPLE_ALPHA_TO_ONE, which allow > the fragment shader's alpha output to be converted into a sample > coverage mask and ignored for blending. i965 supports these > parameters through the BLEND_STATE structure. > > The GL spec allows, but does not require, the implementation to dither > the conversion from alpha to a sample coverage mask, so that alpha > values that aren't a multiple of 1/num_samples result in the correct > proportion of samples being lit. A bit exists in the BLEND_STATE > structure to enable this functionality, but according to the hardware > docs it must be disabled on Sandy Bridge (see the Sandy Bridge PRM, > Vol2, Part1, p379: AlphaToCoverage Dither Enable). So it is enabled > for Gen7 only. > > Fixes piglit tests > "EXT_framebuffer_multisample/sample-alpha-to-{coverage,one} {2,4}". > --- > src/mesa/drivers/dri/i965/gen6_cc.c | 10 +- > 1 files changed, 9 insertions(+), 1 deletions(-) > > diff --git a/src/mesa/drivers/dri/i965/gen6_cc.c > b/src/mesa/drivers/dri/i965/gen6_cc.c > index b4c5329..e0523ef 100644 > --- a/src/mesa/drivers/dri/i965/gen6_cc.c > +++ b/src/mesa/drivers/dri/i965/gen6_cc.c > @@ -161,6 +161,13 @@ gen6_upload_blend_state(struct brw_context *brw) > blend[b].blend1.write_disable_g = !ctx->Color.ColorMask[b][1]; > blend[b].blend1.write_disable_b = !ctx->Color.ColorMask[b][2]; > blend[b].blend1.write_disable_a = !ctx->Color.ColorMask[b][3]; > + > + /* _NEW_MULTISAMPLE */ > + blend[b].blend1.alpha_to_coverage = > + ctx->Multisample._Enabled && ctx->Multisample.SampleAlphaToCoverage; > + blend[b].blend1.alpha_to_one = > + ctx->Multisample._Enabled && ctx->Multisample.SampleAlphaToOne; > + blend[b].blend1.alpha_to_coverage_dither = (brw->intel.gen >= 7); > } > > brw->state.dirty.cache |= CACHE_NEW_BLEND_STATE; > @@ -169,7 +176,8 @@ gen6_upload_blend_state(struct brw_context *brw) > const struct brw_tracked_state gen6_blend_state = { > .dirty = { > .mesa = (_NEW_COLOR | > - _NEW_BUFFERS), > + _NEW_BUFFERS | > + _NEW_MULTISAMPLE), > .brw = BRW_NEW_BATCH, > .cache = 0, > }, > -- > 1.7.7.6 > Verified that following piglit tests passes on Sandybridge with these patches: sample-coverage, sample-alpha-to-coverage and sample-alpha-to-one This series is: Reviewed-by: Anuj Phogat ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH] lp_build_lod_selector: Disable brilinear folding on explicit lod.
On Mon, Jun 25, 2012 at 07:31:20PM +0100, Roland Scheidegger wrote: > Does this fix the test because lp_build_brilinear_lod produces bogus > values in this case or just because the test is strict about such > filtering optimizations? In the latter case I'm not sure I really see > much point. Bogus. It does the fractional-part log2 approximation there, which only makes sense if you called fast_log2 before (and even then the log bias is going to be strangely applied, but meh). > I'm surprised it can actually pass in either case since we drop all but > the first lod per quad values on the floor anyway so I think you will > get neither the right filtering weights between mipmaps nor even the > right mip levels (if the integer part of the lod isn't the same) for > anything but the first texel per quad. Luck due to the design of the test. It's rectangles with a fixed lod value, so the quads all have the same. That's pretty much why I cooked up miplevels-2 (only in vs though, it's much easier there and the code is shared). OG. ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH] lp_build_lod_selector: Disable brilinear folding on explicit lod.
On Mon, Jun 25, 2012 at 11:40:08AM -0700, Jose Fonseca wrote: > My thoughts too. > > Brilinear filtering provides a significant boost, and I don't see why skip > the optimization for explicit lod over implicit lods. Warning: code misread :-) Explicit lod does not need brilinear filtering because explicit lod is post log2. Brilinear is only about a faster log2, nothing else. Explicit lod only needs the integer/fractional part separation. The whole code is: if (mip_filter == PIPE_TEX_MIPFILTER_LINEAR) { if (!explicit_lod && !(gallivm_debug & GALLIVM_DEBUG_NO_BRILINEAR)) { lp_build_brilinear_lod(float_bld, lod, BRILINEAR_FACTOR, out_lod_ipart, out_lod_fpart); } else { lp_build_ifloor_fract(float_bld, lod, out_lod_ipart, out_lod_fpart); } lp_build_name(*out_lod_fpart, "lod_fpart"); } else { *out_lod_ipart = lp_build_iround(float_bld, lod); } and you're not going to tell me that lp_build_brilinear_lod is faster than lp_build_ifloor_fract (especially since it includes it ;-) OG. ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH] [RFC] r600g: improve flushed depth texture allocation
Vadim Girlin wrote: On Mon, 2012-06-25 at 12:19 +0200, Andreas Boll wrote: 2012/6/24 Vadim Girlin : On Sun, 2012-06-24 at 17:43 +0400, Vadim Girlin wrote: Allocate flushed depth texture in the VRAM if we aren't going to access it by CPU. If we need CPU access later, then it'll be reallocated in the GTT. Currently it's not reallocated in the opposite direction (GTT->VRAM), though probably we might want to do it too. Anyway, it helps the apps that don't need to access flushed depth texture by CPU at all, e.g. Lightsmark. Improves performance for Lightsmark. Signed-off-by: Vadim Girlin --- You can also find this patch and some other patches that aren't committed yet (shader caching, dual export) in the r600-perf branch in my github mesa repo: git://github.com/VadimGirlin/mesa.git www: https://github.com/VadimGirlin/mesa/compare/r600-perf Could anybody test them for regressions on non-evergreen cards (R6xx/7xx/CAYMAN)? Vadim ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev following piglit tests regresses on my rv770: Thanks. I've updated the branch with a possible fix, could you test it again? With or without the fix my limited testing has found one fail case vs master. Using vdpau for mpeg2 decode is corrupt - you can still see what it's supposed to be it's just blocky. mesa demos, nexuiz, etqw and vdpau display look OK. ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH 00/10] docs: misc html and content cleanup
Here is the continuation of my docs cleanup work. I've updated some links, some outdated infos etc. Please review. Anyone: Could you point out some obsolete content in docs that I can get rid of? Because I'm not so familiar with the technical details yet. Brian: Could you by any chance synchronize the docs in git with the http://www.mesa3d.org webspace after applying this patch series? There have been a lot of changes by now. Andreas. Andreas Boll (10): docs/shading: use proper markup docs: add missing target attribute docs: escape html special char docs: whitespace cleanup docs: update some broken/old links docs/systems: add some useful driver links docs/devinfo: update release info docs/sourcetree: update some info docs/helpwanted: update some info docs/lists: add piglit mailing list docs/autoconf.html | 32 docs/devinfo.html| 41 +++-- docs/faq.html|2 +- docs/games.html |4 ++-- docs/helpwanted.html | 17 - docs/libraries.html |2 +- docs/lists.html |3 +++ docs/perf.html |2 +- docs/repository.html |4 ++-- docs/shading.html| 24 docs/sourcedocs.html |2 +- docs/sourcetree.html | 10 ++ docs/systems.html| 12 +++- docs/thanks.html |2 +- docs/utilities.html |2 +- 15 files changed, 81 insertions(+), 78 deletions(-) ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH 01/10] docs/shading: use proper markup
use dl instead of ul --- docs/shading.html | 22 +++--- 1 files changed, 11 insertions(+), 11 deletions(-) diff --git a/docs/shading.html b/docs/shading.html index 175e024..3718917 100644 --- a/docs/shading.html +++ b/docs/shading.html @@ -209,30 +209,30 @@ struct gl_shader_state }; - -EmitHighLevelInstructions - + +EmitHighLevelInstructions + This option controls instruction selection for loops and conditionals. If the option is set high-level IF/ELSE/ENDIF, LOOP/ENDLOOP, CONT/BRK instructions will be emitted. Otherwise, those constructs will be implemented with BRA instructions. - + -EmitCondCodes - +EmitCondCodes + If set, condition codes (ala GL_NV_fragment_program) will be used for branching and looping. Otherwise, ordinary registers will be used (the IF instruction will examine the first operand's X component and do the if-part if non-zero). This option is only relevant if EmitHighLevelInstructions is set. - + -EmitComments - +EmitComments + If set, instructions will be annoted with comments to help with debugging. Extra NOP instructions will also be inserted. - - + + Compiler Validation -- 1.7.1 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH 02/10] docs: add missing target attribute
target is needed for the frame based layout --- docs/games.html |4 ++-- docs/libraries.html |2 +- docs/shading.html |2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/games.html b/docs/games.html index eaa7f40..812c21d 100644 --- a/docs/games.html +++ b/docs/games.html @@ -15,7 +15,7 @@ - battle game http://bzflag.sourceforge.net/"; target="_parent">BZFLAG - 3-D tank battle game - http://www.speakeasy.org/%7Emorse/copter-commander";>Copter Commander - 2d multiplayer side scroller + http://www.speakeasy.org/%7Emorse/copter-commander"; target="_parent">Copter Commander - 2d multiplayer side scroller http://www.crystalspace.org/"; target="_parent">CrystalSpace - Free 3d game engine http://www.afn.org/%7Ecthugha/"; target="_parent">Cthugha - music-sync'ed @@ -40,7 +40,7 @@ http://jongl.home.pages.de/"; target="_parent">JONGL - Juggling simulator http://samba.anu.edu.au/KnightCap/"; target="_parent">KnightCap - chess game - http://www.hackcraft.de/games/linwarrior_3d/";>LinWarrior 3D - A Battle Mech Simulator + http://www.hackcraft.de/games/linwarrior_3d/"; target="_parent">LinWarrior 3D - A Battle Mech Simulator http://www.nada.kth.se/%7Ef96-lfo/lunar/"; target="_parent">Lunar Lander 2000 - 3D version of the classis lunar lander game http://www.majik3d.org/"; target="_parent">Majik 3D - an online role-playing diff --git a/docs/libraries.html b/docs/libraries.html index e9db427..b410bc1 100644 --- a/docs/libraries.html +++ b/docs/libraries.html @@ -10,7 +10,7 @@ Libraries and Toolkits -http://mrpowers.com/Apprentice/";>Apprentice - free OpenInventor work-alike +http://mrpowers.com/Apprentice/"; target="_parent">Apprentice - free OpenInventor work-alike http://www.coin3d.org/coin.html"; target="_parent">Coin - OSS Open Inventor clone http://www.softintegration.com/products/toolkit/opengl/"; target="_parent">Ch - OpenGL bindings for the Ch C/C++ interpreter http://www.cfdrc.com/FOX/fox.html"; target="_parent">FOX - GUI Library diff --git a/docs/shading.html b/docs/shading.html index 3718917..a9b7cfc 100644 --- a/docs/shading.html +++ b/docs/shading.html @@ -243,7 +243,7 @@ regressions. -The http://people.freedesktop.org/~nh/piglit/";>Piglit project +The http://people.freedesktop.org/~nh/piglit/"; target="_parent">Piglit project has many GLSL tests and the http://glean.sf.net"; target="_parent">Glean glsl1 test tests GLSL features. -- 1.7.1 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH 03/10] docs: escape html special char
--- docs/perf.html |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/docs/perf.html b/docs/perf.html index ec400c6..82e6b59 100644 --- a/docs/perf.html +++ b/docs/perf.html @@ -52,7 +52,7 @@ Performance tips for software rendering: GL_COLOR_MATERIAL is disabled No spot lights are used (all GL_SPOT_CUTOFFs are 180.0) No local lights are used (all position W's are 0.0) - All material and light coefficients are >= zero + All material and light coefficients are >= zero XFree86 users: if you want to use 24-bit color try starting your X server in 32-bit per pixel mode for better performance. That is, start your X server with -- 1.7.1 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH 04/10] docs: whitespace cleanup
--- docs/autoconf.html | 32 1 files changed, 16 insertions(+), 16 deletions(-) diff --git a/docs/autoconf.html b/docs/autoconf.html index 4f1ad8d..4fa96c3 100644 --- a/docs/autoconf.html +++ b/docs/autoconf.html @@ -10,18 +10,18 @@ Compilation and Installation using Autoconf -Basic Usage -Driver Options +Basic Usage +Driver Options Xlib Driver Options DRI Driver Options OSMesa Driver Options -Library Options +Library Options GLU -Demo Program Options +Demo Program Options @@ -149,13 +149,13 @@ configure option --with-driver. There are currently three supported options in the configure script. -XlibThis is the default mode for building Mesa. +XlibThis is the default mode for building Mesa. It uses Xlib as a software renderer to do all rendering. It corresponds to the option --with-driver=xlib. The libX11 and libXext libraries, as well as the X11 development headers, will be need to support the Xlib driver. -DRI This mode uses the DRI hardware drivers for +DRIThis mode uses the DRI hardware drivers for accelerated OpenGL rendering. Enable the DRI drivers with the option --with-driver=dri. See the basic installation instructions for details on prerequisites for the DRI @@ -163,12 +163,12 @@ drivers. ---with-dri-driverdir=DIR - This option specifies the +--with-dri-driverdir=DIR + This option specifies the location the DRI drivers will be installed to and the location libGL will search for DRI drivers. The default is ${libdir}/dri. ---with-dri-drivers=DRIVER,DRIVER,... - This option +--with-dri-drivers=DRIVER,DRIVER,... + This option allows a specific set of DRI drivers to be built. For example, --with-dri-drivers="swrast,i965,radeon,nouveau". By default, the drivers will be chosen depending on the target platform. @@ -177,16 +177,16 @@ for available drivers. Beware that the swrast DRI driver is used by both libGL and the X.Org xserver GLX module to do software rendering, so you may run into problems if it is not available. ---disable-driglx-direct - Disable direct rendering in +--disable-driglx-direct + Disable direct rendering in GLX. Normally, direct hardware rendering through the DRI drivers and indirect software rendering are enabled in GLX. This option disables direct rendering entirely. It can be useful on architectures where kernel DRM modules are not available. ---enable-glx-tls +--enable-glx-tls Enable Thread Local Storage (TLS) in GLX. ---with-expat=DIR The DRI-enabled libGL uses expat to +--with-expat=DIR The DRI-enabled libGL uses expat to parse the DRI configuration files in /etc/drirc and ~/.drirc. This option allows a specific expat installation to be used. For example, --with-expat=/usr/local will @@ -201,7 +201,7 @@ page for more details. ---with-osmesa-bits=BITS +--with-osmesa-bits=BITS This option allows the size of the color channel in bits to be specified. By default, an 8-bit channel will be used, and the driver will be named libOSMesa. Other @@ -235,7 +235,7 @@ the programs will be built depending on the driver and library options chosen. See the directory progs for the full set of demos. ---with-demos=DEMOS,DEMOS,... +--with-demos=DEMOS,DEMOS,... This option allows a specific set of demo programs to be built. For example, --with-demos="xdemos,slang". Beware that if this option is -- 1.7.1 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH 05/10] docs: update some broken/old links
--- docs/faq.html|2 +- docs/repository.html |4 ++-- docs/sourcedocs.html |2 +- docs/thanks.html |2 +- docs/utilities.html |2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/faq.html b/docs/faq.html index dbef6a5..fa90d5b 100644 --- a/docs/faq.html +++ b/docs/faq.html @@ -389,7 +389,7 @@ algorithms). In the mean time, a 3rd party http://homepage.hispeed.ch/rscheidegger/dri_experimental/s3tc_index.html"; +"http://dri.freedesktop.org/wiki/S3TC"; target="_parent">plug-in library is available. diff --git a/docs/repository.html b/docs/repository.html index 3e05871..adbfcf9 100644 --- a/docs/repository.html +++ b/docs/repository.html @@ -10,7 +10,7 @@ Code Repository -Mesa uses http://git.or.cz/"target="_parent";>git +Mesa uses http://git-scm.com"target="_parent";>git as its source code management system. @@ -95,7 +95,7 @@ Once your account is established: Windows Users -If you're http://git.or.cz/gitwiki/WindowsInstall"; target="_parent"> +If you're http://git.wiki.kernel.org/index.php/WindowsInstall"; target="_parent"> using git on Windows you'll want to enable automatic CR/LF conversion in your local copy of the repository: diff --git a/docs/sourcedocs.html b/docs/sourcedocs.html index 2b1633c..898ecac 100644 --- a/docs/sourcedocs.html +++ b/docs/sourcedocs.html @@ -24,7 +24,7 @@ the doxygen directory and run make. For an example of Doxygen usage in Mesa, see a recent source file -such as http://webcvs.freedesktop.org/mesa/Mesa/src/mesa/main/bufferobj.c?view=markup"; target="_parent">bufferobj.c. +such as http://cgit.freedesktop.org/mesa/mesa/tree/src/mesa/main/bufferobj.c"; target="_parent">bufferobj.c. diff --git a/docs/thanks.html b/docs/thanks.html index b9a2b27..6b658e3 100644 --- a/docs/thanks.html +++ b/docs/thanks.html @@ -33,7 +33,7 @@ Tungsten Graphics, Inc. have supported the ongoing development of Mesa. The -http://sourceforge.net/projects/mesa3d"; target="_parent">Mesa +http://www.mesa3d.org"; target="_parent">Mesa website is hosted by http://sourceforge.net"; target="_parent"> http://sourceforge.net/sflogo.php?group_id=3&type=1"; diff --git a/docs/utilities.html b/docs/utilities.html index c748169..8dd1df0 100644 --- a/docs/utilities.html +++ b/docs/utilities.html @@ -17,7 +17,7 @@ progs/util/ directory Allen Akin's http://glean.sourceforge.net/"; target="_parent">glean is a framework for OpenGL testing. -http://developer.kde.org/~sewardj/"; +http://www.valgrind.org"; target="_parent">Valgrind is a very useful tool for tracking down memory-related problems in your code. -- 1.7.1 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH 06/10] docs/systems: add some useful driver links
--- docs/systems.html | 12 +++- 1 files changed, 7 insertions(+), 5 deletions(-) diff --git a/docs/systems.html b/docs/systems.html index 751..171d128 100644 --- a/docs/systems.html +++ b/docs/systems.html @@ -26,12 +26,14 @@ and ES 2, OpenVG and the EGL interface. Hardware drivers include: -Intel i965, i945, i915. + Intel i965, i945, i915. See http://intellinuxgraphics.org/index.html"; target="_parent"> -Intel's website -AMD Radeon series -Some NVIDIA GPus. -VMware virtual GPU + Intel's website + AMD Radeon series. + See http://www.x.org/wiki/RadeonFeature"; target="_parent">RadeonFeature + NVIDIA GPUs. + See http://nouveau.freedesktop.org"; target="_parent">Nouveau Wiki + http://www.x.org/wiki/vmware"; target="_parent">VMware virtual GPU -- 1.7.1 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH 07/10] docs/devinfo: update release info
--- docs/devinfo.html | 41 +++-- 1 files changed, 19 insertions(+), 22 deletions(-) diff --git a/docs/devinfo.html b/docs/devinfo.html index 4828cc6..a469cba 100644 --- a/docs/devinfo.html +++ b/docs/devinfo.html @@ -163,36 +163,33 @@ branch is relevant. Verify and update version info - -Create/edit the docs/relnotes-x.y.html file to document what's new in the release. -Add the new relnotes-x.y.html file to relnotes.html. - - -Update the MESA_MAJOR, MESA_MINOR and MESA_TINY version numbers in -configs/default. -Also update the VERSION line in the top-level Makefile. - - - -Make sure the values in src/mesa/main/version.h are correct. - - - -Update docs/news.html. - + + configs/default + MESA_MAJOR, MESA_MINOR and MESA_TINY + Makefile.am + PACKAGE_VERSION + autoconf.ac + AC_INIT + src/mesa/main/version.h + MESA_MAJOR, MESA_MINOR, MESA_PATCH and MESA_VERSION_STRING + Create a docs/relnotes-x.y.z.html file. The bin/shortlog_mesa.sh script can be used to create a HTML-formatted list of changes to include in the file. -Link the new docs/relnotes-x.y.z.html file into the main relnotes.html file. +Link the new docs/relnotes-x.y.z.html file into the main relnotes.html file. + + + +Update docs/news.html. -Tag the files with the release name (in the form mesa_X_Y) -with: git tag -a mesa_X_Y -Then: git push origin mesa_X_Y +Tag the files with the release name (in the form mesa-x.y) +with: git tag -a mesa-x.y +Then: git push origin mesa-x.y @@ -206,7 +203,7 @@ Make the distribution files. From inside the Mesa directory: After the tarballs are created, the md5 checksums for the files will be computed. -Add them to the docs/relnotes-X.Y.html file. +Add them to the docs/relnotes-x.y.html file. -- 1.7.1 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH 08/10] docs/sourcetree: update some info
--- docs/sourcetree.html | 10 ++ 1 files changed, 6 insertions(+), 4 deletions(-) diff --git a/docs/sourcetree.html b/docs/sourcetree.html index abc5e39..42675d9 100644 --- a/docs/sourcetree.html +++ b/docs/sourcetree.html @@ -43,6 +43,8 @@ each directory. common - code shared by all DRI drivers i915 - driver for Intel i915/i945 i965 - driver for Intel i965 + radeon - driver for ATI R100 + r200 - driver for ATI R200 XXX more x11 - Xlib-based software driver @@ -90,7 +92,9 @@ each directory. i915 - Driver for Intel i915/i945. llvmpipe - Software driver using LLVM for runtime code generation. nv* - Drivers for NVIDIA GPUs. - r300 - Driver for ATI/AMD R300. + radeonsi - Driver for AMD Southern Island. + r300 - Driver for ATI R300 - R500. + r600 - Driver for ATI/AMD R600 - Northern Island. softpipe - Software reference driver. svga - Driver for VMware's SVGA virtual GPU. trace - Driver for tracing Gallium calls. @@ -127,9 +131,8 @@ each directory. dri - Meta state tracker for DRI drivers egl - Meta state tracker for EGL drivers es - OpenGL ES 1.x and 2.x state trackers - g3dvl - glx - Meta state tracker for GLX - python - + vdpau - VDPAU state tracker vega - OpenVG 1.x state tracker wgl - xorg - Meta state tracker for Xorg video drivers @@ -137,7 +140,6 @@ each directory. winsys - drm - - g3dvl - gdi - xlib - -- 1.7.1 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH 09/10] docs/helpwanted: update some info
--- docs/helpwanted.html | 17 - 1 files changed, 8 insertions(+), 9 deletions(-) diff --git a/docs/helpwanted.html b/docs/helpwanted.html index 444c12b..cfa057e 100644 --- a/docs/helpwanted.html +++ b/docs/helpwanted.html @@ -17,33 +17,32 @@ Here are some specific ideas and areas where help would be appreciated: Driver patching and testing. -Patches are often posted to the mesa3d-dev mailing list, but aren't +Patches are often posted to the http://lists.freedesktop.org/mailman/listinfo/mesa-dev"; target="_parent">mesa-dev mailing list, but aren't immediately checked into git because not enough people are testing them. Just applying patches, testing and reporting back is helpful. Driver debugging. -There are plenty of open bugs in the bug database. +There are plenty of open bugs in the https://bugs.freedesktop.org/describecomponents.cgi?product=Mesa"; target="_parent">bug database. Remove aliasing warnings. Enable gcc -Wstrict-aliasing=2 -fstrict-aliasing and track down aliasing issues in the code. Windows driver building, testing and maintenance. -The Visual Studio project files aren't always updated in a timely manner -when new source files are added or old ones are removed. -Fixing these tends to delay new Mesa releases. +Fixing MSVC builds. Maintenance and testing of lesser-used drivers. -Drivers such as DOS/DJGPP, GGI, etc that aren't being maintained are being -deprecated starting in Mesa 7.3. +Drivers such as i810, mach64, mga, r128, savage, sis, tdfx, unichrome, etc that aren't being maintained are being +deprecated starting in Mesa 8.0. +They have to be ported to DRI2 to be accepted in mesa master again. Contribute more tests to -http://glean.sourceforge.net/"; target="_parent">glean. +http://people.freedesktop.org/~nh/piglit/"; target="_parent">Piglit. Automatic testing. It would be great if someone would set up an automated system for grabbing -the latest Mesa code and run tests (such as glean) then report issues to +the latest Mesa code and run tests (such as piglit) then report issues to the mailing list. -- 1.7.1 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH 10/10] docs/lists: add piglit mailing list
--- docs/lists.html |3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/docs/lists.html b/docs/lists.html index d89bcff..e415fc9 100644 --- a/docs/lists.html +++ b/docs/lists.html @@ -32,6 +32,9 @@ In general, people should not post to this list. target="_parent">mesa-announce - announcements of new Mesa versions are sent to this list. Very low traffic. +http://lists.freedesktop.org/mailman/listinfo/piglit"; +target="_parent">piglit - for Piglit (OpenGL driver testing framework) discussion. + -- 1.7.1 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH 00/10] docs: misc html and content cleanup
On 06/25/2012 02:21 PM, Andreas Boll wrote: Here is the continuation of my docs cleanup work. I've updated some links, some outdated infos etc. Please review. Anyone: Could you point out some obsolete content in docs that I can get rid of? There's a bunch of links to games, vis apps, etc that use Mesa which could probably be removed. Because I'm not so familiar with the technical details yet. Brian: Could you by any chance synchronize the docs in git with the http://www.mesa3d.org webspace after applying this patch series? There have been a lot of changes by now. Andreas. Andreas Boll (10): docs/shading: use proper markup docs: add missing target attribute docs: escape html special char docs: whitespace cleanup docs: update some broken/old links docs/systems: add some useful driver links docs/devinfo: update release info docs/sourcetree: update some info docs/helpwanted: update some info docs/lists: add piglit mailing list docs/autoconf.html | 32 docs/devinfo.html| 41 +++-- docs/faq.html|2 +- docs/games.html |4 ++-- docs/helpwanted.html | 17 - docs/libraries.html |2 +- docs/lists.html |3 +++ docs/perf.html |2 +- docs/repository.html |4 ++-- docs/shading.html| 24 docs/sourcedocs.html |2 +- docs/sourcetree.html | 10 ++ docs/systems.html| 12 +++- docs/thanks.html |2 +- docs/utilities.html |2 +- 15 files changed, 81 insertions(+), 78 deletions(-) These all look good to me. I'll push them in a bit and update the website. Thanks. -Brian ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH] lp_build_lod_selector: Disable brilinear folding on explicit lod.
- Original Message - > On Mon, Jun 25, 2012 at 11:40:08AM -0700, Jose Fonseca wrote: > > My thoughts too. > > > > Brilinear filtering provides a significant boost, and I don't see > > why skip the optimization for explicit lod over implicit lods. > > Warning: code misread :-) > > Explicit lod does not need brilinear filtering because explicit lod > is > post log2. Brilinear is only about a faster log2, nothing else. > Explicit lod only needs the integer/fractional part separation. > > The whole code is: >if (mip_filter == PIPE_TEX_MIPFILTER_LINEAR) { > if (!explicit_lod && !(gallivm_debug & > GALLIVM_DEBUG_NO_BRILINEAR)) { > lp_build_brilinear_lod(float_bld, lod, BRILINEAR_FACTOR, > out_lod_ipart, out_lod_fpart); > } > else { > lp_build_ifloor_fract(float_bld, lod, out_lod_ipart, > out_lod_fpart); > } > > lp_build_name(*out_lod_fpart, "lod_fpart"); >} >else { > *out_lod_ipart = lp_build_iround(float_bld, lod); >} > > and you're not going to tell me that lp_build_brilinear_lod is faster > than lp_build_ifloor_fract (especially since it includes it ;-) Indeed lp_build_brilinear_lod is not faster than lp_build_ifloor_fract, but brilinear is faster, not because log is a faster approximation, but because it increases the odds that fract part is zero, which means that we can sample from a single mip level, instead of lerping between two mip levels. I think you have a good point here -- lp_build_brilinear_lod is a log2 approximation which is wrong here and that's a great catch, -- but I have a point too: lp_build_ifloor_fract will slow down texture sampling. Just like log2 and brilinear log2, we need a variant of ifloor_fract, that increases the probability of fract part being zero, essentially by applying a stair case transformation like: / / / / / Jose ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH 00/13] Improve integer texture support & add i965 texture_rgb10_a2ui support
v1: * Improve integer texture support * Add i965 texture_rgb10_a2ui support Jordan Justen (13): mesa formats: add integer type/format detection routines mesa: use integers in glReadPixels for GL_RGBA with integer types mesa: use _mesa_problem instead of assert for unsupported format/types mesa formats: unpack ARGB/XRGB mesa formats: allow non-integer formats to be used for integer packing mesa pack: handle uint and int clamping properly mesa pack: handle packed integer formats with clamping ReadPixels: handle signed/unsigned integer clamping GetTexImage: handle signed/unsigned integer clamping mesa texstore: handle signed/unsigned integer clamping mesa formats: add MESA_FORMAT_ABGR2101010_UINT mesa: allow CopyTexSubImage on integer formats i965: add ARB_texture_rgb10_a2ui support src/mesa/drivers/common/meta.c | 15 +- src/mesa/drivers/dri/i965/brw_wm_surface_state.c |1 + src/mesa/drivers/dri/intel/intel_extensions.c|1 + src/mesa/main/drawpix.c |2 +- src/mesa/main/format_pack.c | 28 ++ src/mesa/main/format_unpack.c| 69 + src/mesa/main/formats.c | 164 src/mesa/main/formats.h | 15 ++ src/mesa/main/image.c| 76 -- src/mesa/main/image.h|3 - src/mesa/main/pack.c | 134 +- src/mesa/main/pack.h | 12 +- src/mesa/main/pack_int_cases_tmp.h | 304 ++ src/mesa/main/pack_tmp.h | 20 +- src/mesa/main/readpix.c | 17 +- src/mesa/main/texformat.c|1 + src/mesa/main/texgetimage.c | 12 +- src/mesa/main/teximage.c | 10 +- src/mesa/main/texstore.c | 162 ++-- src/mesa/state_tracker/st_cb_drawpixels.c|2 +- src/mesa/swrast/s_texfetch.c |8 +- 21 files changed, 916 insertions(+), 140 deletions(-) create mode 100644 src/mesa/main/pack_int_cases_tmp.h -- 1.7.9.5 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH 01/13] mesa formats: add integer type/format detection routines
_mesa_is_integer_format is moved to formats.c and renamed as _mesa_is_enum_format_integer. _mesa_is_format_unsigned, _mesa_is_type_integer, _mesa_is_type_unsigned, and _mesa_is_enum_format_or_type_integer are added. Signed-off-by: Jordan Justen --- src/mesa/main/drawpix.c |2 +- src/mesa/main/formats.c | 149 + src/mesa/main/formats.h | 14 +++ src/mesa/main/image.c | 76 --- src/mesa/main/image.h |3 - src/mesa/main/pack.c |8 +- src/mesa/main/readpix.c |6 +- src/mesa/main/teximage.c | 10 +- src/mesa/state_tracker/st_cb_drawpixels.c |2 +- 9 files changed, 177 insertions(+), 93 deletions(-) diff --git a/src/mesa/main/drawpix.c b/src/mesa/main/drawpix.c index def55dd..61d098c 100644 --- a/src/mesa/main/drawpix.c +++ b/src/mesa/main/drawpix.c @@ -89,7 +89,7 @@ _mesa_DrawPixels( GLsizei width, GLsizei height, * input), NVIDIA's implementation also just returns this error despite * exposing GL_EXT_texture_integer, just return an error regardless. */ - if (_mesa_is_integer_format(format)) { + if (_mesa_is_enum_format_integer(format)) { _mesa_error(ctx, GL_INVALID_OPERATION, "glDrawPixels(integer format)"); goto end; } diff --git a/src/mesa/main/formats.c b/src/mesa/main/formats.c index ccc0b17..bd1ecbf 100644 --- a/src/mesa/main/formats.c +++ b/src/mesa/main/formats.c @@ -1712,6 +1712,17 @@ _mesa_is_format_integer_color(gl_format format) /** + * Is the given format an unsigned integer format? + */ +GLboolean +_mesa_is_format_unsigned(gl_format format) +{ + const struct gl_format_info *info = _mesa_get_format_info(format); + return _mesa_is_type_unsigned(info->DataType); +} + + +/** * Return color encoding for given format. * \return GL_LINEAR or GL_SRGB */ @@ -2935,3 +2946,141 @@ _mesa_format_matches_format_and_type(gl_format gl_format, return GL_FALSE; } + + +/** + * Test if the given format is an integer (non-normalized) format. + */ +GLboolean +_mesa_is_enum_format_integer(GLenum format) +{ + switch (format) { + /* generic integer formats */ + case GL_RED_INTEGER_EXT: + case GL_GREEN_INTEGER_EXT: + case GL_BLUE_INTEGER_EXT: + case GL_ALPHA_INTEGER_EXT: + case GL_RGB_INTEGER_EXT: + case GL_RGBA_INTEGER_EXT: + case GL_BGR_INTEGER_EXT: + case GL_BGRA_INTEGER_EXT: + case GL_LUMINANCE_INTEGER_EXT: + case GL_LUMINANCE_ALPHA_INTEGER_EXT: + case GL_RG_INTEGER: + /* specific integer formats */ + case GL_RGBA32UI_EXT: + case GL_RGB32UI_EXT: + case GL_RG32UI: + case GL_R32UI: + case GL_ALPHA32UI_EXT: + case GL_INTENSITY32UI_EXT: + case GL_LUMINANCE32UI_EXT: + case GL_LUMINANCE_ALPHA32UI_EXT: + case GL_RGBA16UI_EXT: + case GL_RGB16UI_EXT: + case GL_RG16UI: + case GL_R16UI: + case GL_ALPHA16UI_EXT: + case GL_INTENSITY16UI_EXT: + case GL_LUMINANCE16UI_EXT: + case GL_LUMINANCE_ALPHA16UI_EXT: + case GL_RGBA8UI_EXT: + case GL_RGB8UI_EXT: + case GL_RG8UI: + case GL_R8UI: + case GL_ALPHA8UI_EXT: + case GL_INTENSITY8UI_EXT: + case GL_LUMINANCE8UI_EXT: + case GL_LUMINANCE_ALPHA8UI_EXT: + case GL_RGBA32I_EXT: + case GL_RGB32I_EXT: + case GL_RG32I: + case GL_R32I: + case GL_ALPHA32I_EXT: + case GL_INTENSITY32I_EXT: + case GL_LUMINANCE32I_EXT: + case GL_LUMINANCE_ALPHA32I_EXT: + case GL_RGBA16I_EXT: + case GL_RGB16I_EXT: + case GL_RG16I: + case GL_R16I: + case GL_ALPHA16I_EXT: + case GL_INTENSITY16I_EXT: + case GL_LUMINANCE16I_EXT: + case GL_LUMINANCE_ALPHA16I_EXT: + case GL_RGBA8I_EXT: + case GL_RGB8I_EXT: + case GL_RG8I: + case GL_R8I: + case GL_ALPHA8I_EXT: + case GL_INTENSITY8I_EXT: + case GL_LUMINANCE8I_EXT: + case GL_LUMINANCE_ALPHA8I_EXT: + case GL_RGB10_A2UI: + return GL_TRUE; + default: + return GL_FALSE; + } +} + + +/** + * Test if the given type is an integer (non-normalized) format. + */ +GLboolean +_mesa_is_type_integer(GLenum type) +{ + switch (type) { + case GL_INT: + case GL_UNSIGNED_INT: + case GL_SHORT: + case GL_UNSIGNED_SHORT: + case GL_BYTE: + case GL_UNSIGNED_BYTE: + return GL_TRUE; + default: + return GL_FALSE; + } +} + + +/** + * Test if the given format or type is an integer (non-normalized) format. + */ +extern GLboolean +_mesa_is_enum_format_or_type_integer(GLenum format, GLenum type) +{ + return _mesa_is_enum_format_integer(format) || _mesa_is_type_integer(type); +} + + +GLboolean +_mesa_is_type_unsigned(GLenum type) +{ + switch (type) { + case GL_UNSIGNED_INT: + case GL_UNSIGNED_INT_8_8_8_8: + case GL_UNSIGNED_INT_8_8_8_8_REV: + case GL_UNSIGNED_INT_10_10_10_2: + case GL_UNSIGNED_INT_2_10_10_10_REV: + + case GL_UNSIGNED_SHORT: + case GL_UNSIGNED_SHORT_4_4_4_4: + case GL_UNSIGNED_SHORT_5_5_5_1: + case GL_UNSIGNED_SHORT_5_6_5: + case GL_
[Mesa-dev] [PATCH 02/13] mesa: use integers in glReadPixels for GL_RGBA with integer types
Previously if a format of GL_RGBA was used, then float data would be returned, even if the type was an integer type. Signed-off-by: Jordan Justen --- src/mesa/main/readpix.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mesa/main/readpix.c b/src/mesa/main/readpix.c index 4058019..e3c4611 100644 --- a/src/mesa/main/readpix.c +++ b/src/mesa/main/readpix.c @@ -337,7 +337,7 @@ slow_read_rgba_pixels( struct gl_context *ctx, goto done; for (j = 0; j < height; j++) { - if (_mesa_is_enum_format_integer(format)) { + if (_mesa_is_integer_format_or_type(format, type)) { _mesa_unpack_uint_rgba_row(rbFormat, width, map, (GLuint (*)[4]) rgba); _mesa_rebase_rgba_uint(width, (GLuint (*)[4]) rgba, rb->_BaseFormat); -- 1.7.9.5 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH 03/13] mesa: use _mesa_problem instead of assert for unsupported format/types
For unsupported formats & types, use _mesa_problem, rather than assert. Signed-off-by: Jordan Justen --- src/mesa/main/pack.c | 17 ++--- src/mesa/main/pack_tmp.h |9 - 2 files changed, 18 insertions(+), 8 deletions(-) diff --git a/src/mesa/main/pack.c b/src/mesa/main/pack.c index 388d635..a0c4fb3 100644 --- a/src/mesa/main/pack.c +++ b/src/mesa/main/pack.c @@ -500,26 +500,29 @@ _mesa_pack_rgba_span_int(struct gl_context *ctx, GLuint n, GLuint rgba[][4], { switch(dstType) { case GL_UNSIGNED_INT: - pack_uint_from_uint_rgba(dstAddr, dstFormat, rgba, n); + pack_uint_from_uint_rgba(ctx, dstAddr, dstFormat, rgba, n); break; case GL_INT: /* No conversion necessary. */ - pack_uint_from_uint_rgba(dstAddr, dstFormat, rgba, n); + pack_uint_from_uint_rgba(ctx, dstAddr, dstFormat, rgba, n); break; case GL_UNSIGNED_SHORT: - pack_ushort_from_uint_rgba(dstAddr, dstFormat, rgba, n); + pack_ushort_from_uint_rgba(ctx, dstAddr, dstFormat, rgba, n); break; case GL_SHORT: - pack_short_from_uint_rgba(dstAddr, dstFormat, rgba, n); + pack_short_from_uint_rgba(ctx, dstAddr, dstFormat, rgba, n); break; case GL_UNSIGNED_BYTE: - pack_ubyte_from_uint_rgba(dstAddr, dstFormat, rgba, n); + pack_ubyte_from_uint_rgba(ctx, dstAddr, dstFormat, rgba, n); break; case GL_BYTE: - pack_byte_from_uint_rgba(dstAddr, dstFormat, rgba, n); + pack_byte_from_uint_rgba(ctx, dstAddr, dstFormat, rgba, n); break; default: - assert(0); + _mesa_problem(ctx, + "Unsupported type (%s) for format (%s)", + _mesa_lookup_enum_by_nr(dstType), + _mesa_lookup_enum_by_nr(dstFormat)); return; } } diff --git a/src/mesa/main/pack_tmp.h b/src/mesa/main/pack_tmp.h index 83b6557..0d4eb38 100644 --- a/src/mesa/main/pack_tmp.h +++ b/src/mesa/main/pack_tmp.h @@ -22,7 +22,8 @@ */ static void -FN_NAME(DST_TYPE *dst, +FN_NAME(struct gl_context *ctx, + DST_TYPE *dst, GLenum dstFormat, SRC_TYPE rgba[][4], int n) @@ -111,5 +112,11 @@ FN_NAME(DST_TYPE *dst, dst[i*2+1] = SRC_CONVERT(rgba[i][ACOMP]); } break; + + default: + _mesa_problem(ctx, + "Unsupported format (%s)", + _mesa_lookup_enum_by_nr(dstFormat)); + break; } } -- 1.7.9.5 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH 04/13] mesa formats: unpack ARGB8888/XRGB8888
Signed-off-by: Jordan Justen --- src/mesa/main/format_unpack.c | 34 ++ 1 file changed, 34 insertions(+) diff --git a/src/mesa/main/format_unpack.c b/src/mesa/main/format_unpack.c index c42bac1..d1daae5 100644 --- a/src/mesa/main/format_unpack.c +++ b/src/mesa/main/format_unpack.c @@ -2139,6 +2139,32 @@ unpack_int_rgba_RGBA_INT8(const GLbyte *src, GLuint dst[][4], GLuint n) } static void +unpack_int_rgba_ARGB(const GLbyte *src, GLuint dst[][4], GLuint n) +{ + unsigned int i; + + for (i = 0; i < n; i++) { + dst[i][RCOMP] = (GLubyte) src[i * 4 + 2]; + dst[i][GCOMP] = (GLubyte) src[i * 4 + 1]; + dst[i][BCOMP] = (GLubyte) src[i * 4 + 0]; + dst[i][ACOMP] = (GLubyte) src[i * 4 + 3]; + } +} + +static void +unpack_int_rgba_XRGB(const GLbyte *src, GLuint dst[][4], GLuint n) +{ + unsigned int i; + + for (i = 0; i < n; i++) { + dst[i][RCOMP] = (GLubyte) src[i * 4 + 2]; + dst[i][GCOMP] = (GLubyte) src[i * 4 + 1]; + dst[i][BCOMP] = (GLubyte) src[i * 4 + 0]; + dst[i][ACOMP] = (GLubyte) 0xff; + } +} + +static void unpack_int_rgba_RGB_UINT32(const GLuint *src, GLuint dst[][4], GLuint n) { unsigned int i; @@ -2590,6 +2616,14 @@ _mesa_unpack_uint_rgba_row(gl_format format, GLuint n, unpack_int_rgba_RGBA_INT8(src, dst, n); break; + case MESA_FORMAT_ARGB: + unpack_int_rgba_ARGB(src, dst, n); + break; + + case MESA_FORMAT_XRGB: + unpack_int_rgba_XRGB(src, dst, n); + break; + case MESA_FORMAT_RGB_UINT32: case MESA_FORMAT_RGB_INT32: unpack_int_rgba_RGB_UINT32(src, dst, n); -- 1.7.9.5 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH 05/13] mesa formats: allow non-integer formats to be used for integer packing
For example format=GL_RGBA with type=GL_UNSIGNED_BYTE will be treated the same as format=GL_RGBA_INTEGER_EXT with type=GL_UNSIGNED_BYTE. Signed-off-by: Jordan Justen --- src/mesa/main/pack_tmp.h | 11 +++ 1 file changed, 11 insertions(+) diff --git a/src/mesa/main/pack_tmp.h b/src/mesa/main/pack_tmp.h index 0d4eb38..178cbbc 100644 --- a/src/mesa/main/pack_tmp.h +++ b/src/mesa/main/pack_tmp.h @@ -32,30 +32,35 @@ FN_NAME(struct gl_context *ctx, switch (dstFormat) { case GL_RED_INTEGER_EXT: + case GL_RED: for (i=0;ihttp://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH 06/13] mesa pack: handle uint and int clamping properly
Rename _mesa_pack_rgba_span_int to _mesa_pack_rgba_span_from_uints. Add _mesa_pack_rgba_span_from_ints. These separate routines allow the integer clamping to be handled properly for signed versus unsigned integers. Signed-off-by: Jordan Justen --- src/mesa/main/pack.c| 107 +-- src/mesa/main/pack.h| 12 +++-- src/mesa/main/readpix.c |4 +- src/mesa/main/texgetimage.c |4 +- 4 files changed, 115 insertions(+), 12 deletions(-) diff --git a/src/mesa/main/pack.c b/src/mesa/main/pack.c index a0c4fb3..9fb8771 100644 --- a/src/mesa/main/pack.c +++ b/src/mesa/main/pack.c @@ -461,6 +461,14 @@ get_type_min_max(GLenum type, GLfloat *min, GLfloat *max) #undef SRC_CONVERT #undef FN_NAME +#define DST_TYPE GLint +#define SRC_CONVERT(x) MIN2(x, 0x7fff) +#define FN_NAME pack_int_from_uint_rgba +#include "pack_tmp.h" +#undef DST_TYPE +#undef SRC_CONVERT +#undef FN_NAME + #define DST_TYPE GLushort #define SRC_CONVERT(x) MIN2(x, 0x) #define FN_NAME pack_ushort_from_uint_rgba @@ -493,18 +501,21 @@ get_type_min_max(GLenum type, GLfloat *min, GLfloat *max) #undef SRC_CONVERT #undef FN_NAME +#undef SRC_TYPE + void -_mesa_pack_rgba_span_int(struct gl_context *ctx, GLuint n, GLuint rgba[][4], - GLenum dstFormat, GLenum dstType, - GLvoid *dstAddr) +_mesa_pack_rgba_span_from_uints(struct gl_context *ctx, GLuint n, GLuint rgba[][4], +GLenum dstFormat, GLenum dstType, +GLvoid *dstAddr) { + GLuint i; /* Used in pack_int_cases_tmp.h */ + switch(dstType) { case GL_UNSIGNED_INT: pack_uint_from_uint_rgba(ctx, dstAddr, dstFormat, rgba, n); break; case GL_INT: - /* No conversion necessary. */ - pack_uint_from_uint_rgba(ctx, dstAddr, dstFormat, rgba, n); + pack_int_from_uint_rgba(ctx, dstAddr, dstFormat, rgba, n); break; case GL_UNSIGNED_SHORT: pack_ushort_from_uint_rgba(ctx, dstAddr, dstFormat, rgba, n); @@ -518,6 +529,92 @@ _mesa_pack_rgba_span_int(struct gl_context *ctx, GLuint n, GLuint rgba[][4], case GL_BYTE: pack_byte_from_uint_rgba(ctx, dstAddr, dstFormat, rgba, n); break; + + default: + _mesa_problem(ctx, + "Unsupported type (%s) for format (%s)", + _mesa_lookup_enum_by_nr(dstType), + _mesa_lookup_enum_by_nr(dstFormat)); + return; + } +} + + +/* Customization of integer packing. We always treat src as int, and can pack dst + * as any integer type/format combo. + */ +#define SRC_TYPE GLint + +#define DST_TYPE GLuint +#define SRC_CONVERT(x) MAX2(x, 0) +#define FN_NAME pack_uint_from_int_rgba +#include "pack_tmp.h" +#undef DST_TYPE +#undef SRC_CONVERT +#undef FN_NAME + +#define DST_TYPE GLushort +#define SRC_CONVERT(x) MAX2(x, 0) +#define FN_NAME pack_ushort_from_int_rgba +#include "pack_tmp.h" +#undef DST_TYPE +#undef SRC_CONVERT +#undef FN_NAME + +#define DST_TYPE GLshort +#define SRC_CONVERT(x) CLAMP(x, -0x8000, 0x7fff) +#define FN_NAME pack_short_from_int_rgba +#include "pack_tmp.h" +#undef DST_TYPE +#undef SRC_CONVERT +#undef FN_NAME + +#define DST_TYPE GLubyte +#define SRC_CONVERT(x) MAX2(x, 0) +#define FN_NAME pack_ubyte_from_int_rgba +#include "pack_tmp.h" +#undef DST_TYPE +#undef SRC_CONVERT +#undef FN_NAME + +#define DST_TYPE GLbyte +#define SRC_CONVERT(x) CLAMP(x, -0x80, 0x7f) +#define FN_NAME pack_byte_from_int_rgba +#include "pack_tmp.h" +#undef DST_TYPE +#undef SRC_CONVERT +#undef FN_NAME + +#undef SRC_TYPE + +void +_mesa_pack_rgba_span_from_ints(struct gl_context *ctx, GLuint n, GLint rgba[][4], + GLenum dstFormat, GLenum dstType, + GLvoid *dstAddr) +{ + GLuint i; /* Used in pack_int_cases_tmp.h */ + + switch(dstType) { + case GL_UNSIGNED_INT: + pack_uint_from_int_rgba(ctx, dstAddr, dstFormat, rgba, n); + break; + case GL_INT: + /* No conversion necessary. */ + pack_uint_from_uint_rgba(ctx, dstAddr, dstFormat, rgba, n); + break; + case GL_UNSIGNED_SHORT: + pack_ushort_from_int_rgba(ctx, dstAddr, dstFormat, rgba, n); + break; + case GL_SHORT: + pack_short_from_int_rgba(ctx, dstAddr, dstFormat, rgba, n); + break; + case GL_UNSIGNED_BYTE: + pack_ubyte_from_int_rgba(ctx, dstAddr, dstFormat, rgba, n); + break; + case GL_BYTE: + pack_byte_from_int_rgba(ctx, dstAddr, dstFormat, rgba, n); + break; + default: _mesa_problem(ctx, "Unsupported type (%s) for format (%s)", diff --git a/src/mesa/main/pack.h b/src/mesa/main/pack.h index cd49c74..2fbdf91 100644 --- a/src/mesa/main/pack.h +++ b/src/mesa/main/pack.h @@ -145,9 +145,15 @@ _mesa_unpack_image(GLuint dimensions, void -_mesa_pack_rgba_span_int(struct gl_context *ctx, GLuint n, GLuint rgba[][4], - GLenum dstFormat, GLenum dstType, - GLvoid *dstAd
[Mesa-dev] [PATCH 07/13] mesa pack: handle packed integer formats with clamping
pack_int_cases_tmp.h is included in two places: _mesa_pack_rgba_span_from_ints with GLint rgba[][4] and _mesa_pack_rgba_span_from_uints with GLuint rgba[][4] Signed-off-by: Jordan Justen --- src/mesa/main/pack.c |6 + src/mesa/main/pack_int_cases_tmp.h | 304 2 files changed, 310 insertions(+) create mode 100644 src/mesa/main/pack_int_cases_tmp.h diff --git a/src/mesa/main/pack.c b/src/mesa/main/pack.c index 9fb8771..613d68b 100644 --- a/src/mesa/main/pack.c +++ b/src/mesa/main/pack.c @@ -530,6 +530,9 @@ _mesa_pack_rgba_span_from_uints(struct gl_context *ctx, GLuint n, GLuint rgba[][ pack_byte_from_uint_rgba(ctx, dstAddr, dstFormat, rgba, n); break; + /* Packed integer cases */ +#include "pack_int_cases_tmp.h" + default: _mesa_problem(ctx, "Unsupported type (%s) for format (%s)", @@ -615,6 +618,9 @@ _mesa_pack_rgba_span_from_ints(struct gl_context *ctx, GLuint n, GLint rgba[][4] pack_byte_from_int_rgba(ctx, dstAddr, dstFormat, rgba, n); break; + /* Packed integer cases */ +#include "pack_int_cases_tmp.h" + default: _mesa_problem(ctx, "Unsupported type (%s) for format (%s)", diff --git a/src/mesa/main/pack_int_cases_tmp.h b/src/mesa/main/pack_int_cases_tmp.h new file mode 100644 index 000..c1f15e9 --- /dev/null +++ b/src/mesa/main/pack_int_cases_tmp.h @@ -0,0 +1,304 @@ +/* + * Mesa 3-D graphics library + * + * Copyright (C) 1999-2008 Brian Paul All Rights Reserved. + * Copyright (C) 2009-2010 VMware, Inc. All Rights Reserved. + * + * 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 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 + * THEA AUTHORS 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. + */ + +/* + * These case statements are used two places: + * pack.c:_mesa_pack_rgba_span_from_ints with GLint rgba[][4] + * and + * pack.c:_mesa_pack_rgba_span_from_uints with GLuint rgba[][4] + */ + + case GL_UNSIGNED_BYTE_3_3_2: + if ((dstFormat == GL_RGB) || (dstFormat == GL_RGB_INTEGER)) { + GLubyte *dst = (GLubyte *) dstAddr; + for (i=0;ihttp://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH 09/13] GetTexImage: handle signed/unsigned integer clamping
Signed-off-by: Jordan Justen --- src/mesa/main/texgetimage.c | 12 ++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/mesa/main/texgetimage.c b/src/mesa/main/texgetimage.c index 5d2f4da..06d4464 100644 --- a/src/mesa/main/texgetimage.c +++ b/src/mesa/main/texgetimage.c @@ -306,6 +306,7 @@ get_tex_rgba_uncompressed(struct gl_context *ctx, GLuint dimensions, GLfloat (*rgba)[4]; GLuint (*rgba_uint)[4]; GLboolean is_integer = _mesa_is_format_integer_color(texImage->TexFormat); + GLboolean is_unsiged_integer = _mesa_is_format_unsigned(texImage->TexFormat); /* Allocate buffer for one row of texels */ rgba = (GLfloat (*)[4]) malloc(4 * width * sizeof(GLfloat)); @@ -361,8 +362,15 @@ get_tex_rgba_uncompressed(struct gl_context *ctx, GLuint dimensions, _mesa_unpack_uint_rgba_row(texFormat, width, src, rgba_uint); if (rebaseFormat) _mesa_rebase_rgba_uint(width, rgba_uint, rebaseFormat); - _mesa_pack_rgba_span_from_uints(ctx, width, rgba_uint, -format, type, dest); + if (is_unsiged_integer) { + _mesa_pack_rgba_span_from_uints(ctx, width, + (GLuint (*)[4]) rgba_uint, + format, type, dest); + } else { + _mesa_pack_rgba_span_from_ints(ctx, width, + (GLint (*)[4]) rgba_uint, + format, type, dest); + } } else { _mesa_unpack_rgba_row(texFormat, width, src, rgba); if (rebaseFormat) -- 1.7.9.5 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH 08/13] ReadPixels: handle signed/unsigned integer clamping
Signed-off-by: Jordan Justen --- src/mesa/main/readpix.c | 13 ++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/mesa/main/readpix.c b/src/mesa/main/readpix.c index 145cb6c..808c1dc 100644 --- a/src/mesa/main/readpix.c +++ b/src/mesa/main/readpix.c @@ -320,6 +320,8 @@ slow_read_rgba_pixels( struct gl_context *ctx, void *rgba; GLubyte *dst, *map; int dstStride, stride, j; + GLboolean is_integer = _mesa_is_enum_format_or_type_integer(format, type); + GLboolean is_unsiged_integer = _mesa_is_format_unsigned(rbFormat); dstStride = _mesa_image_row_stride(packing, width, format, type); dst = (GLubyte *) _mesa_image_address2d(packing, pixels, width, height, @@ -337,12 +339,17 @@ slow_read_rgba_pixels( struct gl_context *ctx, goto done; for (j = 0; j < height; j++) { - if (_mesa_is_integer_format_or_type(format, type)) { + if (is_integer) { _mesa_unpack_uint_rgba_row(rbFormat, width, map, (GLuint (*)[4]) rgba); _mesa_rebase_rgba_uint(width, (GLuint (*)[4]) rgba, rb->_BaseFormat); - _mesa_pack_rgba_span_from_uints(ctx, width, (GLuint (*)[4]) rgba, format, - type, dst); + if (is_unsiged_integer) { +_mesa_pack_rgba_span_from_uints(ctx, width, (GLuint (*)[4]) rgba, format, +type, dst); + } else { +_mesa_pack_rgba_span_from_ints(ctx, width, (GLint (*)[4]) rgba, format, + type, dst); + } } else { _mesa_unpack_rgba_row(rbFormat, width, map, (GLfloat (*)[4]) rgba); _mesa_rebase_rgba_float(width, (GLfloat (*)[4]) rgba, -- 1.7.9.5 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH 10/13] mesa texstore: handle signed/unsigned integer clamping
Signed-off-by: Jordan Justen --- src/mesa/main/texstore.c | 95 -- 1 file changed, 75 insertions(+), 20 deletions(-) diff --git a/src/mesa/main/texstore.c b/src/mesa/main/texstore.c index 1ced8aa..a9eab18 100644 --- a/src/mesa/main/texstore.c +++ b/src/mesa/main/texstore.c @@ -3200,6 +3200,7 @@ _mesa_texstore_rgba_int8(TEXSTORE_PARAMS) srcPacking); const GLuint *src = tempImage; GLint img, row; + GLboolean is_unsigned = _mesa_is_type_unsigned(srcType); if (!tempImage) return GL_FALSE; for (img = 0; img < srcDepth; img++) { @@ -3207,8 +3208,14 @@ _mesa_texstore_rgba_int8(TEXSTORE_PARAMS) for (row = 0; row < srcHeight; row++) { GLbyte *dstTexel = (GLbyte *) dstRow; GLint i; -for (i = 0; i < srcWidth * components; i++) { - dstTexel[i] = (GLbyte) src[i]; +if (is_unsigned) { + for (i = 0; i < srcWidth * components; i++) { + dstTexel[i] = (GLbyte) MIN2(src[i], 0x7f); + } +} else { + for (i = 0; i < srcWidth * components; i++) { + dstTexel[i] = (GLbyte) CLAMP((GLint) src[i], -0x80, 0x7f); + } } dstRow += dstRowStride; src += srcWidth * components; @@ -3270,6 +3277,7 @@ _mesa_texstore_rgba_int16(TEXSTORE_PARAMS) srcPacking); const GLuint *src = tempImage; GLint img, row; + GLboolean is_unsigned = _mesa_is_type_unsigned(srcType); if (!tempImage) return GL_FALSE; for (img = 0; img < srcDepth; img++) { @@ -3277,8 +3285,14 @@ _mesa_texstore_rgba_int16(TEXSTORE_PARAMS) for (row = 0; row < srcHeight; row++) { GLshort *dstTexel = (GLshort *) dstRow; GLint i; -for (i = 0; i < srcWidth * components; i++) { - dstTexel[i] = (GLint) src[i]; +if (is_unsigned) { + for (i = 0; i < srcWidth * components; i++) { + dstTexel[i] = (GLshort) MIN2(src[i], 0x7fff); + } +} else { + for (i = 0; i < srcWidth * components; i++) { + dstTexel[i] = (GLshort)CLAMP((GLint) src[i], -0x8000, 0x7fff); + } } dstRow += dstRowStride; src += srcWidth * components; @@ -3340,6 +3354,7 @@ _mesa_texstore_rgba_int32(TEXSTORE_PARAMS) srcPacking); const GLuint *src = tempImage; GLint img, row; + GLboolean is_unsigned = _mesa_is_type_unsigned(srcType); if (!tempImage) return GL_FALSE; for (img = 0; img < srcDepth; img++) { @@ -3347,8 +3362,14 @@ _mesa_texstore_rgba_int32(TEXSTORE_PARAMS) for (row = 0; row < srcHeight; row++) { GLint *dstTexel = (GLint *) dstRow; GLint i; -for (i = 0; i < srcWidth * components; i++) { - dstTexel[i] = (GLint) src[i]; +if (is_unsigned) { + for (i = 0; i < srcWidth * components; i++) { + dstTexel[i] = (GLint) MIN2(src[i], 0x7fff); + } +} else { + for (i = 0; i < srcWidth * components; i++) { + dstTexel[i] = (GLint) src[i]; + } } dstRow += dstRowStride; src += srcWidth * components; @@ -3407,6 +3428,7 @@ _mesa_texstore_rgba_uint8(TEXSTORE_PARAMS) srcFormat, srcType, srcAddr, srcPacking); const GLuint *src = tempImage; GLint img, row; + GLboolean is_unsigned = _mesa_is_type_unsigned(srcType); if (!tempImage) return GL_FALSE; for (img = 0; img < srcDepth; img++) { @@ -3414,8 +3436,14 @@ _mesa_texstore_rgba_uint8(TEXSTORE_PARAMS) for (row = 0; row < srcHeight; row++) { GLubyte *dstTexel = (GLubyte *) dstRow; GLint i; -for (i = 0; i < srcWidth * components; i++) { - dstTexel[i] = (GLubyte) CLAMP(src[i], 0, 0xff); +if (is_unsigned) { + for (i = 0; i < srcWidth * components; i++) { + dstTexel[i] = (GLubyte) MIN2(src[i], 0xff); + } +} else { + for (i = 0; i < srcWidth * components; i++) { + dstTexel[i] = (GLubyte) CLAMP((GLint) src[i], 0, 0xff); + } } dstRow += dstRowStride; src += srcWidth * components; @@ -3474,6 +3502,7 @@ _mesa_texstore_rgba_uint16(TEXSTORE_PARAMS) srcFormat, srcType, srcAddr, srcPacking); const GLuint *src = tempImage; GLint img, row; + GLboolean is_unsigned = _mesa_is_type_unsigned(srcType); if (!tempImage)
[Mesa-dev] [PATCH 11/13] mesa formats: add MESA_FORMAT_ABGR2101010_UINT
Signed-off-by: Jordan Justen --- src/mesa/main/format_pack.c | 28 + src/mesa/main/format_unpack.c | 35 + src/mesa/main/formats.c | 15 + src/mesa/main/formats.h |1 + src/mesa/main/texformat.c |1 + src/mesa/main/texstore.c | 67 + src/mesa/swrast/s_texfetch.c |8 - 7 files changed, 154 insertions(+), 1 deletion(-) diff --git a/src/mesa/main/format_pack.c b/src/mesa/main/format_pack.c index 7f0bda1..be6c026 100644 --- a/src/mesa/main/format_pack.c +++ b/src/mesa/main/format_pack.c @@ -1005,6 +1005,32 @@ pack_float_ARGB2101010(const GLfloat src[4], void *dst) } +/* MESA_FORMAT_ABGR2101010_UINT */ + +static void +pack_ubyte_ABGR2101010_UINT(const GLubyte src[4], void *dst) +{ + GLuint *d = ((GLuint *) dst); + GLushort r = UBYTE_TO_USHORT(src[RCOMP]); + GLushort g = UBYTE_TO_USHORT(src[GCOMP]); + GLushort b = UBYTE_TO_USHORT(src[BCOMP]); + GLushort a = UBYTE_TO_USHORT(src[ACOMP]); + *d = PACK_COLOR_2101010_US(a, b, g, r); +} + +static void +pack_float_ABGR2101010_UINT(const GLfloat src[4], void *dst) +{ + GLuint *d = ((GLuint *) dst); + GLushort r, g, b, a; + UNCLAMPED_FLOAT_TO_USHORT(r, src[RCOMP]); + UNCLAMPED_FLOAT_TO_USHORT(g, src[GCOMP]); + UNCLAMPED_FLOAT_TO_USHORT(b, src[BCOMP]); + UNCLAMPED_FLOAT_TO_USHORT(a, src[ACOMP]); + *d = PACK_COLOR_2101010_US(a, b, g, r); +} + + /* MESA_FORMAT_SRGB8 */ static void @@ -1696,6 +1722,7 @@ _mesa_get_pack_ubyte_rgba_function(gl_format format) table[MESA_FORMAT_RG1616] = pack_ubyte_RG1616; table[MESA_FORMAT_RG1616_REV] = pack_ubyte_RG1616_REV; table[MESA_FORMAT_ARGB2101010] = pack_ubyte_ARGB2101010; + table[MESA_FORMAT_ABGR2101010_UINT] = pack_ubyte_ABGR2101010_UINT; /* should never convert RGBA to these formats */ table[MESA_FORMAT_Z24_S8] = NULL; @@ -1841,6 +1868,7 @@ _mesa_get_pack_float_rgba_function(gl_format format) table[MESA_FORMAT_RG1616] = pack_float_RG1616; table[MESA_FORMAT_RG1616_REV] = pack_float_RG1616_REV; table[MESA_FORMAT_ARGB2101010] = pack_float_ARGB2101010; + table[MESA_FORMAT_ABGR2101010_UINT] = pack_float_ABGR2101010_UINT; /* should never convert RGBA to these formats */ table[MESA_FORMAT_Z24_S8] = NULL; diff --git a/src/mesa/main/format_unpack.c b/src/mesa/main/format_unpack.c index d1daae5..e0c26a9 100644 --- a/src/mesa/main/format_unpack.c +++ b/src/mesa/main/format_unpack.c @@ -610,6 +610,20 @@ unpack_ARGB2101010(const void *src, GLfloat dst[][4], GLuint n) static void +unpack_ABGR2101010_UINT(const void *src, GLfloat dst[][4], GLuint n) +{ + const GLuint *s = ((const GLuint *) src); + GLuint i; + for (i = 0; i < n; i++) { + dst[i][RCOMP] = (GLfloat)((s[i] >> 0) & 0x3ff); + dst[i][GCOMP] = (GLfloat)((s[i] >> 10) & 0x3ff); + dst[i][BCOMP] = (GLfloat)((s[i] >> 20) & 0x3ff); + dst[i][ACOMP] = (GLfloat)((s[i] >> 30) & 0x03); + } +} + + +static void unpack_Z24_S8(const void *src, GLfloat dst[][4], GLuint n) { /* only return Z, not stencil data */ @@ -1499,6 +1513,7 @@ get_unpack_rgba_function(gl_format format) table[MESA_FORMAT_RG1616] = unpack_RG1616; table[MESA_FORMAT_RG1616_REV] = unpack_RG1616_REV; table[MESA_FORMAT_ARGB2101010] = unpack_ARGB2101010; + table[MESA_FORMAT_ABGR2101010_UINT] = unpack_ABGR2101010_UINT; table[MESA_FORMAT_Z24_S8] = unpack_Z24_S8; table[MESA_FORMAT_S8_Z24] = unpack_S8_Z24; table[MESA_FORMAT_Z16] = unpack_Z16; @@ -1589,6 +1604,7 @@ get_unpack_rgba_function(gl_format format) initialized = GL_TRUE; } + assert(table[format] != NULL); return table[format]; } @@ -2589,6 +2605,20 @@ unpack_int_rgba_ARGB2101010_UINT(const GLuint *src, GLuint dst[][4], GLuint n) } } +static void +unpack_int_rgba_ABGR2101010_UINT(const GLuint *src, GLuint dst[][4], GLuint n) +{ + unsigned int i; + + for (i = 0; i < n; i++) { + GLuint tmp = src[i]; + dst[i][0] = (tmp >> 0) & 0x3ff; + dst[i][1] = (tmp >> 10) & 0x3ff; + dst[i][2] = (tmp >> 20) & 0x3ff; + dst[i][3] = (tmp >> 30) & 0x3; + } +} + void _mesa_unpack_uint_rgba_row(gl_format format, GLuint n, const void *src, GLuint dst[][4]) @@ -2759,6 +2789,11 @@ _mesa_unpack_uint_rgba_row(gl_format format, GLuint n, case MESA_FORMAT_ARGB2101010_UINT: unpack_int_rgba_ARGB2101010_UINT(src, dst, n); break; + + case MESA_FORMAT_ABGR2101010_UINT: + unpack_int_rgba_ABGR2101010_UINT(src, dst, n); + break; + default: _mesa_problem(NULL, "%s: bad format %s", __FUNCTION__, _mesa_get_format_name(format)); diff --git a/src/mesa/main/formats.c b/src/mesa/main/formats.c index bd1ecbf..64f0e83 100644 --- a/src/mesa/main/formats.c +++ b/src/mesa/main/formats.c @@ -1519,6 +1519,15 @@ static struct gl_format_info format_info[M
[Mesa-dev] [PATCH 13/13] i965: add ARB_texture_rgb10_a2ui support
Signed-off-by: Jordan Justen --- src/mesa/drivers/dri/i965/brw_wm_surface_state.c |1 + src/mesa/drivers/dri/intel/intel_extensions.c|1 + 2 files changed, 2 insertions(+) diff --git a/src/mesa/drivers/dri/i965/brw_wm_surface_state.c b/src/mesa/drivers/dri/i965/brw_wm_surface_state.c index d09fe6d..873096e 100644 --- a/src/mesa/drivers/dri/i965/brw_wm_surface_state.c +++ b/src/mesa/drivers/dri/i965/brw_wm_surface_state.c @@ -325,6 +325,7 @@ brw_format_for_mesa_format(gl_format mesa_format) [MESA_FORMAT_RG1616] = BRW_SURFACEFORMAT_R16G16_UNORM, [MESA_FORMAT_RG1616_REV] = 0, [MESA_FORMAT_ARGB2101010] = BRW_SURFACEFORMAT_B10G10R10A2_UNORM, + [MESA_FORMAT_ABGR2101010_UINT] = BRW_SURFACEFORMAT_R10G10B10A2_UINT, [MESA_FORMAT_Z24_S8] = 0, [MESA_FORMAT_S8_Z24] = 0, [MESA_FORMAT_Z16] = 0, diff --git a/src/mesa/drivers/dri/intel/intel_extensions.c b/src/mesa/drivers/dri/intel/intel_extensions.c index 29da36c..9ae0497 100755 --- a/src/mesa/drivers/dri/intel/intel_extensions.c +++ b/src/mesa/drivers/dri/intel/intel_extensions.c @@ -91,6 +91,7 @@ intelInitExtensions(struct gl_context *ctx) ctx->Extensions.OES_EGL_image = true; #endif ctx->Extensions.OES_draw_texture = true; + ctx->Extensions.ARB_texture_rgb10_a2ui = true; if (intel->gen >= 6) ctx->Const.GLSLVersion = 130; -- 1.7.9.5 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH 12/13] mesa: allow CopyTexSubImage on integer formats
Signed-off-by: Jordan Justen --- src/mesa/drivers/common/meta.c | 15 +++ 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/src/mesa/drivers/common/meta.c b/src/mesa/drivers/common/meta.c index be7141a..252b081 100644 --- a/src/mesa/drivers/common/meta.c +++ b/src/mesa/drivers/common/meta.c @@ -3144,8 +3144,12 @@ _mesa_meta_GenerateMipmap(struct gl_context *ctx, GLenum target, * ReadPixels() and passed to Tex[Sub]Image(). */ static GLenum -get_temp_image_type(struct gl_context *ctx, GLenum baseFormat) +get_temp_image_type(struct gl_context *ctx, gl_format format) { + GLenum baseFormat, type; + + baseFormat = _mesa_get_format_base_format(format); + switch (baseFormat) { case GL_RGBA: case GL_RGB: @@ -3160,7 +3164,7 @@ get_temp_image_type(struct gl_context *ctx, GLenum baseFormat) else if (ctx->DrawBuffer->Visual.redBits <= 16) return GL_UNSIGNED_SHORT; else - return GL_FLOAT; + return _mesa_get_format_datatype(format); case GL_DEPTH_COMPONENT: return GL_UNSIGNED_INT; case GL_DEPTH_STENCIL: @@ -3202,12 +3206,7 @@ _mesa_meta_CopyTexSubImage(struct gl_context *ctx, GLuint dims, format = GL_RGBA; } - if (_mesa_is_format_integer_color(texImage->TexFormat)) { - _mesa_problem(ctx, "unsupported integer color copyteximage"); - return; - } - - type = get_temp_image_type(ctx, format); + type = get_temp_image_type(ctx, texImage->TexFormat); bpp = _mesa_bytes_per_pixel(format, type); if (bpp <= 0) { _mesa_problem(ctx, "Bad bpp in _mesa_meta_CopyTexSubImage()"); -- 1.7.9.5 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH] i965/msaa: Set KILL_ENABLE when GL_ALPHA_TO_COVERAGE enabled.
i965 hardware needs to be informed of situations in which it's possible for pixels (or samples) to be discarded for reasons other than depth/stencil testing (e.g. due to an explicit "discard" in the fragment shader). One of these situations is when GL_ALPHA_TO_COVERAGE is enabled, since that can cause samples to be discarded by the color calculator when the pixel's alpha value is less than 1.0. Without this patch, GL_ALPHA_TO_COVERAGE does not take effect on depth buffers. --- src/mesa/drivers/dri/i965/gen6_wm_state.c |5 +++-- src/mesa/drivers/dri/i965/gen7_wm_state.c |5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/mesa/drivers/dri/i965/gen6_wm_state.c b/src/mesa/drivers/dri/i965/gen6_wm_state.c index 662435e..fa83ece 100644 --- a/src/mesa/drivers/dri/i965/gen6_wm_state.c +++ b/src/mesa/drivers/dri/i965/gen6_wm_state.c @@ -186,8 +186,9 @@ upload_wm_state(struct brw_context *brw) dw6 |= brw->wm.prog_data->barycentric_interp_modes << GEN6_WM_BARYCENTRIC_INTERPOLATION_MODE_SHIFT; - /* _NEW_COLOR */ - if (fp->program.UsesKill || ctx->Color.AlphaEnabled) + /* _NEW_COLOR, _NEW_MULTISAMPLE */ + if (fp->program.UsesKill || ctx->Color.AlphaEnabled || + ctx->Multisample.SampleAlphaToCoverage) dw5 |= GEN6_WM_KILL_ENABLE; if (brw_color_buffer_write_enabled(brw) || diff --git a/src/mesa/drivers/dri/i965/gen7_wm_state.c b/src/mesa/drivers/dri/i965/gen7_wm_state.c index 45c8e46..8e4417e 100644 --- a/src/mesa/drivers/dri/i965/gen7_wm_state.c +++ b/src/mesa/drivers/dri/i965/gen7_wm_state.c @@ -70,8 +70,9 @@ upload_wm_state(struct brw_context *brw) dw1 |= brw->wm.prog_data->barycentric_interp_modes << GEN7_WM_BARYCENTRIC_INTERPOLATION_MODE_SHIFT; - /* _NEW_COLOR */ - if (fp->program.UsesKill || ctx->Color.AlphaEnabled) + /* _NEW_COLOR, _NEW_MULTISAMPLE */ + if (fp->program.UsesKill || ctx->Color.AlphaEnabled || + ctx->Multisample.SampleAlphaToCoverage) dw1 |= GEN7_WM_KILL_ENABLE; /* _NEW_BUFFERS */ -- 1.7.7.6 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH] i965/msaa: Set KILL_ENABLE when GL_ALPHA_TO_COVERAGE enabled.
On Mon, Jun 25, 2012 at 5:39 PM, Paul Berry wrote: > i965 hardware needs to be informed of situations in which it's > possible for pixels (or samples) to be discarded for reasons other > than depth/stencil testing (e.g. due to an explicit "discard" in the > fragment shader). One of these situations is when > GL_ALPHA_TO_COVERAGE is enabled, since that can cause samples to be > discarded by the color calculator when the pixel's alpha value is less > than 1.0. > > Without this patch, GL_ALPHA_TO_COVERAGE does not take effect on depth > buffers. > --- > src/mesa/drivers/dri/i965/gen6_wm_state.c | 5 +++-- > src/mesa/drivers/dri/i965/gen7_wm_state.c | 5 +++-- > 2 files changed, 6 insertions(+), 4 deletions(-) > > diff --git a/src/mesa/drivers/dri/i965/gen6_wm_state.c > b/src/mesa/drivers/dri/i965/gen6_wm_state.c > index 662435e..fa83ece 100644 > --- a/src/mesa/drivers/dri/i965/gen6_wm_state.c > +++ b/src/mesa/drivers/dri/i965/gen6_wm_state.c > @@ -186,8 +186,9 @@ upload_wm_state(struct brw_context *brw) > dw6 |= brw->wm.prog_data->barycentric_interp_modes << > GEN6_WM_BARYCENTRIC_INTERPOLATION_MODE_SHIFT; > > - /* _NEW_COLOR */ > - if (fp->program.UsesKill || ctx->Color.AlphaEnabled) > + /* _NEW_COLOR, _NEW_MULTISAMPLE */ > + if (fp->program.UsesKill || ctx->Color.AlphaEnabled || > + ctx->Multisample.SampleAlphaToCoverage) > dw5 |= GEN6_WM_KILL_ENABLE; > > if (brw_color_buffer_write_enabled(brw) || > diff --git a/src/mesa/drivers/dri/i965/gen7_wm_state.c > b/src/mesa/drivers/dri/i965/gen7_wm_state.c > index 45c8e46..8e4417e 100644 > --- a/src/mesa/drivers/dri/i965/gen7_wm_state.c > +++ b/src/mesa/drivers/dri/i965/gen7_wm_state.c > @@ -70,8 +70,9 @@ upload_wm_state(struct brw_context *brw) > dw1 |= brw->wm.prog_data->barycentric_interp_modes << > GEN7_WM_BARYCENTRIC_INTERPOLATION_MODE_SHIFT; > > - /* _NEW_COLOR */ > - if (fp->program.UsesKill || ctx->Color.AlphaEnabled) > + /* _NEW_COLOR, _NEW_MULTISAMPLE */ > + if (fp->program.UsesKill || ctx->Color.AlphaEnabled || > + ctx->Multisample.SampleAlphaToCoverage) > dw1 |= GEN7_WM_KILL_ENABLE; > > /* _NEW_BUFFERS */ > -- > 1.7.7.6 > This patch makes piglit sample-alpha-to-coverage test pass for depth buffer. I'll soon send out a patch to enable depth buffer testing in existing piglit test case. Reviewed-by: Anuj Phogat ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [Bug 51428] New: No rule to make target 'install' for osmesa
https://bugs.freedesktop.org/show_bug.cgi?id=51428 Bug #: 51428 Summary: No rule to make target 'install' for osmesa Classification: Unclassified Product: Mesa Version: git Platform: All OS/Version: All Status: NEW Severity: critical Priority: medium Component: Other AssignedTo: mesa-dev@lists.freedesktop.org ReportedBy: alexandre.f.dem...@gmail.com Making install in osmesa make[5]: Entering directory `/home/dema1701/projects/display/mesa/src/mesa/drivers/osmesa' make[5]: *** No rule to make target `install'. Stop. make[5]: Leaving directory `/home/dema1701/projects/display/mesa/src/mesa/drivers/osmesa' make[4]: *** [install-recursive] Error 1 make[4]: Leaving directory `/home/dema1701/projects/display/mesa/src/mesa/drivers' make[3]: *** [install-recursive] Error 1 make[3]: Leaving directory `/home/dema1701/projects/display/mesa/src/mesa' make[2]: *** [install] Error 2 make[2]: Leaving directory `/home/dema1701/projects/display/mesa/src/mesa' make[1]: *** [install-recursive] Error 1 make[1]: Leaving directory `/home/dema1701/projects/display/mesa/src' make: *** [install-recursive] Error 1 I have a feeling it is related to commit bd18a236dead98ae34467d59f76c77d94226399e -- Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug. ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH] lp_build_lod_selector: Disable brilinear folding on explicit lod.
On Mon, Jun 25, 2012 at 03:16:35PM -0700, Jose Fonseca wrote: > Indeed lp_build_brilinear_lod is not faster than > lp_build_ifloor_fract, but brilinear is faster, not because log is a > faster approximation, but because it increases the odds that fract > part is zero, which means that we can sample from a single mip > level, instead of lerping between two mip levels. > > I think you have a good point here -- lp_build_brilinear_lod is a > log2 approximation which is wrong here and that's a great catch, -- > but I have a point too: lp_build_ifloor_fract will slow down texture > sampling. > > Just like log2 and brilinear log2, we need a variant of > ifloor_fract, that increases the probability of fract part being > zero, essentially by applying a stair case transformation like: You can do that by multiplying by 'k', subtracting 0.5*k and clamping to [0,1[. The question is whether you really want to do something like that for explicit lod, where the user supposedly exactly knows what he wants. "textureLod" is not used often at all[1], so one can think that when it's used you'd better do it precisely. OG. [1] You see more uses of lod bias and/or textureGrad, the latter due to the use of conditionals. ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev