mesa.git
16 years agonouveau: speed up user buffers.
Ben Skeggs [Sun, 23 Dec 2007 06:00:08 +0000 (17:00 +1100)]
nouveau: speed up user buffers.

Try and fit user buffers into a small GART scratch area at validate time,
instead of going to a lot of effort to fit these (mostly) use-once-and-discard
objects into VRAM.

16 years agonv40: seems we have stencil faces around the wrong way.
Ben Skeggs [Sun, 23 Dec 2007 05:19:25 +0000 (16:19 +1100)]
nv40: seems we have stencil faces around the wrong way.

16 years agonouveau: don't wait when deleting fences unless needed
Ben Skeggs [Sun, 23 Dec 2007 05:18:00 +0000 (16:18 +1100)]
nouveau: don't wait when deleting fences unless needed

16 years agonouveau: some cleanups
Ben Skeggs [Sun, 23 Dec 2007 05:06:24 +0000 (16:06 +1100)]
nouveau: some cleanups

16 years agonouveau: match gallium changes
Ben Skeggs [Sun, 23 Dec 2007 05:05:02 +0000 (16:05 +1100)]
nouveau: match gallium changes

16 years agoMerge branch 'upstream-gallium-0.1' into darktama-gallium-0.1
Ben Skeggs [Sun, 23 Dec 2007 05:01:59 +0000 (16:01 +1100)]
Merge branch 'upstream-gallium-0.1' into darktama-gallium-0.1

16 years agoi965: very crude and hacky way of handling immediates
Zack Rusin [Thu, 20 Dec 2007 17:54:23 +0000 (12:54 -0500)]
i965: very crude and hacky way of handling immediates

16 years agogallium: make state tracker explictly ask for rendercache flushes
Keith Whitwell [Thu, 20 Dec 2007 13:47:46 +0000 (13:47 +0000)]
gallium: make state tracker explictly ask for rendercache flushes

16 years ago965: respect pipe flush flags
Keith Whitwell [Thu, 20 Dec 2007 13:47:11 +0000 (13:47 +0000)]
965: respect pipe flush flags

Now we emit way too many flushes instead of none at all.

16 years agogallium: translate ARB fp/vp immediates consistently to tgsi immediates
Keith Whitwell [Thu, 20 Dec 2007 13:19:56 +0000 (13:19 +0000)]
gallium: translate ARB fp/vp immediates consistently to tgsi immediates

16 years ago965: fix the constant buffers
Zack Rusin [Thu, 20 Dec 2007 12:05:52 +0000 (07:05 -0500)]
965: fix the constant buffers

16 years agoAdd some prototype code for converting RET to END for main(). Disabled for now.
Brian [Wed, 19 Dec 2007 21:06:22 +0000 (14:06 -0700)]
Add some prototype code for converting RET to END for main().  Disabled for now.

16 years agotemporarily defeat an assertion
Brian [Wed, 19 Dec 2007 20:53:28 +0000 (13:53 -0700)]
temporarily defeat an assertion

16 years agoFix problem with initial viewport/scissor size.
Brian [Wed, 19 Dec 2007 20:45:00 +0000 (13:45 -0700)]
Fix problem with initial viewport/scissor size.

If an app never called glViewport, the viewport size was always 0 by 0 pixels.
Now pass initial size to st_create_framebuffer() and initialize the viewport
and scissor bounds in st_make_current().
This could also be fixed by ensuring the gl_framebuffers passed to
_mesa_make_current() were initialized to the right size.  But that involves
allocating the renderbuffers/pipe_surfaces earlier and that runs into some
other issues ATM.
Also remove obsolete createRenderbuffers param to st_create_framebuffer().

16 years agoconvert Mesa OPCODE_END to TGSI_OPCODE_END, not TGSI_OPCOD_RET
Brian [Wed, 19 Dec 2007 18:50:50 +0000 (11:50 -0700)]
convert Mesa OPCODE_END to TGSI_OPCODE_END, not TGSI_OPCOD_RET

16 years agoremove obsolete TXP, add some sanity checks
Brian [Wed, 19 Dec 2007 15:51:17 +0000 (08:51 -0700)]
remove obsolete TXP, add some sanity checks

16 years agospecial-case PSIZE too
Brian [Wed, 19 Dec 2007 15:50:52 +0000 (08:50 -0700)]
special-case PSIZE too

16 years agomove st_make_current() before buffer size check so renderbuffer alloc storage works
Brian [Wed, 19 Dec 2007 15:50:35 +0000 (08:50 -0700)]
move st_make_current() before buffer size check so renderbuffer alloc storage works

16 years agonew assertions
Brian [Wed, 19 Dec 2007 15:49:59 +0000 (08:49 -0700)]
new assertions

16 years ago965: dump curbe contents to stderr
Keith Whitwell [Wed, 19 Dec 2007 19:05:19 +0000 (19:05 +0000)]
965: dump curbe contents to stderr

16 years ago965: handle BRW_CONSTANT_BUFFER data type
Keith Whitwell [Wed, 19 Dec 2007 19:04:35 +0000 (19:04 +0000)]
965: handle BRW_CONSTANT_BUFFER data type

16 years agoconsts
Zack Rusin [Wed, 19 Dec 2007 18:22:27 +0000 (13:22 -0500)]
consts

16 years ago965: count grf allocation correctly for wm prog, first aub triangle
Keith Whitwell [Wed, 19 Dec 2007 15:48:53 +0000 (15:48 +0000)]
965: count grf allocation correctly for wm prog, first aub triangle

16 years ago965: hardwire correct behaviour for vp-tri setup (for now...)
Keith Whitwell [Wed, 19 Dec 2007 15:16:25 +0000 (15:16 +0000)]
965: hardwire correct behaviour for vp-tri setup (for now...)

16 years agovp-tri: match vertex/color data of other tests
Keith Whitwell [Wed, 19 Dec 2007 15:13:20 +0000 (15:13 +0000)]
vp-tri: match vertex/color data of other tests

16 years ago965: align buffer allocations to 4k
Keith Whitwell [Wed, 19 Dec 2007 14:20:23 +0000 (14:20 +0000)]
965: align buffer allocations to 4k

16 years agouse a depth buffer temporarily
Keith Whitwell [Wed, 19 Dec 2007 13:13:42 +0000 (13:13 +0000)]
use a depth buffer temporarily

16 years ago965: make sure stipple state gets uploaded
Keith Whitwell [Wed, 19 Dec 2007 13:12:34 +0000 (13:12 +0000)]
965: make sure stipple state gets uploaded

16 years ago965: allocate buffer space to hold batch commands
Keith Whitwell [Wed, 19 Dec 2007 13:11:56 +0000 (13:11 +0000)]
965: allocate buffer space to hold batch commands

16 years agoactually set the max_index. useful in the driver
Zack Rusin [Wed, 19 Dec 2007 12:49:42 +0000 (07:49 -0500)]
actually set the max_index. useful in the driver

16 years ago965: fill unused surface pointers with zero
Keith Whitwell [Wed, 19 Dec 2007 12:23:27 +0000 (12:23 +0000)]
965: fill unused surface pointers with zero

16 years agoi965: emit fb write on RET for now (until we get END back)
Zack Rusin [Wed, 19 Dec 2007 12:08:13 +0000 (07:08 -0500)]
i965: emit fb write on RET for now (until we get END back)

16 years ago965: pitch is in bytes not pixels
Keith Whitwell [Wed, 19 Dec 2007 11:49:56 +0000 (11:49 +0000)]
965: pitch is in bytes not pixels

16 years ago965: fix off-by-one in scissor rect
Keith Whitwell [Wed, 19 Dec 2007 11:36:03 +0000 (11:36 +0000)]
965: fix off-by-one in scissor rect

16 years ago965: fix off-by-one in surface dimensions
Keith Whitwell [Wed, 19 Dec 2007 11:35:21 +0000 (11:35 +0000)]
965: fix off-by-one in surface dimensions

16 years ago965: respect surface width when dumping bitmap
Keith Whitwell [Wed, 19 Dec 2007 11:32:56 +0000 (11:32 +0000)]
965: respect surface width when dumping bitmap

16 years agoi965: actually detect whether a sampler is enabled/disabled
Zack Rusin [Wed, 19 Dec 2007 11:00:30 +0000 (06:00 -0500)]
i965: actually detect whether a sampler is enabled/disabled

16 years ago965: disable clipping more, and restore drawing rect packet
Keith Whitwell [Wed, 19 Dec 2007 11:10:30 +0000 (11:10 +0000)]
965: disable clipping more, and restore drawing rect packet

16 years ago965: disable clipping for now
Keith Whitwell [Wed, 19 Dec 2007 11:10:06 +0000 (11:10 +0000)]
965: disable clipping for now

16 years ago965: fix vertex pointsize state, match default cull mode
Keith Whitwell [Wed, 19 Dec 2007 10:55:49 +0000 (10:55 +0000)]
965: fix vertex pointsize state, match default cull mode

16 years ago965: fix colormask state
Keith Whitwell [Wed, 19 Dec 2007 10:49:16 +0000 (10:49 +0000)]
965: fix colormask state

16 years ago965: populate fp_input_count in setup key
Keith Whitwell [Wed, 19 Dec 2007 10:20:14 +0000 (10:20 +0000)]
965: populate fp_input_count in setup key

16 years agoi965: stuff the outputs into mrf registers when possible
Zack Rusin [Wed, 19 Dec 2007 10:28:28 +0000 (05:28 -0500)]
i965: stuff the outputs into mrf registers when possible

16 years agoi965: be smarter about register allocation
Zack Rusin [Wed, 19 Dec 2007 09:58:29 +0000 (04:58 -0500)]
i965: be smarter about register allocation

16 years agonouveau: nuke subchan auto-assign.
Ben Skeggs [Wed, 19 Dec 2007 08:40:38 +0000 (19:40 +1100)]
nouveau: nuke subchan auto-assign.

It's annoying for several reasons, especially in its current form.  May
possibly be reincarnated later (DDX depends on it these days), but in
not quite the same way.

16 years agonouveau: remove sync hack, gallium got sort-of fixed.
Ben Skeggs [Wed, 19 Dec 2007 02:28:22 +0000 (13:28 +1100)]
nouveau: remove sync hack, gallium got sort-of fixed.

16 years agoMerge branch 'upstream-gallium-0.1' into darktama-gallium-0.1
Ben Skeggs [Wed, 19 Dec 2007 02:21:41 +0000 (13:21 +1100)]
Merge branch 'upstream-gallium-0.1' into darktama-gallium-0.1

16 years agoturn off TGSI_DEBUG
Brian [Tue, 18 Dec 2007 23:01:25 +0000 (16:01 -0700)]
turn off TGSI_DEBUG

16 years agofix bug on GL_VERTEX_PROGRAM_TWO_SIDE path
Brian [Tue, 18 Dec 2007 23:00:58 +0000 (16:00 -0700)]
fix bug on GL_VERTEX_PROGRAM_TWO_SIDE path

16 years agosetup the frontface register (fog.y, ATM)
Brian [Tue, 18 Dec 2007 23:00:31 +0000 (16:00 -0700)]
setup the frontface register (fog.y, ATM)

16 years agofix some semantic info mix-ups in calculate_vertex_layout()
Brian [Tue, 18 Dec 2007 22:59:54 +0000 (15:59 -0700)]
fix some semantic info mix-ups in calculate_vertex_layout()

16 years agogallium: rationalize vertex_element state packet
Keith Whitwell [Tue, 18 Dec 2007 17:25:33 +0000 (17:25 +0000)]
gallium:  rationalize vertex_element state packet

Remove dst_offset (not used)
Add nr_components, which could be calculated from format, but would be
too much effort.

Update i965 driver to cope.

16 years agogallium: give userbuffers some storage in the aub buffer pool
Keith Whitwell [Tue, 18 Dec 2007 16:57:17 +0000 (16:57 +0000)]
gallium: give userbuffers some storage in the aub buffer pool

16 years agovbo: unmap and remap immediate vbo before/after each draw.
Keith Whitwell [Tue, 18 Dec 2007 16:56:22 +0000 (16:56 +0000)]
vbo: unmap and remap immediate vbo before/after each draw.

Also use BufferData(NULL) to get fresh storage and avoid synchronous
operation where we would have to flush and wait for the fence after each
draw because of the map.

This will chew through a whole load of buffer space on small draws, so
it isn't a proper solution.  Need to support a no-fence or append mapping
mode to do this right, or use user buffers.

16 years agoi965: don't treat swz differently and upload vertex buffers
Zack Rusin [Tue, 18 Dec 2007 14:59:54 +0000 (09:59 -0500)]
i965: don't treat swz differently and upload vertex buffers

16 years agoobsolete
Brian [Tue, 18 Dec 2007 03:41:20 +0000 (20:41 -0700)]
obsolete

16 years agonouveau: match latest gallium changes
Ben Skeggs [Tue, 18 Dec 2007 00:27:44 +0000 (11:27 +1100)]
nouveau: match latest gallium changes

16 years agoMerge branch 'upstream-gallium-0.1' into darktama-gallium-0.1
Ben Skeggs [Tue, 18 Dec 2007 00:02:46 +0000 (11:02 +1100)]
Merge branch 'upstream-gallium-0.1' into darktama-gallium-0.1

16 years agoupdates for depth/stencil/alpha state
Brian [Mon, 17 Dec 2007 21:05:53 +0000 (14:05 -0700)]
updates for depth/stencil/alpha state

16 years agoEmit declarations for constants (references to the const buffer)
Brian [Mon, 17 Dec 2007 20:59:55 +0000 (13:59 -0700)]
Emit declarations for constants (references to the const buffer)

16 years agoi965: index the destination offset with regards to the current index
Zack Rusin [Mon, 17 Dec 2007 19:36:31 +0000 (14:36 -0500)]
i965: index the destination offset with regards to the current index

16 years agoi965: return false when the function fails, not succeeds
Zack Rusin [Mon, 17 Dec 2007 19:05:46 +0000 (14:05 -0500)]
i965: return false when the function fails, not succeeds

16 years agoAdd the new test program for fp's.
Zack Rusin [Mon, 17 Dec 2007 18:21:45 +0000 (13:21 -0500)]
Add the new test program for fp's.

16 years agogallium: incorporate alpha state into depth_stencil state object.
Keith Whitwell [Mon, 17 Dec 2007 16:14:29 +0000 (16:14 +0000)]
gallium:  incorporate alpha state into depth_stencil state object.

16 years agonv40: fix valgrind complaints
Ben Skeggs [Mon, 17 Dec 2007 10:49:16 +0000 (21:49 +1100)]
nv40: fix valgrind complaints

16 years agonv40: clean state a bit
Ben Skeggs [Mon, 17 Dec 2007 10:45:13 +0000 (21:45 +1100)]
nv40: clean state a bit

16 years ago965: remove dead state atom decls
Keith Whitwell [Fri, 14 Dec 2007 20:15:22 +0000 (20:15 +0000)]
965: remove dead state atom decls

16 years ago965: fix for non-indexed draw path
Keith Whitwell [Fri, 14 Dec 2007 20:14:58 +0000 (20:14 +0000)]
965: fix for non-indexed draw path

16 years ago965: fix/hack check for NULL texunit in state upload
Keith Whitwell [Fri, 14 Dec 2007 20:14:30 +0000 (20:14 +0000)]
965: fix/hack check for NULL texunit in state upload

16 years ago965: fix ExtDivide check
Keith Whitwell [Fri, 14 Dec 2007 20:14:05 +0000 (20:14 +0000)]
965: fix ExtDivide check

16 years ago965: put brw_constant_buffer atom directly in update list
Keith Whitwell [Fri, 14 Dec 2007 20:13:44 +0000 (20:13 +0000)]
965: put brw_constant_buffer atom directly in update list

16 years agoswitch on cpp instead of format
Brian [Sun, 16 Dec 2007 17:00:51 +0000 (10:00 -0700)]
switch on cpp instead of format

16 years agonouveau: bump pushbuf size a little, so a "full" packet can fit
Ben Skeggs [Sun, 16 Dec 2007 13:46:30 +0000 (00:46 +1100)]
nouveau: bump pushbuf size a little, so a "full" packet can fit

16 years agonv40: colormask thinko
Ben Skeggs [Sun, 16 Dec 2007 13:11:41 +0000 (00:11 +1100)]
nv40: colormask thinko

16 years agonv40: don't use vertex buffers for static vertices.
Ben Skeggs [Sun, 16 Dec 2007 12:45:30 +0000 (23:45 +1100)]
nv40: don't use vertex buffers for static vertices.

16 years agonouveau: some cleanups
Ben Skeggs [Sun, 16 Dec 2007 10:26:09 +0000 (21:26 +1100)]
nouveau: some cleanups

16 years agonv40: fix culling
Ben Skeggs [Sun, 16 Dec 2007 09:44:44 +0000 (20:44 +1100)]
nv40: fix culling

16 years agonv40: typo
Ben Skeggs [Sun, 16 Dec 2007 09:21:37 +0000 (20:21 +1100)]
nv40: typo

16 years agonv40: fp support for TGSI_FILE_IMMEDIATE.
Ben Skeggs [Sun, 16 Dec 2007 08:28:05 +0000 (19:28 +1100)]
nv40: fp support for TGSI_FILE_IMMEDIATE.

arbfslight works, nouveau's first GLSL prog :)

16 years agonv40: grow fragprog as needed
Ben Skeggs [Sun, 16 Dec 2007 07:36:18 +0000 (18:36 +1100)]
nv40: grow fragprog as needed

16 years agonv40: destroy programs
Ben Skeggs [Sun, 16 Dec 2007 05:01:25 +0000 (16:01 +1100)]
nv40: destroy programs

16 years agonv40: make vbo state update static
Ben Skeggs [Sun, 16 Dec 2007 04:49:49 +0000 (15:49 +1100)]
nv40: make vbo state update static

16 years agorename some 'mesa' functions
Brian [Sat, 15 Dec 2007 23:51:57 +0000 (16:51 -0700)]
rename some 'mesa' functions

16 years agoUse tile functions in new p_tile.[ch]
Brian [Sat, 15 Dec 2007 23:44:29 +0000 (16:44 -0700)]
Use tile functions in new p_tile.[ch]

This removes quite a bit of code duplicated in the drivers.

16 years agoRe-usable tile get/put functions
Brian [Sat, 15 Dec 2007 23:42:22 +0000 (16:42 -0700)]
Re-usable tile get/put functions

16 years agodon't allocate scratch tile in sp_tile_cache_flush_clear() to avoid stack overflow
Brian [Sat, 15 Dec 2007 16:49:20 +0000 (09:49 -0700)]
don't allocate scratch tile in sp_tile_cache_flush_clear() to avoid stack overflow

16 years agonouveau: move extension stuff into nouveau_screen.c
Ben Skeggs [Sat, 15 Dec 2007 13:31:26 +0000 (00:31 +1100)]
nouveau: move extension stuff into nouveau_screen.c

16 years agoMerge branch 'upstream-gallium-0.1' into darktama-gallium-0.1
Ben Skeggs [Fri, 14 Dec 2007 22:48:11 +0000 (09:48 +1100)]
Merge branch 'upstream-gallium-0.1' into darktama-gallium-0.1

16 years agoAdded origin_lower_left field to pipe_rasterizer_state
Brian [Fri, 14 Dec 2007 19:25:25 +0000 (12:25 -0700)]
Added origin_lower_left field to pipe_rasterizer_state

This controls whether the window origin is considered to be the lower-left
or upper-left corner.
This effects computation of gl_FragCoord and the application of polygon stipple.

16 years agoupdate_samplers() didn't respect the sampler->texunit mapping.
Brian [Fri, 14 Dec 2007 18:43:15 +0000 (11:43 -0700)]
update_samplers() didn't respect the sampler->texunit mapping.

This fixes the glsl/texdemo1.c program.

16 years agoset SamplerUnit[] entry in load_texture() just to be safe
Brian [Fri, 14 Dec 2007 18:42:28 +0000 (11:42 -0700)]
set SamplerUnit[] entry in load_texture() just to be safe

16 years agoemit tgsi declarations for texture samplers
Brian [Fri, 14 Dec 2007 18:17:48 +0000 (11:17 -0700)]
emit tgsi declarations for texture samplers

16 years agoset program->SamplersUsed bit when using a texture instruction
Brian [Fri, 14 Dec 2007 18:16:49 +0000 (11:16 -0700)]
set program->SamplersUsed bit when using a texture instruction

16 years agoDon't always declare frag shader INPUT[0] as fragment position.
Brian [Fri, 14 Dec 2007 18:00:46 +0000 (11:00 -0700)]
Don't always declare frag shader INPUT[0] as fragment position.

We were doing this for the sake of softpipe and the tgsi intergrepter since
we always need the fragment position and W-coordinate information in order
to compute fragment interpolants.
But that's not appropriate for hardware drivers.
The tgsi interpreter now get x,y,w information from a separate tgsi_exec_vector
variable setup by softpipe.
The new pipe_shader_state->input_map[] defines how vert shader outputs map
to frag shader inputs.  It may go away though, since one can also examine
the semantic label on frag shader input[0] to figure things out.

16 years agoupdate comment for TGSI_TOKEN_TYPE_IMMEDIATE case
Brian [Fri, 14 Dec 2007 17:46:29 +0000 (10:46 -0700)]
update comment for TGSI_TOKEN_TYPE_IMMEDIATE case

16 years agonv40: less dodgy vp const/insn handling
Ben Skeggs [Fri, 14 Dec 2007 14:50:15 +0000 (01:50 +1100)]
nv40: less dodgy vp const/insn handling

16 years agoadd missing code for PIPE_FORMAT_S8_UNORM renderbuffer
Brian [Fri, 14 Dec 2007 01:26:48 +0000 (18:26 -0700)]
add missing code for PIPE_FORMAT_S8_UNORM renderbuffer

16 years agoremove unused var
Brian [Fri, 14 Dec 2007 01:26:10 +0000 (18:26 -0700)]
remove unused var

16 years ago965: get brw_wm_surface_state compiling again
Keith Whitwell [Thu, 13 Dec 2007 21:00:10 +0000 (21:00 +0000)]
965: get brw_wm_surface_state compiling again

16 years ago965: get fragment shader compiler compiling
Keith Whitwell [Thu, 13 Dec 2007 20:38:56 +0000 (20:38 +0000)]
965: get fragment shader compiler compiling

Don't think that it will run though.