Commit graph

201327 commits

Author SHA1 Message Date
Eric Anholt
f5b3cd4620 [965] Use shared intel_regions.c.
This adds (so far) unused PBO functions, and holding the lock while writing
to regions (which may be shared static screen regions).
2007-12-15 12:45:52 -08:00
Brian
de1201a0ba don't allocate scratch tile in sp_tile_cache_flush_clear() to avoid stack overflow 2007-12-15 09:49:20 -07:00
Ben Skeggs
210bf673c2 nouveau: move extension stuff into nouveau_screen.c 2007-12-16 00:35:59 +11:00
Eric Anholt
5e3ef623ee [intel] Fix uninitialized data in screen-region buffer objects. 2007-12-14 14:56:01 -08:00
Eric Anholt
55539f6b2a [intel] Remove excessive validation debugging. 2007-12-14 14:52:15 -08:00
Eric Anholt
b8b49529b3 [intel] Initialize debug flag for dri_bufmgrs 2007-12-14 14:51:55 -08:00
Ben Skeggs
b5b9ac62e6 Merge branch 'upstream-gallium-0.1' into darktama-gallium-0.1 2007-12-15 09:48:11 +11:00
Eric Anholt
c5456a6b24 [intel] Remove useless intel_region_idle.
The idling it was trying to ensure was covered by the
intel_miptree_image_map()->intel_region_map() that immediately followed it.
2007-12-14 14:40:03 -08:00
Eric Anholt
84a076079d [intel] warnings cleanup 2007-12-14 14:40:03 -08:00
Brian
507d43f95b fix polygon cull regression 2007-12-14 14:35:18 -07:00
Brian
a5eb9e7b1b Build rain demo (Gonzo <andreas.wendleder@gmail.com>) 2007-12-14 14:35:18 -07:00
Brian
017f862de1 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.
2007-12-14 12:25:25 -07:00
Eric Anholt
6f7d35318d [intel] Remove the relocation buffer lists and just cache one per buffer.
Each buffer object now has a relocation buffer pointer, which contains the
relocations for the buffer if there are any.  At the point where we have to
create a new type of relocation entry, we can change the code over to allowing
multiple relocation lists, but trying to anticipate what that'll look like
now just increases complexity.

This is a 30% performance improvement on 965.
2007-12-14 11:23:43 -08:00
Eric Anholt
38bad7677e [965] Replace the state cache suballocator with direct dri_bufmgr use.
The user-space suballocator that was used avoided relocation computations by
using the general and surface state base registers and allocating those types
of buffers out of pools built on top of single buffer objects.  It also
avoided calls into the buffer manager for these small state allocations, since
only one buffer object was being used.

However, the buffer allocation cost appears to be low, and with relocation
caching, computing relocations for buffers is essentially free.  Additionally,
implementing the suballocator required a don't-fence-subdata flag to disable
waiting on buffer maps so that writing new data didn't block on rendering using
old data, and careful handling when mapping to update old data (which we need
to do for unavoidable relocations with FBOs).  More importantly, when the
suballocator filled, it had no replacement algorithm and just threw out all
of the contents and forced them to be recomputed, which is a significant cost.

This is the first step, which just changes the buffer type, but doesn't yet
improve the hash table to not result in full recompute on overflow.  Because
the buffers are all allocated out of the general buffer allocator, we can
no longer use the general/surface state bases to avoid relocations, and they
are set to 0 instead.
2007-12-14 11:04:26 -08:00
Brian
f3b3ea9742 update_samplers() didn't respect the sampler->texunit mapping.
This fixes the glsl/texdemo1.c program.
2007-12-14 11:43:15 -07:00
Brian
fce4612f8a set SamplerUnit[] entry in load_texture() just to be safe 2007-12-14 11:42:28 -07:00
Brian
814d4ff83a emit tgsi declarations for texture samplers 2007-12-14 11:17:48 -07:00
Brian
1e3b07f363 set program->SamplersUsed bit when using a texture instruction 2007-12-14 11:16:49 -07:00
Brian
e785f190f0 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.
2007-12-14 11:00:46 -07:00
Brian
23e36c2dfb update comment for TGSI_TOKEN_TYPE_IMMEDIATE case 2007-12-14 10:46:29 -07:00
Ben Skeggs
7f89c776e1 nv40: less dodgy vp const/insn handling 2007-12-15 03:49:35 +11:00
Eric Anholt
0037ad4186 [intel] Remove broken mutex protection from dri_bufmgrs.
Now that the dri_bufmgr is stored in the context rather than the screen, all
access to one is single-threaded anyway.
2007-12-13 23:44:56 -08:00
Eric Anholt
dbfe05ca24 [intel] Enable INTEL_DEBUG=bufmgr output in TTM mode as well as classic. 2007-12-13 23:26:43 -08:00
Eric Anholt
9f7d6b7210 [intel] assert that buffers are not mapped at last unreference.
bufmgr_fake doesn't care about it, but with ttm we would end up with the
buffer remaining referenced until application exit.
2007-12-13 23:24:53 -08:00
Brian
a2b4d4a8db add missing code for PIPE_FORMAT_S8_UNORM renderbuffer 2007-12-13 18:26:48 -07:00
Brian
e2d7107cc2 remove unused var 2007-12-13 18:26:10 -07:00
Keith Whitwell
7a2d3ac5bc 965: get brw_wm_surface_state compiling again 2007-12-13 21:00:10 +00:00
Keith Whitwell
568fcf64c7 965: get fragment shader compiler compiling
Don't think that it will run though.
2007-12-13 20:39:31 +00:00
Zack Rusin
c605a55e9f i965: make the wm_surface compile 2007-12-13 11:43:55 -05:00
Keith Whitwell
c4d71c719c 965: implement magic buffer offset callback 2007-12-13 16:39:49 +00:00
Keith Whitwell
a6ae4ea854 965: magic callback to get buffer offset 2007-12-13 16:36:07 +00:00
Brian
81c9058ea9 Add QuadX,Y fields to tgsi_exec_machine to pass quad's position to tgsi interpreter.
The tgsi linear/perspective attribute code now uses these values rather than
input[0].  Need to update SSE path to take quad x,y as function params.
Then, we can remove additional code.
2007-12-13 09:05:15 -07:00
Keith Whitwell
8cd608d5ba 965: missing code from last commit 2007-12-13 15:39:34 +00:00
Keith Whitwell
559750298a 965: remove dead code 2007-12-13 15:37:19 +00:00
Keith Whitwell
0c2e87d565 965: remove dead code 2007-12-13 15:37:19 +00:00
Keith Whitwell
19025605e9 965: remove dead code 2007-12-13 15:37:19 +00:00
Keith Whitwell
7abe2bfefa 965: remove dead code 2007-12-13 15:37:19 +00:00
Keith Whitwell
54f1ce3b27 965: remove reference to metaops 2007-12-13 15:37:19 +00:00
Keith Whitwell
1f1506ec94 965: use state atom array directly 2007-12-13 15:37:19 +00:00
Keith Whitwell
4844b9fb9d 965: calculate nr enabled vbos on the fly 2007-12-13 15:37:18 +00:00
Zack Rusin
da89104c57 Actually allocate the output registers.
In tgsi the output's will (hopefully) consecutive so this
check (besides not being currently implemented) is not
necessary.
2007-12-13 10:33:12 -05:00
Zack Rusin
6f111e9c81 Don't generate spurious vs, move the enable a bit to do that. 2007-12-13 10:31:39 -05:00
Ben Skeggs
868048fcc7 nv40: Do all fp setup in nv40_fragprog.c 2007-12-14 01:51:43 +11:00
Ben Skeggs
00f0f0d0a4 nouveau: mass renaming for consistency, no functional changes 2007-12-14 01:14:23 +11:00
Dan Nicholson
f116634933 Merge branch 'master' into autoconf2 2007-12-12 21:24:06 -08:00
Dan Nicholson
c79c93c0ac autoconf: Improve help text for demos and DRI drivers
Changed the text for the default demos to be "auto" instead of "yes"
since that didn't make much sense in this context. Added an example
value for the --with-dri-drivers option as suggested by Brian.
2007-12-12 18:13:04 -08:00
Dan Nicholson
f64d6fe0d3 autoconf: Update bug address and fix some autoconf warnings
Point bug reports to Bugzilla like bugs.html. Also, a warning from
autoconf w.r.t. AC_OUTPUT was cleaned up.
2007-12-12 17:57:45 -08:00
Dan Nicholson
a130718f44 autoconf: Consistently use xlib for the driver name
Brian suggested that there should be more consistency using xlib vs. x11
in the configure script. Changed the options and variables to suit.
2007-12-12 17:49:49 -08:00
Dan Nicholson
3e288627cb autoconf: Optional assembly usage with --disable-asm
Allow the user to disable use of assembly code through the --disable-asm
option. This is only relevant on the platforms where assembly is
normally enabled such as Linux and FreeBSD.
2007-12-12 17:39:21 -08:00
Ben Skeggs
72d47f1949 nouveau: more adaption.. 2007-12-13 11:55:35 +11:00