Commit Graph

1077 Commits

Author SHA1 Message Date
Zack Rusin 880e3fb09b Merge remote branch 'origin/master' into gallium_draw_llvm 2010-03-30 21:10:33 -04:00
Chris Li 5fa0984661 Add test case for lp_bld_printf() 2010-03-29 16:09:27 -07:00
Chris Li 8260e9a821 gallium/llvmpipe: add PROGS target/rule to Makefile.template
So other directory can share it.
Also remove the libllvmpipe.a dependency from test
programs. It is not needed any more.

Signed-Off-By: Christopher Li <chrisl@vmware.com>
2010-03-26 15:56:02 -07:00
Brian Paul 8814bb652a Revert "llvmpipe: optimize the lp_setup_fence() function"
This reverts commit a9063cad0f.

Not too surprisingly, this change caused some regressions.
Revert it for the time being.
See fd.o bug 27320.
2010-03-25 16:10:25 -06:00
Brian Paul 67e377bda6 llvmpipe: disable an assertion
We shouldn't try to clear a non-existant z/stencil buffer, so there's
probably a bug elsewhere.  Disable the assertion for now to allow things
to at least run.
2010-03-25 16:10:25 -06:00
Brian Paul 9a52417582 llvmpipe: fix up some questionable fence code
Jose should probably review this since he wrote the original code.
2010-03-24 20:49:54 -06:00
Brian Paul a9063cad0f llvmpipe: optimize the lp_setup_fence() function
Avoid emitting fences when not needed.
Speeds up glReadPixels quite a bit when reading image row by row.
2010-03-24 20:49:39 -06:00
Brian Paul d7ddb589f4 llvmpipe: call lp_fence_signal() 2010-03-24 19:30:32 -06:00
Brian Paul 331729c8c8 llvmpipe: added lp_fence_signal() 2010-03-24 19:30:27 -06:00
Brian Paul 2ad8692aad llvmpipe: fix texture reference counting bug
We weren't saving the per-scene texture references at the right point.

Fixes piglit cubemap segfault.  The segfault resulted from referencing
texture memory which was prematurely freed because of a missed reference
count.

Fixes fd.o bug 27276.
2010-03-24 16:29:17 -06:00
George Sapountzis 016c5c953f drm/sw: llvmpipe texture_from_handle
Not sure, but judging by softpipe, this hook was forgotten.
2010-03-21 13:21:46 +02:00
Brian Paul 22e6dc3870 gallivm/llvmpipe: added lp_rast_shader_inputs::facing and pass through
The triangle rasterizer sets this field to indicate front/back-facing.
It gets passed into the generated fragment code as another parameter.
Used now for stencil front/back selection but will also be used for
fragment shaders in general (see TGSI_SEMANTIC_FACE).

With this commit two-sided stenciling mostly works but there's
still a bug or two...
2010-03-18 13:06:32 -06:00
Brian Paul d219b8a022 llvmpipe: defines for RAST_WHOLE, RAST_EDGE_TEST 2010-03-18 13:06:32 -06:00
Brian Paul 521c61ff01 gallivm/llvmpipe: simplify front/back stencil ref value handling
Instead of passing an array, just pass two scalar values.
2010-03-18 11:31:38 -06:00
Brian Paul a1e7aeecc2 llvmpipe: set opaque = FALSE if stencil enabled
Fixes occasional bad tiles seen in some demos like progs/demos/reflect.c
2010-03-18 09:30:15 -06:00
José Fonseca 9d48a621d2 llvmpipe: Fix crashes when there is no depth buffer bound. 2010-03-18 10:24:10 +00:00
Brian Paul fecd4cde50 gallivm/llvmpipe: basic stencil testing works
Most stencil demos look OK (modulo some unrelated rendering glitches).
Only single-sided stencil test works at this point.
There are probably some bugs to be found...
2010-03-17 16:29:34 -06:00
Brian Paul 227824ac69 llvmpipe: remove incorrect depth test check 2010-03-17 16:29:34 -06:00
Brian Paul 8dc8c3f5b1 llvmpipe: silence some pointer/casting warnings 2010-03-17 16:29:34 -06:00
Brian Paul d1c9e59883 gallivm/llvmpipe: more asst changes for stencil testing 2010-03-17 16:29:34 -06:00
Brian Paul 67b82fc395 gallivm/llmvpipe: pass stencil refs state into z/stencil build code 2010-03-17 16:29:34 -06:00
Brian Paul b8b1bb946f llvmpipe: use new LP_JIT_CTX_ enums for jit context field positions
Use the new enum values rather than integers in a few places.
2010-03-17 16:29:34 -06:00
Brian Paul eee5114797 llvmpipe: added stencil ref values to jit context state 2010-03-17 16:29:34 -06:00
Brian Paul 6379e47ebd llvmpipe: break lines 2010-03-17 16:29:34 -06:00
Keith Whitwell 8cdfd1219a Merge commit 'origin/master' into gallium-sampler-view
This branch already seems to have the nv50_tex.c fix.

Conflicts:
	src/gallium/drivers/nv50/nv50_tex.c
2010-03-16 09:02:38 +00:00
Jakob Bornecrantz b586774016 llvmpipe: Fix rebase typo 2010-03-16 01:17:33 +00:00
Jakob Bornecrantz 8b63f9b497 winsys/sw: Add a software winsys layered on a pipe 2010-03-16 01:06:46 +00:00
Brian Paul 185be3a87a gallivm/llvmpipe: rename some constant building functions 2010-03-15 18:16:56 -06:00
Brian Paul 0d71ba46e6 gallivm/llvmpipe: rename os_llvm.h to lp_bld.h
The llvm wrapper wasn't really an OS thing.

Use lp_bld.h for now but we eventually should rename/re-prefix all the
files/functions in the gallivm/ directory.
2010-03-15 18:16:56 -06:00
Zack Rusin 275c4bd364 Merge remote branch 'origin/master' into gallium_draw_llvm 2010-03-15 15:24:38 -04:00
Brian Paul d0b35352ed llvmpipe: updated status in README file 2010-03-15 11:46:41 -06:00
Keith Whitwell 42910ebe7b Merge commit 'origin/master' into gallium-sampler-view
Conflicts:
	src/gallium/drivers/nv30/nv30_context.h
	src/gallium/drivers/nv30/nv30_state.c
	src/gallium/drivers/nv40/nv40_context.h
	src/gallium/drivers/nv40/nv40_state.c
	src/gallium/drivers/r300/r300_emit.c
2010-03-15 09:44:52 +00:00
José Fonseca bf40c34663 llvmpipe: Ensure the context is flushed before modifying textures. 2010-03-13 16:13:26 +00:00
José Fonseca 3abc7b985c llvmpipe: Don't use texture transfer internally.
Now that transfers are context objects their sideeffects must happen in
order when used by the state tracker, but that synchronization must be
bypassed when used inside the driver, or it would cause infinite
recursion.
2010-03-13 16:04:06 +00:00
Keith Whitwell 47bfbd452c Merge commit 'origin/master' into gallium-sampler-view
Conflicts:
	src/gallium/auxiliary/util/u_tile.c
	src/gallium/auxiliary/util/u_tile.h
	src/gallium/drivers/identity/id_context.c
	src/gallium/drivers/llvmpipe/lp_setup.c
	src/gallium/drivers/llvmpipe/lp_setup.h
	src/gallium/drivers/softpipe/sp_tex_tile_cache.c
	src/gallium/include/pipe/p_context.h
	src/mesa/state_tracker/st_cb_bitmap.c
	src/mesa/state_tracker/st_cb_drawpixels.c
2010-03-13 15:06:35 +00:00
José Fonseca a80e33f407 llvmpipe: Obey rasterization rules.
Replicates softpipe.
2010-03-13 11:23:52 +00:00
José Fonseca 3160cbabcc llvmpipe: setup_context -> lp_setup_context
Otherwise IDEs and debuggers have trouble distinguishing from softpipe's
setup_context.
2010-03-13 11:23:52 +00:00
Keith Whitwell 915b3529b9 Merge commit 'origin/gallium-context-transfers-2' 2010-03-12 09:08:40 +00:00
Vinson Lee e4d10dada0 llvmpipe: Remove unnecessary header. 2010-03-11 20:52:38 -08:00
Brian Paul 53efb634a0 gallivm/llvmpipe: replace 'int stride' with 'int row_stride[MAX_LEVELS]'
The stride depends on the mipmap level.  Rename to row_stride to
distinguish from img_stride for 3D textures.

Fixes incorrect texel addressing in small mipmap levels.
2010-03-11 14:49:01 -07:00
Brian Paul 272f399434 llvmpipe: fix comment typo 2010-03-11 14:49:00 -07:00
Brian Paul 489af2a3ba gallivm/llvmpipe: include os_llvm.h instead of llvm-c/Core.h 2010-03-11 14:49:00 -07:00
Keith Whitwell d35ecca5ee gallium: remove pipe_context member from pipe_transfer
There was very little use for this beyond permitting the
pipe_context::tex_transfer_destroy() function to omit the pipe_context
argument.

This change adds the pipe_context argument into tex_transfer_destroy()
so that it looks like other pipe_context functions, and removes the
pipe_context pointer from pipe_transfer.
2010-03-11 16:18:50 +00:00
Keith Whitwell b43c182f19 Squashed commit of gallium-context-transfers:
commit 7a2ee04629681e59ea147b440856c4f9a33ae9f8
Author: Keith Whitwell <keithw@vmware.com>
Date:   Thu Mar 11 14:19:17 2010 +0000

    nv: convert to context transfers

commit 188a3f5331c8e5966729fd59d02975afb7324adc
Author: Keith Whitwell <keithw@vmware.com>
Date:   Thu Mar 11 14:11:10 2010 +0000

    nouveau: remove unused variable

commit 5c8e880ab4dc020358c08728b8adb1637d2dc5bc
Author: Keith Whitwell <keithw@vmware.com>
Date:   Thu Mar 11 12:31:21 2010 +0000

    mesa/st: fix compilation after merge

commit c552595333f860c2a4807e195596acdf5d6a5ef8
Author: Keith Whitwell <keithw@vmware.com>
Date:   Thu Mar 11 12:31:06 2010 +0000

    util: fix compilation after merge

commit e80836878a3617b0e350d2a8f92311832a1476cb
Author: Keith Whitwell <keithw@vmware.com>
Date:   Thu Mar 11 12:30:47 2010 +0000

    r300g: fix compilation after merge

commit 0e4883e9511b9db4e75a4dbc78d7bb970badc15d
Author: Keith Whitwell <keithw@vmware.com>
Date:   Thu Mar 11 12:18:45 2010 +0000

    i965g: fix incorrect merge

commit 17d74133d8168eebf93bf1390de79930fc8da231
Merge: cb81c79 aa311ae
Author: Keith Whitwell <keithw@vmware.com>
Date:   Thu Mar 11 12:08:32 2010 +0000

    Merge commit 'origin/master' into gallium-context-transfers

    Conflicts:
    	src/gallium/drivers/i965/brw_screen_texture.c
    	src/gallium/drivers/r300/r300_screen.c
    	src/gallium/drivers/softpipe/sp_texture.c
    	src/gallium/drivers/svga/svga_screen_texture.c
    	src/gallium/state_trackers/egl/x11/native_ximage.c

commit cb81c79098bc3a92a4d2a3dcc0edc972dfb407be
Author: Keith Whitwell <keithw@vmware.com>
Date:   Tue Mar 2 16:04:01 2010 +0000

    egl/x11: hack for context transfers

    There is a better approach to this in the winsys-handle branch, but
    for now avoid using transfers at all by always allocating our own
    backing store directly.

commit f44a24e1d4ad7563f3eedd6b3a5688f53a36265c
Author: Keith Whitwell <keithw@vmware.com>
Date:   Tue Mar 2 16:03:16 2010 +0000

    llvmpipe: context transfers

commit 4d7475ef8104b3b478c7c6ce77cd3506c57e25d1
Author: Keith Whitwell <keithw@vmware.com>
Date:   Tue Mar 2 16:02:50 2010 +0000

    llvmpipe: disable testprogs build

    Not working.

commit a9bf98c4d36bd92a76f81e83747eb9b8f0a0515f
Merge: ee0f97e 0c616da
Author: Keith Whitwell <keithw@vmware.com>
Date:   Tue Mar 2 15:28:25 2010 +0000

    Merge commit 'origin/master' into gallium-context-transfers

    Conflicts:
    	src/mesa/state_tracker/st_cb_accum.c
    	src/mesa/state_tracker/st_cb_bitmap.c

commit ee0f97e8d9fd5ef57211a8e1268f505c9829e246
Merge: a7f078e 828f545
Author: Keith Whitwell <keithw@vmware.com>
Date:   Fri Feb 19 13:00:29 2010 +0000

    Merge commit 'origin/master' into gallium-context-transfers

    Conflicts:
    	src/gallium/auxiliary/util/u_debug.h
    	src/gallium/drivers/i915/i915_context.h
    	src/gallium/drivers/llvmpipe/lp_flush.c
    	src/gallium/drivers/nv30/nv30_screen.h
    	src/gallium/drivers/nv40/nv40_context.h
    	src/gallium/drivers/nv40/nv40_screen.h
    	src/gallium/drivers/nv50/nv50_context.h
    	src/gallium/drivers/r300/r300_screen.c
    	src/gallium/drivers/r300/r300_winsys.h
    	src/gallium/drivers/softpipe/sp_context.c
    	src/gallium/drivers/trace/tr_context.c
    	src/gallium/state_trackers/dri/dri_context.c
    	src/gallium/state_trackers/egl/common/egl_g3d.c
    	src/gallium/state_trackers/python/st_device.c
    	src/gallium/winsys/drm/radeon/core/radeon_drm.c

commit a7f078e16d851b53ef316066dcced46eb39ebe24
Author: Keith Whitwell <keithw@vmware.com>
Date:   Fri Feb 5 14:16:11 2010 +0000

    gallium: move texture transfers to pipe_context

commit 7b2ffc2019d72e833afea7eebf3e80121187375d
Merge: 51e190e c036d13
Author: Keith Whitwell <keithw@vmware.com>
Date:   Fri Feb 5 09:55:02 2010 +0000

    Merge commit 'origin/master' into gallium-screen-context

    Conflicts:
    	src/gallium/winsys/drm/nouveau/drm/nouveau_drm_api.c

    This branch has got a pretty tortured history now, I expect
    a squash merge will be appropriate when it is done.

commit 51e190e95acf120f72768fafb29e9721e358df1b
Author: Keith Whitwell <keithw@vmware.com>
Date:   Thu Feb 4 17:58:02 2010 +0000

    gallium: fix some build issues

commit f524bdaa723fb181637ad30c6ad708aeedabe25b
Merge: f906212 3aba0a2
Author: Keith Whitwell <keithw@vmware.com>
Date:   Thu Feb 4 17:51:32 2010 +0000

    Merge commit 'origin/master' into gallium-screen-context

commit f9062126883199eabf045714c717cd35f4b7b313
Author: Keith Whitwell <keithw@vmware.com>
Date:   Thu Feb 4 17:17:12 2010 +0000

    gallium/docs: small description of screen::create_context

commit efcb37bd3d5ed37f06c6105bd2d750b374ec0927
Author: Keith Whitwell <keithw@vmware.com>
Date:   Thu Feb 4 16:42:42 2010 +0000

    drm/radeon: more dead create_context wrapper removal

commit 6badc0dd9e06cf2ec936940bcf12b9ef5324b301
Author: Keith Whitwell <keithw@vmware.com>
Date:   Thu Feb 4 16:42:30 2010 +0000

    drm/i965: more dead create_context wrapper removal

commit cf04ebd5a54b18b2d894cfdab2b0f2fd55626ffc
Author: Keith Whitwell <keithw@vmware.com>
Date:   Thu Feb 4 16:42:05 2010 +0000

    st/python: more dead create_context wrapper removal

commit 444f114c3516abf71c430e6e9d0d2ae3b80679d3
Author: Keith Whitwell <keithw@vmware.com>
Date:   Thu Feb 4 16:37:58 2010 +0000

    idenity: wrapped context creation

commit 5a6d09cb9e468d1ee6c8d54b887618819d8d94f2
Author: Keith Whitwell <keithw@vmware.com>
Date:   Thu Feb 4 16:28:47 2010 +0000

    ws/gdi: remove dead context_create wrapper

commit 132b55f4bec39386ac625f09aaa11f609664024c
Author: Keith Whitwell <keithw@vmware.com>
Date:   Thu Feb 4 16:27:52 2010 +0000

    ws/gdi: remove dead context_create wrapper

commit 56d2d21a0cdcb197a364049d354c2f15a4fc026a
Author: Keith Whitwell <keithw@vmware.com>
Date:   Thu Feb 4 16:25:38 2010 +0000

    st/xorg: use screen::context_create

commit 838c5cfe56b2af6c644909bed3c5e7cdd64c336a
Author: Keith Whitwell <keithw@vmware.com>
Date:   Thu Feb 4 16:23:20 2010 +0000

    glx/xlib: simplify creation of trace-wrapped contexts

    Trace screen knows how to properly wrap context creation in the
    wrapped screen, so nothing special to do here.

commit c99404c03ebaec4175f08a2f363e43c9085f2635
Author: Keith Whitwell <keithw@vmware.com>
Date:   Thu Feb 4 16:18:24 2010 +0000

    st/python: no need to special case context creation for trace

commit 193a527a682b6877bb1faecd8092df4dfd055a18
Author: Keith Whitwell <keithw@vmware.com>
Date:   Thu Feb 4 16:15:30 2010 +0000

    drm/radeon: remove dead create_context declaration

commit bb984eecc25cf23bc77e1c818b81165ba1a07c9a
Author: Keith Whitwell <keithw@vmware.com>
Date:   Thu Feb 4 16:14:58 2010 +0000

    nv/drm: remove dead create_context ref

commit e809313a44287dc4e16c28e9e74ef3b2b5271aa1
Author: Keith Whitwell <keithw@vmware.com>
Date:   Thu Feb 4 16:12:51 2010 +0000

    st/egl: remove a layer of wrappers around screen::create_context

commit 39caa6672a04122f185c22e17aab86d1c40938bf
Author: Keith Whitwell <keithw@vmware.com>
Date:   Thu Feb 4 16:05:28 2010 +0000

    r300g: fill in screen::context_create

commit 407f12556d16ba0656774d8a1d9ebda22f82f473
Author: Keith Whitwell <keithw@vmware.com>
Date:   Thu Feb 4 16:04:04 2010 +0000

    cell: adapt for screen::create_context, untested

commit d02b0c6ce321a04c76fdabb09e0e4380ce1c1376
Author: Keith Whitwell <keithw@vmware.com>
Date:   Thu Feb 4 15:50:24 2010 +0000

    drm/nv: adapt for screen::create_context

    All contexts now created directly through the screen, so remove
    equivalent code here.

    Remove apparently un-needed array of contexts in the winsys.

commit 53eec5b1349aa1b6892a75a7bff7e7530957aeae
Author: Keith Whitwell <keithw@vmware.com>
Date:   Thu Feb 4 15:50:08 2010 +0000

    stw: adapt for screen::create_context, untested

commit c6a64de3eb381bc9a88e9fbdecbf87d77925aaf5
Author: Keith Whitwell <keithw@vmware.com>
Date:   Thu Feb 4 15:49:20 2010 +0000

    trace: expose the wrapped context's priv data

    If we are going to keep this priv idea, really want an accessor
    function for it so that trace and other drivers can wrap that.

commit 75d6104e11d86ec2b0749627ed58e35f856ee6eb
Author: Keith Whitwell <keithw@vmware.com>
Date:   Thu Feb 4 15:47:55 2010 +0000

    nv30: adapt to screen::context_create

commit 12f5deb6ed9723e9b5d34577052b8365813ca14e
Author: Keith Whitwell <keithw@vmware.com>
Date:   Thu Feb 4 15:44:47 2010 +0000

    nv40: adapt to screen::context_create

commit 14baccaa3b6bbb3b91056126f6521828e786dc62
Author: Keith Whitwell <keithw@vmware.com>
Date:   Thu Feb 4 15:35:27 2010 +0000

    nv50: adapt to screen::create_context

    Not build tested.  Need to figure out how to build nouveau.

commit a0e94505ccd2d7f3e604465a2ac302f1286b73b6
Author: Keith Whitwell <keithw@vmware.com>
Date:   Thu Feb 4 15:22:27 2010 +0000

    llvmpipe: update for screen::create_context, untested

commit 0eae17107c950346030e4f7e0ec232f868d3893d
Author: Keith Whitwell <keithw@vmware.com>
Date:   Thu Feb 4 15:16:57 2010 +0000

    xlib/llvmpipe: remove dead winsys context creation path

commit 2f69f9ffaa7e2a01d2483277246ed13051ae4ca3
Author: Keith Whitwell <keithw@vmware.com>
Date:   Thu Feb 4 14:58:27 2010 +0000

    gallium: convert most code to use screen::create_context

    I wish I could build all of gallium at once to find breakages.

commit d7b57f4061b82322cbcae176125913d9f0dea6c1
Author: Keith Whitwell <keithw@vmware.com>
Date:   Thu Feb 4 12:46:21 2010 +0000

    glx: permit building with older protocol headers

    I'd like to be able to build mesa on current distro releases without
    having to upgrade from the standard dri2proto and glproto headers.  With
    this change I'm able to build on ancient releases such as Ubuntu 9-10...

    In general, it would be nice to be able to build-test mesa to check for
    unintended breakages without having to follow the external dependencies
    of every group working on the codebase.

commit 57adedd6fb06c98572ed8d4aef19203df4c4eea2
Merge: da71847 e1906ae
Author: Keith Whitwell <keithw@vmware.com>
Date:   Thu Feb 4 11:38:15 2010 +0000

    Merge commit 'origin/master' into gallium-screen-context

    Conflicts:
    	src/gallium/drivers/softpipe/sp_video_context.h
    	src/gallium/drivers/trace/tr_context.c
    	src/gallium/state_trackers/wgl/shared/stw_context.c
    	src/gallium/winsys/gdi/gdi_softpipe_winsys.c

commit da71847ea6414d7e352c6094f8963bb4eda344dc
Author: José Fonseca <jfonseca@vmware.com>
Date:   Sat May 2 08:57:39 2009 +0100

    wgl: Use pipe_screen::context_create.

commit 2595a188f93fd903600ef5d8517737ee0592035d
Author: José Fonseca <jfonseca@vmware.com>
Date:   Sat May 2 08:56:47 2009 +0100

    trace: Implement pipe_screen::context_create.

commit f3640e4ae37a5260cbfba999d079f827de0a313a
Author: José Fonseca <jfonseca@vmware.com>
Date:   Sat May 2 08:56:17 2009 +0100

    softpipe: Implement pipe_screen::context_create.

commit 347266bddc8bd39c711bacb2193793759d0f3696
Author: José Fonseca <jfonseca@vmware.com>
Date:   Sat May 2 08:55:31 2009 +0100

    gallium: New pipe_screen::context_create callback.
2010-03-11 15:23:16 +00:00
Michal Krol 530b9910c2 gallium: Check for OOM condition when creating a sampler view. 2010-03-11 15:30:21 +01:00
Brian Paul 19371fb60d llvmpipe: fix loop over mipmap levels 2010-03-10 18:09:49 -07:00
Michal Krol 3ce4375912 Merge branch 'master' into gallium-sampler-view
Conflicts:
	src/gallium/auxiliary/Makefile
	src/gallium/auxiliary/SConscript
	src/gallium/auxiliary/tgsi/tgsi_exec.c
	src/gallium/auxiliary/util/u_blitter.c
	src/gallium/drivers/i915/i915_context.h
	src/gallium/drivers/i965/brw_context.h
	src/gallium/drivers/llvmpipe/lp_context.h
	src/gallium/drivers/nv50/nv50_context.h
	src/gallium/drivers/nv50/nv50_state_validate.c
	src/gallium/drivers/nv50/nv50_tex.c
	src/gallium/drivers/r300/r300_blit.c
	src/gallium/drivers/r300/r300_context.h
	src/gallium/drivers/r300/r300_emit.c
	src/gallium/drivers/r300/r300_state.c
	src/gallium/drivers/softpipe/sp_context.h
	src/gallium/drivers/svga/svga_context.h
	src/gallium/drivers/svga/svga_pipe_sampler.c
2010-03-10 15:49:30 +01:00
Keith Whitwell 155fbcb0ed Merge commit 'origin/master' into gallium-sw-api-2 2010-03-10 08:29:27 +00:00
José Fonseca eeaa0861bf llvmpipe: Cope with null Vertex element cso.
CSO can often be null.

For example:
1. at initialization
2. using an util module (u_blit) right after initialization (it will push
   state and pop the previous null state)
3. at shutdown time (state shouldn't be bound when being destroyed)

Glean was hitting 2.
2010-03-10 07:23:29 +00:00
Keith Whitwell 3c57c01a44 ws/xlib: remove self-knowledge about users of xlib winsys
Several software rasterizers can make use of this winsys, but there
isn't any reason why the winsys itself should know about them.

This change moves that information into the libgl-xlib target.

Need to fix up other targets making use of this winsys.
2010-03-09 15:33:21 +00:00
Roland Scheidegger 685340a53e Merge branch 'gallium-vertexelementcso'
Conflicts:
	src/gallium/auxiliary/cso_cache/cso_context.c
	src/gallium/auxiliary/util/u_blit.c
	src/gallium/auxiliary/util/u_gen_mipmap.c
	src/gallium/drivers/i915/i915_context.h
	src/gallium/drivers/i965/brw_draw_upload.c
	src/gallium/drivers/r300/r300_blit.c
	src/gallium/drivers/r300/r300_context.h
	src/gallium/drivers/r300/r300_render.c
	src/gallium/drivers/r300/r300_state_derived.c
	src/mesa/state_tracker/st_cb_bitmap.c
	src/mesa/state_tracker/st_cb_clear.c
2010-03-09 15:59:40 +01:00
Roland Scheidegger e8983f70b4 gallium: don't use flexible array members in drivers for vertex elements cso
While this c99 feature should work with most compilers, valgrind doesn't
really like it, and this only really saves some memory, we don't do this
in similar occasions (like the blend state) neither.
2010-03-09 14:23:00 +01:00
Keith Whitwell 0c96690a5b Merge commit 'origin/master' into gallium-sw-api-2
Conflicts:
	src/gallium/drivers/llvmpipe/lp_setup.c
	src/gallium/drivers/softpipe/sp_texture.c
	src/gallium/drivers/softpipe/sp_winsys.h
	src/gallium/state_trackers/egl/common/egl_g3d.c
	src/gallium/state_trackers/egl/x11/native_x11.c
	src/gallium/state_trackers/egl/x11/native_x11.h
	src/gallium/state_trackers/egl/x11/native_ximage.c
2010-03-09 11:02:37 +00:00
Keith Whitwell 6f4ce4a4fe Squashed commit of gallium-no-texture-blanket
commit f90b3f01af82b9522067b1824e21709a6fb2d3af
Author: Keith Whitwell <keithw@vmware.com>
Date:   Mon Mar 8 14:39:44 2010 +0000

    gallium: remove p_screen::surface_buffer_create

    This isn't very useful without texture_blanket(), which has also been
    removed.

    Note that this function hasn't been removed from the old pipe_winsys
    (u_simple_screen) still used internally by some drivers (eg softpipe).

commit 6c462de39a4b9980a5f034a95e580efdfcb8173b
Author: Keith Whitwell <keithw@vmware.com>
Date:   Mon Mar 8 14:27:40 2010 +0000

    egl/x11: disable texture_blanket usage

commit b42da9160df9f47224e5b3291b972f41767aa6e5
Merge: 4be2436 3ca9336
Author: Keith Whitwell <keithw@vmware.com>
Date:   Mon Mar 8 14:27:24 2010 +0000

    Merge commit 'origin/master' into gallium-no-texture-blanket

    Conflicts:
    	src/gallium/drivers/svga/svga_screen_texture.c

commit 4be2436316929e3dfc55bc34d810920c06556b66
Author: Keith Whitwell <keithw@vmware.com>
Date:   Thu Mar 4 14:59:26 2010 +0000

    gallium: remove texture blanket call

    No longer needed, except for nouveau and egl/xll/native_ximage.c.

    Fix for nouveau is to keep the call, but move it to an internal
    function within nouveau.

    Fix for that egl/x11 relies on gallium-sw-api branch or its successor.

commit 69b6764330367d63c237d0bde9fb96435d0e0257
Author: Keith Whitwell <keithw@vmware.com>
Date:   Thu Mar 4 13:35:16 2010 +0000

    drm_api: wrap comment
2010-03-09 10:54:54 +00:00
Marek Olšák f2b8f14267 llvmpipe: quads never provoke the first vertex 2010-03-09 04:51:43 +01:00
Brian Paul f027d56129 llvmpipe/gallivm: checkpoint: array of pointers to mipmap levels
Change the texture data_ptr from just a single image pointer to an
array of image pointers, indexed by mipmap level.
We'll use this for mipmap filtering.
For now, the mipmap level is hard-coded to zero.
2010-03-08 16:26:44 -07:00
Brian Paul d73fadf211 llvmpipe: define max texture levels 2010-03-08 16:26:43 -07:00
Brian Paul e3b6f7b800 llvmpipe: rewrap for 80 columns 2010-03-08 16:26:43 -07:00
Keith Whitwell 3ca933623c Merge commit 'origin/gallium-winsys-handle-rebased' 2010-03-08 12:03:46 +00:00
Brian Paul b5038fdd65 llvmpipe: added code to set texture depth, max mipmap levels info 2010-03-05 16:51:35 -07:00
Brian Paul b704a4e8f3 llvmpipe: add pipe_thread_wait() calls
Wait for threads to exit before cleaning up per-thread data.
Fixes hang on context destruction with glean makeCurrent test.
See fd.o bug 26536.
2010-03-05 14:24:04 -07:00
Brian Paul ad1456a444 llvmpipe: new comment 2010-03-04 15:56:55 -07:00
Keith Whitwell 23e951d0da gallium: fix llvmpipe after winsys move 2010-03-04 16:23:05 +00:00
Keith Whitwell 94ce4eb3c2 softpipe: rework to use the llvmpipe winsys
Promote the llvmpipe winsys more or less unchanged to
state_trackers/sw_winsys.h.

Some minor breakages:
  - softpipe::texture_blanket is broken, but scheduled for removal anyway.
  - haven't fixed up g3vdl yet.
2010-03-04 16:09:33 +00:00
José Fonseca 4053d33703 llvmpipe: Store the original triangle coordinates in the debug build.
For debugging purposes only.
2010-03-03 19:55:49 +00:00
José Fonseca 4d5dd82558 llvmpipe: Ensure context is flushed when destroying shaders. 2010-03-03 19:55:49 +00:00
José Fonseca 7b7b66781b llvmpipe: Linux is no longer a dependency. Llvmpipe builds and runs fine on windows too. 2010-03-03 12:07:39 +00:00
José Fonseca 9f9b44222f llvmpipe: Centralize LLVM initialization. 2010-03-03 12:02:26 +00:00
José Fonseca f58ca9b02b llvmpipe: Update for lp_bld_init.h rename. 2010-03-03 12:02:26 +00:00
José Fonseca 2998cad9ce Merge branch 'gallium-format-cleanup' 2010-03-02 16:00:34 +00:00
Keith Whitwell 0c616da241 llvmpipe: remove some ifdefs
No longer any need to protect expensive asserts with #ifdef DEBUG.
2010-03-02 15:03:09 +00:00
Keith Whitwell 5fe2ce28b6 llvmpipe: reorganize transfer usage
Move transfer creation and mapping to the "scene" object, and out of
the rasterizer.  The rasterizer operates on already-mapped
framebuffers only, and no longer needs a screen or context pointer.

The scene object has access to a pipe_context, and this reorg prepares
for moving transfer functionality from the screen to the context.
2010-03-02 15:03:09 +00:00
José Fonseca 33080a8454 llvmpipe: Rename pipe formats. 2010-03-01 18:53:32 +00:00
Roland Scheidegger f897303855 llvmpipe: adapt to new vertex element cso 2010-03-01 18:46:39 +01:00
Jakob Bornecrantz 3f37f23d17 gallium: Reorg texture usage flags
Introduce a new shared usage and rename primary to scanout.
The display target usage is more of a windows concept and
doesn't mean the same thing as shared. Display target means
that the surface should be presentable, for softpipe this
means that it should be backed by a hardware buffer.
2010-03-01 16:05:35 +00:00
José Fonseca e243e87b52 llvmpipe: Don't mention deprecated drivers=trace option.
Now trace always built.
2010-03-01 13:08:07 +00:00
José Fonseca 9beb302212 util: Code generate functions to pack and unpack a single pixel.
Should work correctly for all pixel formats except SRGB formats.

Generated code made much simpler by defining the pixel format as
a C structure. For example this is the generated structure for
PIPE_FORMAT_B6UG5SR5S_NORM:

union util_format_b6ug5sr5s_norm {
   uint16_t value;
   struct {
      int r:5;
      int g:5;
      unsigned b:6;
   } chan;
};

Not used everywhere yet because it seems compiled code is slower than
bitshift arithmetic by some misterious reason. So we should generate
bitshift arithmetic at least for the simple UNORM pixel formats.
2010-02-26 16:46:34 +00:00
José Fonseca 4757325951 util: Factor some code into u_format_parse.py 2010-02-26 16:46:34 +00:00
José Fonseca 092010db37 util: Use python names consistent with u_format.h 2010-02-26 16:46:34 +00:00
José Fonseca 8416d34279 llvmpipe: Fix lp_tile_r5g6b5_unorm_write_4ub.
Was using 32bit integer pointers instead of 16bits.
2010-02-26 10:12:53 +00:00
José Fonseca eee21b3812 llvmpipe: Fix scons dependencies. 2010-02-26 10:12:53 +00:00
Brian Paul bc04ae21c1 llvmpipe: clean up rasterization threads upon context destruction
Fixes glean hang, bug 26536.
2010-02-24 17:30:43 -07:00
Brian Paul 5046f2c195 llvmpipe: more lp_rasterizer_task parameter passing 2010-02-24 13:54:25 -07:00
Brian Paul 1c9db3c57f llvmpipe: pass fewer parameters to rasterization functions 2010-02-24 13:54:25 -07:00
Brian Paul ab71a5e4c9 llvmpipe: added some assertions 2010-02-24 13:54:25 -07:00
Brian Paul f8978f186e llvmpipe: SRGB textures not supported yet 2010-02-24 10:47:58 -07:00
Brian Paul ba92947198 llvmpipe: vertex shader textures not supported yet 2010-02-24 10:44:01 -07:00
José Fonseca 83686b3f92 llvmpipe: Update for UTIL_FORMAT_LAYOUT_xxx changes. 2010-02-24 16:16:21 +00:00
José Fonseca 085810542f llvmpipe: Fix breakeage.
Due to the u_format.csv changes the unrolled code generator was being used
for formats it didn't support.

Bring some bugfixes from u_format_access.py too.
2010-02-24 15:45:28 +00:00
José Fonseca a9395360f2 llvmpipe: Handle correctly 24bit formats. 2010-02-24 15:45:28 +00:00
José Fonseca 4e526b42b0 llvmpipe: Kill unused UTIL_FORMAT_LAYOUT_SCALAR. 2010-02-24 12:15:13 +00:00
Brian Paul 1eec90d660 llvmpipe: add lp_tile_image.c to sources 2010-02-23 21:14:48 -07:00
Brian Paul 5e321280c1 llvmpipe: whole image tile/untile functions 2010-02-23 21:14:48 -07:00
Brian Paul cd25e436ef llvmpipe: remove Z16 format override hack 2010-02-23 18:57:18 -07:00
Brian Paul 0e7c22ff3c llvmpipe: Z16 format is not supported 2010-02-23 18:57:18 -07:00
Brian Paul 049b4c3405 llvmpipe: added assertions to verify that scene is empty 2010-02-23 18:57:18 -07:00
Brian Paul c8aaa24f2d llvmpipe: added some assertions 2010-02-23 18:57:17 -07:00
Zack Rusin c5c5cd7132 gallium/draw: initial code to properly support llvm in the draw module
code generate big chunks of the vertex pipeline in order to speed up
software vertex processing.
2010-02-22 22:02:58 -05:00
Keith Whitwell 0c938143db llvmpipe: use ffs technique for full tiles also
Need to compute two masks here for full and partial 16x16 blocks.
Gives a further good improvement for isosurf particularly:

isosurf  97 -> 108
gears   597 -> 611
2010-02-17 12:12:41 +00:00
Keith Whitwell 31c816731e llvmpipe: rework do_block_16 to use bitmasks and ffs
Some nice speedups:
   gears:  547 -> 597
   isosurf: 83 -> 98

Others like gloss unchanged.  Could do further work in this direction.
2010-02-17 11:12:04 +00:00
Vinson Lee 0b58d029b9 llvmpipe: Silence unused value warning. 2010-02-14 13:23:21 -08:00
José Fonseca abdcdb3db7 llvmpipe: s/debug_dump_/util_dump_/ 2010-02-14 15:21:06 +00:00
José Fonseca 9189d04cdb llvmpipe: Use util_format_name(). 2010-02-14 13:26:37 +00:00
Vinson Lee 1462c1299c llvmpipe: Silence uninitialized variable warning. 2010-02-13 23:48:40 -08:00
Roland Scheidegger 6602889d82 Merge branch 'gallium-dynamicstencilref' 2010-02-12 21:39:29 +01:00
José Fonseca be29a60f9e Revert "llvmpipe: Move tile coordinate assertion into a more useful place."
This reverts commit 8c0391726a.

Too pendantic.
2010-02-11 12:14:01 +00:00
José Fonseca 8c0391726a llvmpipe: Move tile coordinate assertion into a more useful place. 2010-02-11 10:59:41 +00:00
José Fonseca 764c172aa9 llvmpipe: Clamp both extremes of triangles to framebuffer size.
Fix segmentation fault when triangles crossed the axis.
2010-02-11 10:58:46 +00:00
Roland Scheidegger 6a509ec6dd llvmpipe: adapt to stencil ref changes
since the driver doesn't actually handle stencil yet the code won't do much.
2010-02-10 21:20:24 +01:00
José Fonseca b44c444a0f llvmpipe: Map rendertargets when bound as textures.
Fixes gearbox segfault (fdo 25960). Corruption remains.
2010-02-10 20:12:44 +00:00
José Fonseca ba33fed610 llvmpipe: Fix null pointer dereference when no depth buffer is bound. 2010-02-10 11:25:26 +00:00
José Fonseca 5e6a900510 llvmpipe: Leave depth buffer in swizzled format.
This fixes several assertion failures due to only Z32 being supported.
2010-02-10 11:01:26 +00:00
Vinson Lee 58c991a640 llvmpipe: Remove unnecessary headers. 2010-02-10 00:35:48 -08:00
Brian Paul 822d951b5d llvmpipe: remove .s rule (already in Makefile.template) 2010-02-09 13:08:23 -07:00
Brian Paul aa4ed6a0e6 llvmpipe: lp_tile_surface.c isn't committed yet 2010-02-09 13:07:58 -07:00
Chris Li 8b6ec94aec llvmpipe: Make llvm unit test depend on libllvmpipe.a
Signed-off-by: José Fonseca <jfonseca@vmware.com>
2010-02-09 17:19:29 +00:00
Michal Krol 72fa4ef649 llvmpipe: Remove reference to prefilter field. 2010-02-09 16:27:16 +01:00
Zack Rusin 85c7ec70ad llvmpipe: switch to using dynamic stack allocation instead of registers
with mutable vars we don't need to follow the phi nodes. meaning that
control flow becomes trivial as we don't have scan the rest of the tgsi
to figure out the variable usage anymore. futhermore the memory2register
pass promotes alloca/store/load to registers while inserting the right phi
nodes. so we get simplicity and performance.
2010-02-08 21:50:33 -05:00
Brian Paul 69c0d08678 llvmpipe: include gallivm/lp_bld_misc.h 2010-02-08 17:40:02 -07:00
Brian Paul 6c28cc27eb llvmpipe: remove files moved to gallivm/ from llvmpipe/Makefile 2010-02-08 17:38:35 -07:00
Brian Paul b014d71fd4 llvmpipe: s/textured/texture/ 2010-02-08 17:34:59 -07:00
Brian Paul 4aeacdf853 llvmpipe: added counters for color tile clear, load, store 2010-02-08 16:57:23 -07:00
Brian Paul a8270c7c29 llvmpipe: use new os time functions 2010-02-08 16:57:23 -07:00
Zack Rusin c61bf36393 llvmpipe: export the tgsi translation code to a common layer
the llvmpipe tgsi translation is a lot more complete than what was in
gallivm so replacing the latter with the former. this is needed since
the draw llvm paths will use the same code. effectively the proven
llvmpipe code becomes gallivm.
2010-02-08 18:22:11 -05:00
Keith Whitwell 7f41f5447c gallium: squash-merge of gallium screen context
Squashed commit of the following:

commit 009598122adf5cad42bf9af067eccaf8e89e1233
Author: Christoph Bumiller <e0425955@student.tuwien.ac.at>
Date:   Mon Feb 8 11:03:26 2010 +0000

    nouveau: fix gallium-screen-context branch fallout

commit 7b2ffc2019d72e833afea7eebf3e80121187375d
Merge: 51e190e c036d13
Author: Keith Whitwell <keithw@vmware.com>
Date:   Fri Feb 5 09:55:02 2010 +0000

    Merge commit 'origin/master' into gallium-screen-context

    Conflicts:
    	src/gallium/winsys/drm/nouveau/drm/nouveau_drm_api.c

    This branch has got a pretty tortured history now, I expect
    a squash merge will be appropriate when it is done.

commit 51e190e95acf120f72768fafb29e9721e358df1b
Author: Keith Whitwell <keithw@vmware.com>
Date:   Thu Feb 4 17:58:02 2010 +0000

    gallium: fix some build issues

commit f524bdaa723fb181637ad30c6ad708aeedabe25b
Merge: f906212 3aba0a2
Author: Keith Whitwell <keithw@vmware.com>
Date:   Thu Feb 4 17:51:32 2010 +0000

    Merge commit 'origin/master' into gallium-screen-context

commit f9062126883199eabf045714c717cd35f4b7b313
Author: Keith Whitwell <keithw@vmware.com>
Date:   Thu Feb 4 17:17:12 2010 +0000

    gallium/docs: small description of screen::create_context

commit efcb37bd3d5ed37f06c6105bd2d750b374ec0927
Author: Keith Whitwell <keithw@vmware.com>
Date:   Thu Feb 4 16:42:42 2010 +0000

    drm/radeon: more dead create_context wrapper removal

commit 6badc0dd9e06cf2ec936940bcf12b9ef5324b301
Author: Keith Whitwell <keithw@vmware.com>
Date:   Thu Feb 4 16:42:30 2010 +0000

    drm/i965: more dead create_context wrapper removal

commit cf04ebd5a54b18b2d894cfdab2b0f2fd55626ffc
Author: Keith Whitwell <keithw@vmware.com>
Date:   Thu Feb 4 16:42:05 2010 +0000

    st/python: more dead create_context wrapper removal

commit 444f114c3516abf71c430e6e9d0d2ae3b80679d3
Author: Keith Whitwell <keithw@vmware.com>
Date:   Thu Feb 4 16:37:58 2010 +0000

    idenity: wrapped context creation

commit 5a6d09cb9e468d1ee6c8d54b887618819d8d94f2
Author: Keith Whitwell <keithw@vmware.com>
Date:   Thu Feb 4 16:28:47 2010 +0000

    ws/gdi: remove dead context_create wrapper

commit 132b55f4bec39386ac625f09aaa11f609664024c
Author: Keith Whitwell <keithw@vmware.com>
Date:   Thu Feb 4 16:27:52 2010 +0000

    ws/gdi: remove dead context_create wrapper

commit 56d2d21a0cdcb197a364049d354c2f15a4fc026a
Author: Keith Whitwell <keithw@vmware.com>
Date:   Thu Feb 4 16:25:38 2010 +0000

    st/xorg: use screen::context_create

commit 838c5cfe56b2af6c644909bed3c5e7cdd64c336a
Author: Keith Whitwell <keithw@vmware.com>
Date:   Thu Feb 4 16:23:20 2010 +0000

    glx/xlib: simplify creation of trace-wrapped contexts

    Trace screen knows how to properly wrap context creation in the
    wrapped screen, so nothing special to do here.

commit c99404c03ebaec4175f08a2f363e43c9085f2635
Author: Keith Whitwell <keithw@vmware.com>
Date:   Thu Feb 4 16:18:24 2010 +0000

    st/python: no need to special case context creation for trace

commit 193a527a682b6877bb1faecd8092df4dfd055a18
Author: Keith Whitwell <keithw@vmware.com>
Date:   Thu Feb 4 16:15:30 2010 +0000

    drm/radeon: remove dead create_context declaration

commit bb984eecc25cf23bc77e1c818b81165ba1a07c9a
Author: Keith Whitwell <keithw@vmware.com>
Date:   Thu Feb 4 16:14:58 2010 +0000

    nv/drm: remove dead create_context ref

commit e809313a44287dc4e16c28e9e74ef3b2b5271aa1
Author: Keith Whitwell <keithw@vmware.com>
Date:   Thu Feb 4 16:12:51 2010 +0000

    st/egl: remove a layer of wrappers around screen::create_context

commit 39caa6672a04122f185c22e17aab86d1c40938bf
Author: Keith Whitwell <keithw@vmware.com>
Date:   Thu Feb 4 16:05:28 2010 +0000

    r300g: fill in screen::context_create

commit 407f12556d16ba0656774d8a1d9ebda22f82f473
Author: Keith Whitwell <keithw@vmware.com>
Date:   Thu Feb 4 16:04:04 2010 +0000

    cell: adapt for screen::create_context, untested

commit d02b0c6ce321a04c76fdabb09e0e4380ce1c1376
Author: Keith Whitwell <keithw@vmware.com>
Date:   Thu Feb 4 15:50:24 2010 +0000

    drm/nv: adapt for screen::create_context

    All contexts now created directly through the screen, so remove
    equivalent code here.

    Remove apparently un-needed array of contexts in the winsys.

commit 53eec5b1349aa1b6892a75a7bff7e7530957aeae
Author: Keith Whitwell <keithw@vmware.com>
Date:   Thu Feb 4 15:50:08 2010 +0000

    stw: adapt for screen::create_context, untested

commit c6a64de3eb381bc9a88e9fbdecbf87d77925aaf5
Author: Keith Whitwell <keithw@vmware.com>
Date:   Thu Feb 4 15:49:20 2010 +0000

    trace: expose the wrapped context's priv data

    If we are going to keep this priv idea, really want an accessor
    function for it so that trace and other drivers can wrap that.

commit 75d6104e11d86ec2b0749627ed58e35f856ee6eb
Author: Keith Whitwell <keithw@vmware.com>
Date:   Thu Feb 4 15:47:55 2010 +0000

    nv30: adapt to screen::context_create

commit 12f5deb6ed9723e9b5d34577052b8365813ca14e
Author: Keith Whitwell <keithw@vmware.com>
Date:   Thu Feb 4 15:44:47 2010 +0000

    nv40: adapt to screen::context_create

commit 14baccaa3b6bbb3b91056126f6521828e786dc62
Author: Keith Whitwell <keithw@vmware.com>
Date:   Thu Feb 4 15:35:27 2010 +0000

    nv50: adapt to screen::create_context

    Not build tested.  Need to figure out how to build nouveau.

commit a0e94505ccd2d7f3e604465a2ac302f1286b73b6
Author: Keith Whitwell <keithw@vmware.com>
Date:   Thu Feb 4 15:22:27 2010 +0000

    llvmpipe: update for screen::create_context, untested

commit 0eae17107c950346030e4f7e0ec232f868d3893d
Author: Keith Whitwell <keithw@vmware.com>
Date:   Thu Feb 4 15:16:57 2010 +0000

    xlib/llvmpipe: remove dead winsys context creation path

commit 2f69f9ffaa7e2a01d2483277246ed13051ae4ca3
Author: Keith Whitwell <keithw@vmware.com>
Date:   Thu Feb 4 14:58:27 2010 +0000

    gallium: convert most code to use screen::create_context

    I wish I could build all of gallium at once to find breakages.

commit d7b57f4061b82322cbcae176125913d9f0dea6c1
Author: Keith Whitwell <keithw@vmware.com>
Date:   Thu Feb 4 12:46:21 2010 +0000

    glx: permit building with older protocol headers

    I'd like to be able to build mesa on current distro releases without
    having to upgrade from the standard dri2proto and glproto headers.  With
    this change I'm able to build on ancient releases such as Ubuntu 9-10...

    In general, it would be nice to be able to build-test mesa to check for
    unintended breakages without having to follow the external dependencies
    of every group working on the codebase.

commit 57adedd6fb06c98572ed8d4aef19203df4c4eea2
Merge: da71847 e1906ae
Author: Keith Whitwell <keithw@vmware.com>
Date:   Thu Feb 4 11:38:15 2010 +0000

    Merge commit 'origin/master' into gallium-screen-context

    Conflicts:
    	src/gallium/drivers/softpipe/sp_video_context.h
    	src/gallium/drivers/trace/tr_context.c
    	src/gallium/state_trackers/wgl/shared/stw_context.c
    	src/gallium/winsys/gdi/gdi_softpipe_winsys.c

commit da71847ea6414d7e352c6094f8963bb4eda344dc
Author: José Fonseca <jfonseca@vmware.com>
Date:   Sat May 2 08:57:39 2009 +0100

    wgl: Use pipe_screen::context_create.

commit 2595a188f93fd903600ef5d8517737ee0592035d
Author: José Fonseca <jfonseca@vmware.com>
Date:   Sat May 2 08:56:47 2009 +0100

    trace: Implement pipe_screen::context_create.

commit f3640e4ae37a5260cbfba999d079f827de0a313a
Author: José Fonseca <jfonseca@vmware.com>
Date:   Sat May 2 08:56:17 2009 +0100

    softpipe: Implement pipe_screen::context_create.

commit 347266bddc8bd39c711bacb2193793759d0f3696
Author: José Fonseca <jfonseca@vmware.com>
Date:   Sat May 2 08:55:31 2009 +0100

    gallium: New pipe_screen::context_create callback.
2010-02-08 13:05:36 +00:00
Vinson Lee bfa877cdd3 llvmpipe: Silence GCC 'type qualifiers ignored on function return type' warnings. 2010-02-07 00:09:46 -08:00
Vinson Lee 290487ce3c llvmpipe: Remove unnecessary headers. 2010-02-07 00:02:05 -08:00
Vinson Lee 507faae9e3 llvmpipe: Silence GCC 'no previous prototype' warning. 2010-02-06 00:48:18 -08:00
Chris Li 476b668ccc allow make to build lp_test_* for llvmpipe
Signed-off-by: José Fonseca <jfonseca@vmware.com>
2010-02-05 15:34:28 +00:00
José Fonseca ad60552ca1 llvmpipe: Disable multithreading on windows. 2010-02-05 13:56:01 +00:00
José Fonseca a1af8eec66 Merge remote branch 'origin/lp-binning'
Conflicts:
	src/gallium/auxiliary/util/u_dl.c
	src/gallium/auxiliary/util/u_time.h
	src/gallium/drivers/llvmpipe/lp_state_derived.c
	src/gallium/drivers/llvmpipe/lp_state_surface.c
	src/gallium/drivers/llvmpipe/lp_tex_cache.c
	src/gallium/drivers/llvmpipe/lp_tile_cache.c
2010-02-05 13:48:35 +00:00
José Fonseca 9cd2abdf8b llvmpipe: Disable unit tests on embedded platforms. 2010-02-04 14:39:30 +00:00
Vinson Lee 18e00e5863 llvmpipe: Remove unnecessary header. 2010-02-03 22:33:58 -08:00
José Fonseca 45dac0d82a Merge branch 'gallium-embedded' 2010-02-03 18:54:13 +00:00
Brian Paul 54d7ec8e76 softpipe: fix broken AA points, AA lines
This fixes a regression when the geometry shaders branch was merged
to master with commit 89d8577fb3.

progs/demos/pointblast and progs/redbook/anti work again.
2010-02-02 18:54:53 -07:00
José Fonseca 38f6f23fcf gallium: Make pipe_atomic a regular int32_t. 2010-02-02 14:43:48 +00:00
José Fonseca 28486880ca gallium: pipe/p_inlines.h -> util/u_inlines.h 2010-02-02 14:42:17 +00:00
José Fonseca 854627387d llvmpipe: Add missing includes. 2010-02-01 15:11:34 +00:00
José Fonseca bee9964b29 Merge remote branch 'origin/master' into lp-binning
Conflicts:
	Makefile
	src/gallium/auxiliary/util/u_surface.c
	src/gallium/drivers/llvmpipe/lp_flush.c
	src/gallium/drivers/llvmpipe/lp_setup.c
	src/gallium/drivers/llvmpipe/lp_state_derived.c
	src/gallium/drivers/llvmpipe/lp_state_fs.c
	src/gallium/drivers/llvmpipe/lp_state_surface.c
	src/gallium/drivers/llvmpipe/lp_tex_cache.c
	src/gallium/drivers/llvmpipe/lp_texture.c
	src/gallium/drivers/llvmpipe/lp_tile_cache.c
	src/mesa/state_tracker/st_cb_condrender.c
2010-01-31 05:36:33 +00:00
Luca Barbieri 6c403750d6 tgsi: add caps for fragment coord conventions (v3)
Changes in v3:
- Renumber caps to accomodate caps to add to master in the meantime
- Document caps
- Add unsupported caps to *_screen.c too

Changes in v2:
- Split for properties patch
- Use positive caps instead of negative caps

This adds 4 caps to indicate support of each of the fragment coord
conventions.

All drivers are also modifed to add the appropriate caps.

Some drivers were incorrectly using non-Gallium-default conventions,
and caps for them have them set so that they will behave correctly
after the later state tracker patches.

This drivers are softpipe/llvmpipe (uses integer rather than half
integer) and pre-nv50 Nouveau (uses lower left rather than upper left).

Other drivers might be broken. With this patchset, fixing them is
only a matter of exposing the appropriate caps that match the behavior
of the existing code.

Drivers are encouraged to support all conventions themselves for better
performance, and this feature is added to softpipe in a later patch.
2010-01-29 14:13:14 +01:00
Vinson Lee 1a2f9d722e llvmpipe: Remove unnecessary header. 2010-01-28 15:54:57 -08:00
Roland Scheidegger 9b346f83a7 Merge commit 'origin/perrtblend'
Conflicts:
	src/gallium/drivers/softpipe/sp_screen.c
	src/gallium/include/pipe/p_defines.h
2010-01-28 17:23:58 +01:00
Michal Krol 9851644435 gallium: Enable multiple constant buffers for vertex and geometry shaders. 2010-01-28 14:07:53 +01:00
Vinson Lee c2bd1657a8 llvmpipe: Remove unnecessary headers. 2010-01-27 18:08:37 -08:00
Brian Paul 36a0819ff4 llvmpipe: added debug option to disable LLVM optimization passes 2010-01-27 17:16:42 -07:00
Brian Paul e95ad2a2b5 llvmpipe: count/report time spent in LLVM compilations 2010-01-27 13:49:43 -07:00
Roland Scheidegger 1a9d01dcde gallium: add the new PIPE_CAP blend bits to more drivers
some drivers will complain if they don't know the cap bit
2010-01-26 17:32:57 +01:00
Roland Scheidegger 99e28d4ee3 llvmpipe: adapt to blend changes 2010-01-25 16:35:56 +01:00
José Fonseca 4c082faa7e llvmpipe: Remove lp_tex_sample_c.c again.
Popped back to life in some merge. Not necessary even as a reference,
since it is identical to softpipe's sp_tex_sample.c with renamed symbols.
2010-01-25 11:54:54 +00:00
Brian Paul cd8614b028 Merge branch 'mesa_7_7_branch'
Conflicts:
	src/gallium/auxiliary/draw/draw_context.c
	src/gallium/auxiliary/draw/draw_pt_fetch_shade_pipeline.c
	src/gallium/auxiliary/pipebuffer/Makefile
	src/gallium/auxiliary/pipebuffer/SConscript
	src/gallium/auxiliary/pipebuffer/pb_buffer_fenced.c
	src/gallium/auxiliary/tgsi/tgsi_scan.c
	src/gallium/drivers/i915/i915_surface.c
	src/gallium/drivers/i915/i915_texture.c
	src/gallium/drivers/llvmpipe/lp_setup.c
	src/gallium/drivers/llvmpipe/lp_tex_sample_c.c
	src/gallium/drivers/llvmpipe/lp_texture.c
	src/gallium/drivers/softpipe/sp_prim_vbuf.c
	src/gallium/state_trackers/xorg/xorg_dri2.c
	src/gallium/winsys/drm/intel/gem/intel_drm_api.c
	src/gallium/winsys/drm/nouveau/drm/nouveau_drm_api.c
	src/gallium/winsys/drm/radeon/core/radeon_drm.c
	src/gallium/winsys/drm/vmware/core/vmw_screen_dri.c
	src/mesa/state_tracker/st_cb_clear.c
2010-01-22 12:17:02 -07:00
Brian Paul 3bca8691b5 llvmpipe: use some local vars to index step arrays
Saves a few more cycles.
2010-01-21 19:10:03 -07:00
Brian Paul 1d23954a08 llvmpipe: s/inline/INLINE/ 2010-01-21 19:05:54 -07:00
Brian Paul e24ea786fa llvmpipe: consolidate lp_scene_alloc_aligned() calls
Use just one call instead of four.  Good for a few more fps.
2010-01-21 19:04:55 -07:00
Brian Paul 798a9d3f94 llvmpipe: re-use a1 var in linear_coef() 2010-01-21 18:25:31 -07:00
Brian Paul ff9b55da9a llvmpipe: area is an int here, not float 2010-01-21 17:31:43 -07:00
Brian Paul a904a7b990 llvmpipe: manually unroll the inputs.step[] setup code
Good for a few more fps in some tests.
2010-01-21 16:21:33 -07:00
Brian Paul cd9d9e2436 llvmpipe: added simple perf/statistics counting facility
Currently counting number of tris, how many tiles of each size are
fully covered, partially covered or empty, etc.

Set LP_DEBUG=counters to enable.  Results are printed upon context
destruction.
2010-01-21 15:39:57 -07:00
Vinson Lee 4222bf3d3c llvmpipe: Remove unnecessary headers. 2010-01-21 14:31:15 -08:00
Brian Paul 63f249bf90 llvmpipe: optimize tile writing code
The code which converts/copies color tiles to the linear layout has
been rewritten.  There's less arithmetic and better loop unrolling,
and possibly a better memory access pattern.
Some demos, like gears, are about 20% faster now.
2010-01-20 17:48:13 -07:00
Brian Paul 7319ae0954 llvmpipe: remove tile clipping code
The surface is always a multiple of the tile size now.
2010-01-20 17:47:26 -07:00
Brian Paul 0706dae088 llvmpipe: align display target size to multiple of tile size
This will allow us to skip clipping tiles to surface bounds.
2010-01-20 17:44:12 -07:00
Brian Paul 58903b3781 llvmpipe: put TILE_SIZE #define in its own header
To avoid including lp_tile_soa.h in other places.
2010-01-20 17:23:11 -07:00
Brian Paul 9b534400d9 llvmpipe: add makefile rule for generating .s files 2010-01-20 17:19:00 -07:00
Brian Paul 4d2dc9da82 llvmpipe: updated comment 2010-01-20 11:32:48 -07:00
Roland Scheidegger 04cb5dfb1e llvmpipe: adapt to per-rendertarget blend changes 2010-01-20 18:27:53 +01:00
Brian Paul ec459f2aec llvmpipe: asst. task-related clean-ups 2010-01-19 16:58:25 -07:00
Brian Paul d8d80a8d74 llvmpipe: fix-up comment 2010-01-19 11:58:43 -07:00
Brian Paul 1073e39ab9 llvmpipe: re-order file list, fix indentation 2010-01-19 09:45:51 -07:00
Brian Paul 0fccfc9cc0 llvmpipe: remove unneeded DEBUG checks, use step var 2010-01-19 09:30:44 -07:00
Brian Paul 75f262b8b4 llvmpipe: updated comments 2010-01-19 09:30:13 -07:00
Brian Paul 9a23d810be llvmpipe: tweak a comment 2010-01-18 17:39:54 -07:00
Brian Paul 62623c4dc5 llvmpipe: added show_tiles and show_subtiles debug options
These options draw lines over the tiles to show the 64x64 tile
bounds and 16x16 sub-tile bounds.  For debugging/visualization.
2010-01-18 13:10:14 -07:00
Keith Whitwell 591401ff05 llvmpipe: use new u_ringbuffer for scene queue 2010-01-17 00:30:23 +00:00
José Fonseca ba5d600c90 Merge remote branch 'origin/master' into lp-binning
Conflicts:
	src/gallium/drivers/llvmpipe/lp_quad.h
	src/gallium/drivers/llvmpipe/lp_setup.c
2010-01-16 23:21:06 +00:00
Brian Paul fdfe06ad80 llvmpipe: implement scissor test in triangle setup 2010-01-15 12:06:00 -07:00
Brian Paul adb48d5350 llvmpipe: remove lp_rast_triangle::min/max fields
These values aren't needed outside the do_triangle_ccw() function.
2010-01-15 11:52:14 -07:00
Brian Paul 47fee14687 llvmpipe: skip 4x4 in/out test code
It's a litte faster to just do the in/out testing in the shader
jit code.
2010-01-15 11:35:30 -07:00
Brian Paul 12ba9e99db llvmpipe: added comment about lookup-tables vs. computation 2010-01-15 11:26:35 -07:00
Brian Paul 4bef3575e6 llvmpipe: change 'in' to boolean, add comments 2010-01-15 11:25:13 -07:00
Brian Paul 2797f2bf57 llvmpipe: generate two shader varients, one omits triangle in/out testing
When we know that a 4x4 pixel block is entirely inside of a triangle
use the jit function which omits the in/out test code.

Results in a few percent speedup in many tests.
2010-01-15 11:21:16 -07:00
Brian Paul 3b1920a349 llvmpipe: asst code changes in lp_state_fs.c 2010-01-15 10:25:59 -07:00
Roland Scheidegger 5e5d0ad081 Merge branch 'gallium-noconstbuf'
Conflicts:
	src/gallium/drivers/softpipe/sp_draw_arrays.c
	src/mesa/state_tracker/st_draw_feedback.c
2010-01-15 18:09:45 +01:00
Brian Paul 345178a7fc llvmpipe: put labels on some value refs 2010-01-15 10:04:16 -07:00
Brian Paul f97eeeec6b llvmpipe: add extra flags to DEFINES, no CFLAGS
Doesn't make any real difference but -D flags are put into DEFINES
everywhere else.
2010-01-15 09:16:34 -07:00
Brian Paul 4461442849 llvmpipe: implement scissor testing
The scissor test is implemented as another per-quad operation in
the JIT code.  The four scissor box params are passed via the
lp_jit_context.  In the JIT code we compare the quad's x/y coords
against the clip bounds and create a new in/out mask that's AND'd
with the main quad mask.

Note: we should also do scissor testing in the triangle setup code
to improve efficiency.  That's not done yet.
2010-01-14 19:15:00 -07:00
Brian Paul ca12e30d97 llvmpipe: minor comment update 2010-01-14 19:08:19 -07:00
Brian Paul 16ecd2f078 llvmpipe: clean-up, fixing up frame dump/debug code 2010-01-14 19:05:55 -07:00
Brian Paul dfd6e762e7 llvmpipe: remove redundant code in llvmpipe_set_blend_color() 2010-01-14 16:21:49 -07:00
Brian Paul 4414a1a73c llvmpipe: assorted clean-ups in texture code 2010-01-14 14:19:16 -07:00
Brian Paul 2ba1c8189a llvmpipe: use one loop in lp_rast_clear_zstencil()
This is just a tiny bit faster.
2010-01-13 18:58:42 -07:00
Brian Paul f94a99170e llvmpipe: optimize lp_rast_clear_color() for non-gray colors
This makes a big difference in progs that clear to a non-gray color.
Some demos are 30-50% faster.
2010-01-13 18:54:50 -07:00
Brian Paul f19f218e7a llvmpipe: minor assorted clean-ups 2010-01-13 18:01:45 -07:00
Brian Paul 018b78ad64 llvmpipe: check render targets before other textures 2010-01-13 15:32:55 -07:00
Brian Paul 1287277446 llvmpipe: also check render target textures in lp_setup_is_texture_referenced() 2010-01-13 15:30:42 -07:00
Brian Paul 0b279c5382 llvmpipe: indentation fixes 2010-01-13 15:10:57 -07:00
Brian Paul db58192cfb llvmpipe: re-get scene pointer after flushing 2010-01-13 15:10:57 -07:00
Brian Paul d59fe44896 llvmpipe: check for texture usage in all scenes 2010-01-13 15:10:57 -07:00
Brian Paul a27b12171d llvmpipe: add scene texture referencing code 2010-01-13 15:10:57 -07:00
Brian Paul 592e40aa7b llvmpipe: added scene functions for texture reference counting
When a texture is used in the scene we add it to a list of texture
references.  The lp_scene_is_textured_referenced() function tells
us if a texture is referenced by the scene.
2010-01-13 15:10:57 -07:00
Brian Paul 4769328fe1 llvmpipe: comments 2010-01-13 15:10:57 -07:00
Brian Paul a36395d487 llvmpipe: comments 2010-01-13 15:10:57 -07:00
Brian Paul 9be1feacf2 llvmpipe: added llvmpipe_texture_const() 2010-01-13 15:10:56 -07:00
Brian Paul ddb94661a4 llvmpipe: minor comment upgrades 2010-01-13 15:10:56 -07:00
José Fonseca 7df4c88088 llvmpipe: Opaque shader implies complete colormask too. 2010-01-13 22:07:24 +00:00
José Fonseca a1acbff299 llvmpipe: Reset the bin when shading a whole tile with an opaque shader. 2010-01-13 21:51:47 +00:00
Keith Whitwell 4231006e29 llvmpipe: add bin debugger
Adjust definition of empty_bin according to what's actually in empty
bins.  We often have a state packet before/after load commands.

Still need to do something about the fence packets.
2010-01-13 20:14:04 +00:00
Keith Whitwell 95ee14f147 llvmpipe: implement lp_rast_load_zstencil
Load zbuffer contents for binned scenes that don't start with a clear
and which have a bound zbuffer.
2010-01-13 16:52:44 +00:00
Brian Paul 0bb5c3060f llvmpipe: added debug warning 2010-01-13 09:32:21 -07:00
Brian Paul 4439aab7b7 llvmpipe: comments and LLVMValueRef naming 2010-01-13 09:32:21 -07:00
Brian Paul 212f3a6cb3 llvmpipe: tweak subpixel_snap() arithmetic
This adjustment fixes some rasterization differences between llvmpipe
and softpipe (and other renderers).
2010-01-13 09:32:21 -07:00
Keith Whitwell db83ad4b43 llvmpipe: improve empty-bin test further
Remove unused param, add comments.  Thanks to Brian for review.
2010-01-13 16:29:39 +00:00
Keith Whitwell f4b29e6ad3 llvmpipe: improve empty-bin test
We emit at most two clear packets (color and z respectively).
2010-01-13 15:49:24 +00:00
Keith Whitwell da45f49cc6 llvmpipe: quick hack to short-circuit empty bins 2010-01-13 15:18:32 +00:00
Brian Paul 7e4c75c040 llvmpipe: fix indentation, comment typo 2010-01-12 17:12:49 -07:00
Brian Paul ec9cfac768 llvmpipe: debug checks: make sure scene is empty at key points 2010-01-12 17:12:07 -07:00
Brian Paul c560b97b17 llvmpipe: assert that we're putting data into a valid bin 2010-01-12 17:11:40 -07:00
Brian Paul 214ffad015 llvmpipe: clamp maxx,maxy to framebuffer size (in terms of tiles)
In some corner cases the right-most / bottom-most vertex can be
right on the edge of the framebuffer.  Because the maxx, maxy vals
are computed with a series of float/int, pixel/tile transformations
we can end up with maxx >= scene->x_tiles or maxy >= scene->y_tiles.
This leads to putting data into bins that never get processed, or
reset.  This becomes stale data that can lead to segfaults.

Clamping fixes this.
2010-01-12 17:08:07 -07:00
Brian Paul de10168a46 llvmpipe: added lp_scene_is_empty() 2010-01-12 17:06:19 -07:00
Brian Paul 4061ca02dd llvmpipe: silence unused var warnings 2010-01-12 13:01:32 -07:00
Brian Paul a32e9b2a2d llvmpipe: remove unused #define 2010-01-12 10:11:36 -07:00
José Fonseca 26c78a4968 gallium: Rename ALIGN_STACK -> PIPE_ALIGN_STACK for consistency. 2010-01-12 12:15:24 +00:00
José Fonseca 5dfd5ed5e7 gallium: Simplify PIPE_ALIGN_VAR.
gcc allows pre-fix variable attributes.

Suggested by Ian Romanick.
2010-01-12 12:11:04 +00:00
José Fonseca 86bfe974b8 gallium: Generalize the alignment macros to other compilers and any alignment. 2010-01-12 12:11:04 +00:00
Brian Paul 5cf4630969 llvmpipe: disable the all in/out test code for now
It's still faster not to try to special case the "all pixels are
known to be inside the triangle" case.
2010-01-11 15:30:56 -07:00
Brian Paul 9a10d14a44 llvmpipe: move, update comments 2010-01-11 15:30:17 -07:00
Brian Paul 3b5d849268 llvmpipe: refactor generate_fragment() code
This will make it easier to generate multiple versions of the fragment
code per variant.
2010-01-11 13:16:02 -07:00
Brian Paul 46b5bd6cad llvmpipe: do the all-in test on the scalar c0 instead of vector c0
This still isn't faster, but committing it for posterity.
2010-01-11 12:59:39 -07:00
Roland Scheidegger 70c8d2a297 gallium: remove const qualifier from pipe_buffer argument in set_constant_buffer 2010-01-11 16:30:48 +01:00
Keith Whitwell 86f450060d llvmpipe: force constant interpolation of flatshade colors
Nice speedup for gears.
2010-01-11 12:12:59 +00:00
Keith Whitwell 094525fb23 llvmpipe: remove opencoded constant 2010-01-11 11:06:15 +00:00
Keith Whitwell 16c1ad54bc llvmpipe: remove scissor cliprect derived state
Was previously calculating the intersection of the scissor rectangle
and the framebuffer dimensions.  Rendering is already restricted to
framebuffer dimensions by other means, so scissor testing (when
implemented) can just use the scissor state directly.
2010-01-11 11:06:15 +00:00
José Fonseca 12576556e4 llvmpipe: Update instructions.
Explain how to build for windows. Both MSVC 9 and cross MinGW supported.

Stop documenting LLVM 2.5 as supported. It still supported at the moment
but it will soon stop being.
2010-01-10 18:37:42 +00:00
Keith Whitwell c1a0441602 llvmpipe: initial mrt support
Non-mrt apps work, and the code looks correct, but not many mrt test apps
handy atm...
2010-01-10 17:22:09 +00:00
José Fonseca cdc11056de llvmpipe: Yet another hack to get release LLVM static libraries to link in debug builds. 2010-01-10 11:20:11 +00:00
Brian Paul f4321fbd96 llvmpipe: optimize case when all four pixels are inside the triangle
When the incoming c0,c1,c2 values are equal to INT_MIN it means that
all pixels are inside the triangle.  Thus we can skip the detailed
pixel inside/outside triangle tests.  Use the new lp_build_if()/endif()
functions to generate the branching code.

The code is disabled ATM however because it's actually a little slower
than the original code.  A little more tuning may fix that though...
2010-01-08 14:49:34 -07:00
Brian Paul 5208af7853 llvmpipe: fix more if/else/endif design bugs 2010-01-08 12:47:30 -07:00
Brian Paul 855d7f51e4 llvmpipe: move some fields to the private lp_build_flow_if struct 2010-01-08 11:32:36 -07:00
Brian Paul af31e65b55 llvmpipe: free the phi array 2010-01-08 11:20:38 -07:00
Brian Paul 70b8d59792 llvmpipe: checkpoint if/else/endif contructs work
The LLVM IR looks correct now.  Basic blocks are where they're supposed
to be and the Phi functions have the right (var,block) information.
2010-01-08 11:06:16 -07:00
José Fonseca 080c40ab32 Merge remote branch 'origin/master' into lp-binning
Conflicts:
	src/gallium/auxiliary/util/u_surface.c
	src/gallium/drivers/llvmpipe/Makefile
	src/gallium/drivers/llvmpipe/SConscript
	src/gallium/drivers/llvmpipe/lp_bld_arit.c
	src/gallium/drivers/llvmpipe/lp_bld_flow.c
	src/gallium/drivers/llvmpipe/lp_bld_interp.c
	src/gallium/drivers/llvmpipe/lp_clear.c
	src/gallium/drivers/llvmpipe/lp_context.c
	src/gallium/drivers/llvmpipe/lp_context.h
	src/gallium/drivers/llvmpipe/lp_draw_arrays.c
	src/gallium/drivers/llvmpipe/lp_jit.c
	src/gallium/drivers/llvmpipe/lp_jit.h
	src/gallium/drivers/llvmpipe/lp_prim_vbuf.c
	src/gallium/drivers/llvmpipe/lp_setup.c
	src/gallium/drivers/llvmpipe/lp_setup_point.c
	src/gallium/drivers/llvmpipe/lp_state.h
	src/gallium/drivers/llvmpipe/lp_state_blend.c
	src/gallium/drivers/llvmpipe/lp_state_derived.c
	src/gallium/drivers/llvmpipe/lp_state_fs.c
	src/gallium/drivers/llvmpipe/lp_state_sampler.c
	src/gallium/drivers/llvmpipe/lp_state_surface.c
	src/gallium/drivers/llvmpipe/lp_tex_cache.c
	src/gallium/drivers/llvmpipe/lp_tex_cache.h
	src/gallium/drivers/llvmpipe/lp_tex_sample.h
	src/gallium/drivers/llvmpipe/lp_tile_cache.c
2010-01-08 15:42:57 +00:00
José Fonseca ba33ef0011 lvmpipe: Initialize all coordinates.
Fixes assertion failure with fp-incomplete-tex (fdo 24298).
2010-01-08 01:15:17 +00:00
José Fonseca 8081c1eaa5 llvmpipe: Remove TGSI sampler pointers from JIT context too. 2010-01-07 16:16:45 +00:00
José Fonseca 12c6b871a3 llvmpipe: Remove more loose ends of TGSI exec sampling. 2010-01-07 16:10:04 +00:00
José Fonseca 7bd7e2da75 llvmpipe: Axe texture sampling code inherited from softpipe.
Was used only as a reference, since texture sampling is now code generated.
Already axed in the lp-binning branch too.

This fixes the llvmpipe build after recent sampling changes.
2010-01-07 15:35:24 +00:00
Brian Paul baeb3a2351 llvmpipe: checkpoint commit of new if/else/endif flow control
Totally untested at this point.  More work to do.
2010-01-06 17:53:12 -07:00
Brian Paul db7f9b053b llvmpipe: more comments in flow builder code 2010-01-06 14:11:54 -07:00
Brian Paul 4e8d67af57 llvmpipe: flow-control comments 2010-01-06 10:16:34 -07:00
Keith Whitwell b08583da46 llvmpipe: fix double free 2010-01-06 17:13:37 +00:00
Keith Whitwell 601969c587 llvmpipe: rename some functions 2010-01-06 17:13:28 +00:00
Keith Whitwell c9240c4c8f llvmpipe: remove dead code 2010-01-06 17:00:26 +00:00
Keith Whitwell 72120292b9 llvmpipe: restrict header visibility 2010-01-06 16:56:28 +00:00
Keith Whitwell 5ce0380a0f llvmpipe: merge setup and draw vbuf submodules
The setup tiling engine is now plugged directly into the draw module
as a rendering backend.

Removed a couple of layering violations such that the setup code no
longer reaches out into the surrounding llvmpipe state or context.
2010-01-06 16:44:43 +00:00
Michal Krol 4e014c0a14 pipe_sampler_state::compare_mode is not a boolean enable flag.
It's a 1-bit enum.
2010-01-06 16:11:26 +01:00
Luca Barbieri f023473748 gallium: remove PIPE_TEX_FILTER_ANISO
This patch removes PIPE_TEX_FILTER_ANISO.

Anisotropic filtering is enabled if and only if max_anisotropy > 1.0.
Values between 0.0 and 1.0, inclusive, of max_anisotropy are to be
considered equivalent, and meaning to turn off anisotropic filtering.

This approach has the small drawback of eliminating the possibility of
enabling anisotropic filter on either minification or magnification
separately, which Radeon hardware seems to support, is currently
support by Gallium but not exposed to OpenGL.  If this is actually
useful it could be handled by splitting max_anisotropy in two values
and adding an appropriate OpenGL extension.

NOTE: some fiddling & reformatting by keithw to get this patch to
apply.  Hopefully nothing broken in the process.
2010-01-06 10:35:47 +00:00
Keith Whitwell c727fa6dbf Merge commit 'origin/gallium-draw-retval'
Conflicts:
	src/gallium/drivers/identity/id_context.c
2010-01-05 14:13:40 +00:00
Michal Krol 2c046034dc Remove TGSI_OPCODE_SHR, map existing usage to TGSI_OPCODE_ISHR.
This is to differentiate it from its unsigned version, TGSI_OPCODE_USHR.
2010-01-05 09:26:48 +01:00
Brian Paul 5ac16495a2 Merge branch 'mesa_7_7_branch'
Conflicts:
	docs/relnotes.html
	src/gallium/drivers/llvmpipe/lp_tex_sample_c.c
	src/gallium/drivers/r300/r300_cs.h
	src/mesa/drivers/dri/i965/brw_wm_surface_state.c
	src/mesa/main/enums.c
2010-01-04 19:16:24 -07:00
Alan Hourihane a3abb9d1cc silence compiler warning 2010-01-04 12:42:51 +00:00
Vinson Lee 0bfc579bd4 llvmpipe: Remove comma at end of enumerator list. 2010-01-03 14:42:36 -08:00
Vinson Lee 3ae37da611 llvmpipe: Silence uninitialized variable warning. 2010-01-01 16:03:53 -08:00
Vinson Lee fd237a879f llvmpipe: Use C-style comment. 2010-01-01 15:38:19 -08:00
José Fonseca cf9be46c01 llvmpipe: Add missing include path.
The abscense was being masked previously.
2010-01-01 12:16:20 +00:00
José Fonseca f8f4757d46 scons: Aggregate all tiny libraries in a single library.
Makes integration of gallium into out of tree components much easier. No
pratical change for components in this tree,
2010-01-01 12:16:19 +00:00
Brian Paul 25024d9482 Merge branch 'mesa_7_7_branch'
Conflicts:
	configs/darwin
	src/gallium/auxiliary/util/u_clear.h
	src/gallium/state_trackers/xorg/xorg_exa_tgsi.c
	src/mesa/drivers/dri/i965/brw_draw_upload.c
2009-12-31 09:02:27 -07:00
Vinson Lee 46c2196de3 llvmpipe: Fix assert. 2009-12-28 18:07:09 -08:00
Vinson Lee e049ddb754 llvmpipe: Silence compiler warnings. 2009-12-28 18:05:30 -08:00
José Fonseca 926562fe27 llvmpipe: Unmapping vertex/index buffers does NOT flush draw module anymore.
Not since 6094e79f4e.

Drivers now need to flush draw module explicitely (which explains why
all those previous commits adding draw_flushes calls were necessary).

This is a good thing, but it's tricky to get this right in face of user buffers
(it's not even clear who has the responsibility to flush when a user buffer
is seen -- statetracker or pipe driver), so just force flush (temporarily)
since it's not a bottleneck now.
2009-12-28 22:53:41 +00:00
Vinson Lee 31d1822473 llvmpipe: Silence compiler warnings. 2009-12-28 00:44:30 -08:00
José Fonseca 080703e398 llvmpipe: Treat state changes systematically.
That is:
- check for no op
- update/flush draw module
- update bound state and mark it as dirty

In particular flushing the draw module is important since it may contain
unflushed primitives which would otherwise be draw with wrong state.
2009-12-26 21:06:46 +00:00
José Fonseca d01c7bef29 llvmpipe: Use comments and more code from softpipe's is_texture_referenced implementation. 2009-12-26 11:02:02 +00:00
José Fonseca 491a184943 llvmpipe: Flush draw module before switching framebuffer.
Otherwise geometry will end up in the wrong rendertarget.
2009-12-26 11:00:42 +00:00
Zack Rusin b0575151b6 gs: fix drivers so they work with geometry shaders 2009-12-25 05:52:17 -05:00
Zack Rusin 89d8577fb3 gallium: add geometry shader support to gallium 2009-12-25 05:52:16 -05:00
Roland Scheidegger 1278507e3b gallium: adapt drivers to pipe_constant_buffer removal 2009-12-24 00:55:49 +01:00
José Fonseca b5a408bae5 llvmpipe: Install unit tests on build/xxx/bin 2009-12-23 16:38:50 +00:00
Roland Scheidegger 35e8283c69 Merge branch 'gallium-edgeflags'
Conflicts:
	src/mesa/state_tracker/st_draw.c
2009-12-22 20:54:26 +01:00
Keith Whitwell 03f212b0d8 gallium: propogate draw retval changes into more drivers 2009-12-21 22:55:40 +00:00
Roland Scheidegger 429f0e3b37 gallium: fix up drivers for edgeflag changes
several drivers which chose to ignore edgeflags might require some more work,
while edgeflags never worked there they might now crash.
2009-12-19 00:18:43 +01:00
Michal Krol b1ed72ebe2 Move the remaining format pf_get_* functions to u_format.h.
Previously they depended on format blocks, but after removing those
they started depending on format encoding.
2009-12-17 23:41:57 +01:00
Michal Krol 16c6dce013 Merge branch 'master' into pipe-format-simplify
Conflicts:
	src/gallium/auxiliary/draw/draw_pipe_aaline.c
	src/gallium/auxiliary/draw/draw_pipe_pstipple.c
	src/gallium/auxiliary/util/u_blit.c
	src/gallium/auxiliary/util/u_gen_mipmap.c
	src/gallium/auxiliary/util/u_surface.c
	src/gallium/auxiliary/vl/vl_mpeg12_mc_renderer.c
	src/gallium/drivers/cell/ppu/cell_texture.c
	src/gallium/drivers/llvmpipe/lp_texture.c
	src/gallium/drivers/r300/r300_emit.c
	src/gallium/drivers/r300/r300_texture.c
	src/gallium/drivers/softpipe/sp_texture.c
	src/gallium/drivers/softpipe/sp_tile_cache.c
	src/gallium/drivers/svga/svga_state_vs.c
	src/gallium/include/pipe/p_format.h
	src/gallium/state_trackers/dri/dri_drawable.c
	src/gallium/state_trackers/egl/egl_surface.c
	src/gallium/state_trackers/python/p_device.i
	src/gallium/state_trackers/python/st_softpipe_winsys.c
	src/gallium/state_trackers/vega/api_filters.c
	src/gallium/state_trackers/vega/image.c
	src/gallium/state_trackers/vega/mask.c
	src/gallium/state_trackers/vega/paint.c
	src/gallium/state_trackers/vega/renderer.c
	src/gallium/state_trackers/vega/vg_tracker.c
	src/gallium/state_trackers/xorg/xorg_crtc.c
	src/gallium/state_trackers/xorg/xorg_dri2.c
	src/gallium/state_trackers/xorg/xorg_exa.c
	src/gallium/state_trackers/xorg/xorg_renderer.c
	src/gallium/state_trackers/xorg/xorg_xv.c
	src/gallium/state_trackers/xorg/xvmc/surface.c
	src/gallium/winsys/drm/nouveau/drm/nouveau_drm_api.c
	src/gallium/winsys/drm/radeon/core/radeon_buffer.c
	src/gallium/winsys/egl_xlib/sw_winsys.c
	src/gallium/winsys/g3dvl/xlib/xsp_winsys.c
	src/gallium/winsys/gdi/gdi_llvmpipe_winsys.c
	src/gallium/winsys/gdi/gdi_softpipe_winsys.c
	src/gallium/winsys/xlib/xlib_cell.c
	src/gallium/winsys/xlib/xlib_llvmpipe.c
	src/gallium/winsys/xlib/xlib_softpipe.c
	src/mesa/state_tracker/st_cb_fbo.c
	src/mesa/state_tracker/st_cb_texture.c
	src/mesa/state_tracker/st_texture.c
2009-12-17 22:37:15 +01:00
Brian Paul aeb6351a09 llvmpipe: fix upper/lower-case typo 2009-12-17 14:26:48 -07:00
Brian Paul 7d9b97703a llvmpipe: added function comments 2009-12-17 14:22:43 -07:00
Brian Paul 5771f3d483 llvmpipe: remove unused code, added comments, etc 2009-12-17 10:52:50 -07:00
Brian Paul 808170a0ff llvmpipe: replace INT_MIN/2 with INT_MIN
Since changing the in/out test we can just use INT_MIN to be sure the
comparison against the step values always passes.
2009-12-17 09:01:01 -07:00
Brian Paul b9d33db0a4 llvmpipe: improve the in/out test a little
Instead of:
  s = c + step
  m = s > 0
Do:
  m = step > c  (with negated c)
2009-12-17 08:17:04 -07:00
Keith Whitwell 7f2ba80025 llvmpipe: keep copy of framebuffer state in setup context
Avoids crashes when first frame is rendered before window is mapped.
Avoids potential issue where fb state is changed before setup context is
flushed.
2009-12-17 11:29:37 +00:00
Brian Paul ab94381930 llvmpipe: do final the pixel in/out triangle test in the fragment shader
The test to determine which of the pixels in a 2x2 quad is now done in
the fragment shader rather than in the calling C code.  This is a little
faster but there's a few more things to do.

Note that the step[] array elements are in a different order now.  Rather
than being in row-major order for the 4x4 grid, they're in "quad-major"
order.  The setup of the step arrays is a little more complicated now.
So is the course/intermediate tile test code, but some lookup tables
help with that.

Next steps:
 - early-cull 2x2 quads which are totally outside the triangle.
 - skip the in/out test for fully contained quads
 - make the in/out comparison code tighter/faster.
2009-12-16 16:10:05 -07:00
Brian Paul e288796c92 llvmpipe: added lp_build_int32_vec4_type() 2009-12-16 12:33:11 -07:00
Brian Paul 2297bc9233 llvmpipe: refactor lp_build_cmp() to use lp_build_compare() 2009-12-16 12:32:45 -07:00
José Fonseca 2584c5bd25 llvmpipe: add LP_DEBUG env var
Cherry-picked from dec35d04ae.
2009-12-16 15:06:17 +00:00
Brian Paul f1f49bd465 llvmpipe: fix broken TGSI_OPCODE_FRC codegen 2009-12-16 15:06:17 +00:00
Brian Paul 43d6c81ae2 llvmpipe: fix broken lp_build_abs() 2009-12-16 15:06:16 +00:00
Brian Paul cdbcd96fdf llvmpipe: tighten up an assertion 2009-12-15 15:39:48 -07:00
Brian Paul 276b8523e8 llvmpipe: use 1ULL to be ready for 64-bit arithmetic someday 2009-12-15 07:58:37 -07:00
José Fonseca 3a15c48ece llvmpipe: Fix yet another copynpaste typo in lp_build_log2_approx.
Now fslight looks perfect.
2009-12-15 14:46:43 +00:00
José Fonseca 85c27c3ef7 llvmpipe: Fix lp_build_polynomial comment. 2009-12-15 14:15:52 +00:00
José Fonseca 72c9878069 llvmpipe: Fix typo in lp_build_log constant. 2009-12-15 13:58:53 +00:00
José Fonseca 846e38f1c3 llvmpipe: Fix bad SI -> FP conversion into lp_build_log2_approx.
It should be a bitcast  as the integer value is actually an encoded FP
already.
2009-12-15 13:15:16 +00:00
Brian Paul 55879440d7 llvmpipe: fix broken TGSI_OPCODE_FRC codegen 2009-12-14 15:27:35 -07:00
Brian Paul 6e2a93739e llvmpipe: fix broken lp_build_abs() 2009-12-14 15:24:31 -07:00
Brian Paul b06b3a4925 llvmpipe: update file list in Makefile 2009-12-14 11:49:23 -07:00
Keith Whitwell 663750d556 llvmpipe: rename bins to scene
It was pretty confusing having an entity named "bin" and another named
"bins", not least because sometimes there was a need to talk about >1
of the "bins" objects, which couldn't be pluralized any further...

Scene is a term used in a bunch of places to talk about what a binner
operates on, so it's a decent choice here.
2009-12-13 18:17:25 +00:00
Keith Whitwell 39dd7108bf llvmpipe: rename queue size to count 2009-12-12 20:29:39 +00:00
Keith Whitwell 314d3cd751 llvmpipe: rename one of the two rasterize_bins functions 2009-12-12 20:19:46 +00:00
Brian Paul 6cbb1219a3 llvmpipe: checkpoint: plug in the new fencing code
This has only been very lightly tested.  More work to come.
2009-12-11 17:59:32 -07:00
Brian Paul 4b70af918d llvmpipe: added lp_rast_fence() bin function 2009-12-11 17:57:45 -07:00
Brian Paul 9323740738 llvmpipe: added lp_rast_get_num_threads() 2009-12-11 17:45:52 -07:00
Brian Paul 8736ee1e7d llvmpipe: added lp_bin_get_num_bins() 2009-12-11 17:33:30 -07:00
Brian Paul 2876b684de llvmpipe: remove old fence code, compile new lp_fence.c file 2009-12-11 17:32:45 -07:00
Brian Paul edbaca6fd1 llvmpipe: initial fence implementation 2009-12-11 17:32:08 -07:00
Brian Paul 92dc0f92b0 llvmpipe: implement lp_rast_load_color() 2009-12-11 15:00:28 -07:00
Brian Paul 2bce5c195f llvmpipe: checkpoint: more thread/queuing changes
Now mapping/unmapping the framebuffer is done by a rasteizer thread
rather than the main calling thread.
2009-12-11 14:52:46 -07:00
Brian Paul de31b0e60c llvmpipe: remove unused lp_rasterizer::fb field 2009-12-11 11:56:22 -07:00
Brian Paul 156eabbaf9 llvmpipe: improve framebuffer/surface code 2009-12-11 11:46:23 -07:00
Brian Paul 9d0faea58c llvmpipe: fix-up #includes 2009-12-11 11:42:18 -07:00
Brian Paul 544882eb58 llvmpipe: fix inverted util_framebuffer_state_equal() result 2009-12-11 11:41:11 -07:00
Brian Paul 205da96fc6 llvmpipe: remove unused fb parameter 2009-12-11 11:25:22 -07:00
Brian Paul 4e67f10331 llvmpipe: minor comment fix 2009-12-11 11:16:48 -07:00
Brian Paul 9509f73c21 llvmpipe: checkpoint: use empty/full bin queues 2009-12-10 14:56:30 -07:00
Brian Paul 9a6567f1ed llvmpipe: updated comment 2009-12-10 14:56:11 -07:00
Brian Paul 6d810e5a7b llvmpipe: simplify llvmpipe_set_framebuffer_state() 2009-12-10 14:55:28 -07:00
Brian Paul 721b5167dc llvmpipe: added some bin queue debug code 2009-12-10 14:54:32 -07:00
Brian Paul 21008441e4 llvmpipe: updated comments 2009-12-10 10:59:46 -07:00
michal 1fb440beb9 llvmpipe: Fix after sampler view changes. 2009-12-10 09:23:15 +01:00
Brian Paul 96689d451a llvmpipe: added some debug/info code 2009-12-09 16:32:32 -07:00
Brian Paul ad3c16c127 llvmpipe: simplify the tiles_x, tiles_y code a bit 2009-12-09 16:30:05 -07:00
Brian Paul 3bee8c2e7c llvmpipe: use the empty_bins queue now 2009-12-09 16:06:04 -07:00
Brian Paul d7dbc66636 llvmpipe: checkpoint: begin plugging in bin queue code 2009-12-09 14:53:33 -07:00
Brian Paul ea35993e74 llvmpipe: added new lp_bin_queue.[ch] files
The queues will be used for keeping track of full and empty bins so
we can overlap setup with the rasterization threads.
2009-12-09 14:36:54 -07:00
Brian Paul 22b07b8be4 llvmpipe: use new lp_setup_get_current_bins() function
This stub function will interface to the queue system...
2009-12-09 12:28:59 -07:00
Brian Paul 88e62b33dc llvmpipe: more bin functions for create/destroy/queries 2009-12-09 12:22:12 -07:00
Michal Krol dfdf83d714 Revert "Simplify the redundant meaning of format layout."
This reverts commit eb926ddf9e.
2009-12-09 14:22:30 +01:00
Michal Krol eb926ddf9e Simplify the redundant meaning of format layout.
We really just need to know whether the format is compressed or not.
For more detailed information format colorspace should suffice.
2009-12-08 20:48:47 +01:00
Roland Scheidegger 4ebc54795d Merge branch 'gallium-strict-aliasing' 2009-12-08 19:26:20 +01:00
Alan Hourihane 2aebc5e01f move assert to avoid crash in debug build. 2009-12-08 13:12:02 +00:00
Andre Maasikas b5e256c76d Merge branch 'mesa_7_7_branch'
Conflicts:
	src/mesa/drivers/dri/r600/r700_assembler.c
	src/mesa/main/version.h
2009-12-08 11:57:24 +02:00
Andre Maasikas 0d4a05445c Merge branch 'mesa_7_6_branch' into mesa_7_7_branch 2009-12-08 10:16:14 +02:00
José Fonseca 7f457acabc llvmpipe: Use number of CPUs as default number of threads.
Also bump MAX_THREADS to 8.
2009-12-08 08:02:49 +00:00
Vinson Lee add6dfbba6 llvmpipe: Initialize variables in emit_instruction. 2009-12-07 19:04:07 -08:00
Brian Paul 73e13c33fd llvmpipe: remove some left-over debug code 2009-12-07 18:18:37 -07:00
Brian Paul aab1ceceec llvmpipe: implement threaded rasterization
The LP_NUM_THREADS env var controls how many threads are created.
The default (and max) is 4, for now.
If LP_NUM_THREADS = 0, threading is not used.
2009-12-07 18:04:54 -07:00
Brian Paul 3a06c113c7 llvmpipe: repartition lp_rasterizer state for threading
Some of the state is per-thread.  Put that state in new lp_rasterizer_task
struct.
2009-12-07 18:04:54 -07:00
Brian Paul cdaea049c9 llvmpipe: use bin iteration functions when rasterizing bins 2009-12-07 18:04:54 -07:00
Brian Paul 270f154860 llvmpipe: introduce mutex and bin iteration functions 2009-12-07 18:04:31 -07:00
Roland Scheidegger 3456f9149b gallium/util: fix util_color_[un]pack[-ub] to be strict aliasing safe
use pointer to union instead of void pointer.
gcc complained a lot, depending what the pointer originally actually was.
Looks like it's in fact maybe legal to cast for instance uint pointers to
union pointers as long as union contains a uint type, hence use this with some
callers, other just use union util_color in the first place.
2009-12-07 20:35:42 +01:00
José Fonseca 501989bbcd llvmpipe: Tweak disassembly to match gdb.
Helps verifying udis86 output.
2009-12-05 05:43:53 +00:00
José Fonseca dd51b4f909 llvmpipe: Stop disassembling when an unsupported opcode is found.
Otherwise the terminal gets full of garbage.
2009-12-05 05:43:10 +00:00
Brian Paul 8a23105fa0 llvmpipe: still more bin code reorganization
Move tiles_x,y fields from setup state into bin state.
Move more bin-adding commands into lp_bin.[ch].
2009-12-04 15:59:25 -07:00
Brian Paul 2c8d5c66ce llvmpipe: remove dead code left over from a previous commit 2009-12-04 15:46:37 -07:00
Brian Paul 01b1900084 llvmpipe: reorganization of binning data structions and funtions
New lp_bins struct contains all bin information.
More move bin-related code into lp_bin.[ch]
Use new/updated bin-access functions to hide implementation details.
The result is more/cleaner separation between the setup and rast components.
This will make double-buffering of the bins easier, etc.
2009-12-04 15:31:09 -07:00