Commit Graph

141 Commits

Author SHA1 Message Date
Marek Olšák 09653d65e9 r300g: minor cleanups after the no-rhw merge 2010-03-06 23:29:17 +01:00
Michal Krol 4ca70c489b Merge branch 'gallium-no-rhw-position'
Conflicts:
	src/gallium/drivers/r300/r300_blit.c
	src/gallium/drivers/r300/r300_emit.c
	src/gallium/drivers/r300/r300_state_derived.c
2010-03-02 13:35:30 +01:00
Roland Scheidegger e9441e1f88 r300g: adapt to new vertex element cso 2010-03-01 18:46:49 +01:00
Marek Olšák d2ac3d5e79 r300g: atomize texture and sampler states 2010-02-28 19:30:39 +01:00
Marek Olšák 942762cd97 r300g: decouple vertex stream setup (PSC) and VS output mapping (VAP_OUT)
Formerly known as vertex_format_state. These two are completely
unrelated when using HWTCL and decoupling them makes the design
less SWTCL-centric.

When bypass_vs_clip_and_viewport gets removed, the PSC setup will
no longer be a derived state.

This change shouldn't make unbreaking SWTCL harder.
2010-02-28 19:30:39 +01:00
Marek Olšák 4ed97f0a73 r300g: use the atom size directly during emission 2010-02-28 00:46:35 +01:00
Corbin Simpson 686f69bd13 r300g: Atomize vertex shader. 2010-02-24 20:02:59 -08:00
Michal Krol 63cb6f59ea gallium: Remove bypass_vs_clip_and_viewport from rasteriser state.
Needs testing.
2010-02-22 21:36:22 +01:00
Marek Olšák 8eb4cd5b82 r300g: cleanup the emission of RS block state
Emit as few regs as possible.
2010-02-13 15:44:43 +01:00
Vinson Lee 01ed5c6ef5 r300g: Silence GCC "missing braces around initializer" warning. 2010-01-27 14:04:53 -08:00
Corbin Simpson fc20efe8e5 r300g: Turn the RS block into an atom.
At least one extraneous dirty was eliminated, as well as the chance for
avoiding dirty on shader change.
2010-01-26 22:08:11 -08:00
Corbin Simpson 60aa7f1f80 r300g: Make vertex_format into an atom.
Some delicious hax here.
2010-01-26 21:49:02 -08:00
Corbin Simpson e62520de70 r300g: Kill dead code for hashing custom state.
It just wasn't meant to be.
2010-01-26 21:41:44 -08:00
Marek Olšák b62d339301 r300g: fix the rasterization of secondary color
When the secondary color is used, the primary color must always be rasterized
regardless of whether it is used or not.
2010-01-17 01:10:58 -08:00
Corbin Simpson 8ca491386d r300g: Move TCL bypass switch to main context. 2010-01-10 23:15:05 -08:00
Corbin Simpson 7b569bef15 r300g: Don't avoid rewriting ZTOP.
Simplify the code. Added a comment to keep me from doing it again.
2010-01-10 23:15:05 -08:00
Corbin Simpson 46fafdd455 r300g: Atomize rasterizer.
I want to stab things now.
2010-01-10 23:15:04 -08:00
Corbin Simpson 8a2c961798 r300g: Atomize ZTOP.
Also do state-change checks. ZTOP's too important to not check.
2010-01-10 11:49:25 -08:00
Corbin Simpson 07ea7e6c80 r300g: Atomize DSA.
Also a bit of ztop.
2010-01-10 11:17:34 -08:00
Marek Olšák 6f498a7eff r300g: add back-face color VS outputs
Required for two-sided lighting. BTW we are approaching softpipe-level
quality. ;)
2010-01-06 12:49:16 -08:00
Marek Olšák 26f67a272b r300g: disable the rasterization of WPOS if it's unused by the FS 2010-01-06 12:49:15 -08:00
Marek Olšák bf60eb3fec r300g: add WPOS 2010-01-06 12:49:15 -08:00
Zack Rusin b0575151b6 gs: fix drivers so they work with geometry shaders 2009-12-25 05:52:17 -05:00
Marek Olšák c6b450033d r300g: fix routing of vertex streams if TCL is bypassed
Generating mipmaps finally works, among other things. Yay!
2009-12-09 13:38:11 -08:00
Corbin Simpson c99fb991a3 r300g: Clean up previous commit.
If *I* can't read it, there's a strong possibility others can't,
either.
2009-12-06 23:34:53 -08:00
Marek Olšák 7091afed78 r300g: enhance ZTOP conditions 2009-12-06 23:34:53 -08:00
Marek Olšák cb90235135 r300g: clean up derived states
The state setups which aren't derived anymore have been moved to the VS
and FS objects.
2009-12-01 01:20:26 -08:00
Marek Olšák 6f05eba020 r300g: VS->FS attribute routing rework
Now it always correctly pairs up VS and FS even if the semantics and indices
of VS outputs and FS inputs don't match.
2009-12-01 01:20:26 -08:00
Marek Olšák 44c0aaf990 r300g: do not reallocate r300_vertex_info and r300_rs_block all the time 2009-11-21 14:52:26 -08:00
Marek Olšák 3a2cd66af8 r300g: clean up vs/fs tabs
Instead of vs_tab, we use vs_output_tab and it's local now. fs_tab hasn't
been used anywhere, so I removed it and r300_update_fs_tab too.
2009-11-21 14:52:26 -08:00
Marek Olšák 435c495549 r300g: silence warnings 2009-11-20 18:06:21 -08:00
Marek Olšák 624a0cd9c1 r300g: fix typo in r300_reg.h to prevent the RS unit from doing random things
And reorder fragment shader inputs so that the colors are before texcoords,
as is allocated by the shader compiler. This commit makes VS->FS attribute
routing work on R500.
2009-11-20 18:05:21 -08:00
Marek Olšák 4e1236e602 r300g: fix updating a vertex format
We must update PSC when we change the vertex format, e.g. vertex colors
from RGBA to BGRA.
2009-11-20 18:04:06 -08:00
Corbin Simpson 1c181a7eff r300g: Begin separating HW TCL and SW TCL state and setup.
This patch removes draw_context entirely from the HW TCL path and cleans up
a few other things along the way. Hopefully, nothing got broken.

Thanks to Marek Olšák for testing, review, and pointing out my bugs. :3
2009-11-20 17:48:10 -08:00
Corbin Simpson 6a3eb1f91b r300g: Use MAX3 and MIN3. 2009-11-20 14:10:45 -08:00
Corbin Simpson fe89863808 r300g: Protect against possibly missing Draw pointer.
Part of the SW TCL revival.
2009-11-08 14:53:29 -08:00
Maciej Cencora 3445f47697 r300g: VBOs WIP 2009-11-07 11:53:13 -08:00
Corbin Simpson ff9e1c0198 r300g: Cleanup PSC setup math a bit and stop using Draw formats. 2009-10-22 14:29:48 -07:00
Corbin Simpson 0a8cd4862c r300g: Update comments, function names in r300_state_inlines. 2009-10-21 23:26:02 -07:00
Corbin Simpson 6a448a525b r300g: Cleanup header includes. 2009-10-21 06:52:25 -07:00
Corbin Simpson 5a0598f235 r300g: Don't use the hashtable internally.
As osiris pointed out, glxgears slowly gets slower for some reason
when it's enabled, and it's not helping at the moment, so just turn
it off.
2009-10-21 06:52:24 -07:00
Corbin Simpson b589e39809 r300g: Examine vertex attribute type on HW TCL too. 2009-10-21 06:52:23 -07:00
Corbin Simpson e5f1f6a0be r300g: Demonstratory kludge to unbreak glxgears.
We *must* recalculate something in vformat every rebind; let's see
if we can't narrow it down a bit.
2009-10-19 14:43:33 -07:00
Corbin Simpson 16a06fea73 r300g: Fix up a bunch of warnings. 2009-10-18 16:09:01 -07:00
Corbin Simpson d2e29b502e r300g: Add another ZTOP condition.
I don't even know if texkill works right now.
2009-10-18 10:30:18 -07:00
Corbin Simpson 11056ca86f r300g: Use a dirty test to bring framerate back up.
This is just split out from the next commit, that's all.
2009-10-17 20:47:45 -07:00
Corbin Simpson 51173e4e53 r300g: Also have rs_block keyed to the current shader combo.
Eliminates part of the glxgears corruption here. Need to clean up PSC more,
to get rid of the rest of it.
2009-10-17 20:29:27 -07:00
Corbin Simpson ce9ae4a483 r300g: Fix u_hash_table rename. 2009-10-17 20:05:23 -07:00
Corbin Simpson fc8a156cfc r300g: Use a hash table to look up vertex info.
Need to move rs_block to this, too.

Also, I'm getting massive amounts of flicker for some reason; I bet we've gotta
re-re-examine PSC and friends. :C
2009-10-16 08:43:02 -07:00
Corbin Simpson a82fc97c64 r300g: Move ZTOP to its own state atom.
It may seem pointless, but this avoids a fair amount of predicted CSO pain.
2009-10-14 20:06:38 -07:00
Corbin Simpson fd63f89e95 r300g: Move ztop to derived state.
Need to get it into its own atom instead of piggybacking on DSA.
2009-10-14 03:09:41 -07:00
Corbin Simpson f13e507798 r300g: Compiler warning cleanup. 2009-10-14 01:58:18 -07:00
Cooper Yuan 99e1745af9 r300g: fix r300g cause GPU hang issue.
why there are two input position semantic tags is that ureg doesn't
set vs input semantic due to commit: 6d8dbd3d1e

so use vs input index instead of semantic name.
2009-09-28 17:55:38 +08:00
Maciej Cencora 540039887a r300g: fix erroneous condition 2009-09-27 22:44:29 +02:00
Maciej Cencora 98f6bea168 r300g: don't force vertex position for HW TCL path
It could be generated by vertex shader.
2009-09-27 22:44:28 +02:00
Maciej Cencora bedc6b7bdf r300g: add some assertions
Not sure why we are getting a shader with two inputs with position semantic, but we don't know how to handle it correctly so it's better to stop the app than lock the machine.
2009-09-27 22:44:28 +02:00
Dave Airlie d85fe842b8 r300g: fix r300 rs path 2009-09-28 06:42:25 +10:00
Dave Airlie b1252c7a34 r300g: rewrite RS state setup.
Not 100% sure this is correct, but its more correct than what was here previous
however it may require changes in the input routing for the frag shader.
2009-09-28 06:28:32 +10:00
Dave Airlie 225c3375fd r300g: silence compiler warning 2009-09-28 06:28:31 +10:00
Nicolai Hähnle 1ddb22675c r300g: Fix a number of warnings
Seriously guys....
2009-09-06 15:14:22 +02:00
Nicolai Hähnle 4b01e6f614 r300g: Debug flags infrastructure
So that debugging is no longer a full-spam-or-nothing approach, you are now
supposed to set the RADEON_DEBUG environment flag just like for classic Mesa.

The available debug flags are different, however. Just running an OpenGL
application with RADEON_DEBUG set to an arbitrary string will print out
helpful information.

Everything must be compiled with -DDEBUG for any of this to work
2009-09-06 15:03:52 +02:00
Cooper Yuan 7ee4f32dcd r300g: Set the vector address in the input memory for bypass_vs_clip_and_viewport case 2009-08-24 13:56:23 +08:00
Nicolai Hähnle d0c398a8e2 r300g: Use radeon compiler for fragment programs
This is entirely untested on R500, and needs more testing on R300.
2009-07-30 23:55:12 +02:00
Nicolai Hähnle 188f8c6792 r300g: Use r300compiler for vertex shaders 2009-07-30 23:45:18 +02:00
Corbin Simpson 1fa023ae48 r300-gallium: Slightly hacky fix for glxgears-style TCL. 2009-06-01 12:04:29 -07:00
Corbin Simpson d67fb5ea1d r300-gallium: Prevent assert when fogcoords are present.
Seems like this file is the source of all bad logic. (Pun intended.)
2009-05-20 16:05:11 -07:00
Corbin Simpson e9f8b7f1b9 r300-gallium: Cleanup PSC for HW TCL.
Still dies in assert, but at least it's not my assert anymore. :3
2009-05-11 09:57:57 -07:00
Corbin Simpson a5f68b40cb r300-gallium: Point size is at OVM position 15, not 1.
Or so sayeth osiris, and he would know. :3
2009-04-15 15:10:23 -07:00
Corbin Simpson 9340c994b7 r300-gallium: Split up vertex format tallying for HW and SW TCL.
This makes things draw (again) with HW TCL. Yay?
2009-04-10 18:35:58 -07:00
Corbin Simpson 1b5b083d5c r300-gallium: Finish up cleanup of vertex format state.
This makes texcoords route properly, and also fixes a few asserts.
2009-04-10 18:35:57 -07:00
Corbin Simpson e825609d81 r300-gallium: Clean up vertex format setup. 2009-04-10 18:35:57 -07:00
Corbin Simpson 50ee103cf0 r300-gallium: Re-translate shaders if constants change. 2009-04-05 01:32:28 -07:00
Corbin Simpson 48688e5e8f r300-gallium: Calculate vert shader inputs for HW TCL.
This is definitely not perfect.
2009-04-04 02:38:13 -07:00
Corbin Simpson a56020fe17 r300-gallium: Fix hardlock when no colors or textures are present. 2009-03-30 15:50:09 -07:00
Corbin Simpson f197a8b916 r300-gallium: Fix vertex memory offsets.
Wow, I must have been asleep when I made that mistake.
2009-03-15 23:42:42 -07:00
Corbin Simpson c5742cab19 r300-gallium: Always rasterize at least one color. 2009-03-15 23:07:30 -07:00
Corbin Simpson 2305642b2e r300-gallium: Correct vertex format setup, cleanup regs and debugging.
trivial/point no longer hardlocks.
2009-03-07 13:28:03 -08:00
Corbin Simpson 46de433d27 r300-gallium: Clean up RS.
Wow, there were buggies by the boatload in there.
2009-03-07 13:28:02 -08:00
Corbin Simpson ec1476bf31 r300-gallium: Typo in assert. 2009-03-07 00:55:10 -08:00
Corbin Simpson dcd7f1c055 r300-gallium: A bit more vertex format fixup. 2009-03-07 00:42:12 -08:00
Corbin Simpson 6ebd6c898a r300-gallium: Fix masking on vertex formats.
Gah, what a simple yet terrible mistake.
2009-03-06 19:07:54 -08:00
Corbin Simpson 3e131d7d74 r300-gallium: A handful of fixups. 2009-02-28 08:14:35 -08:00
Corbin Simpson b210c3fb3f r300-gallium: Fix RS.
I should just stop using "git stash" altogether.
2009-02-28 08:14:35 -08:00
Corbin Simpson 49de8ec2ea r300-gallium: Properly split up RS into r300 and r500 variants. 2009-02-27 12:25:09 -08:00
Corbin Simpson fd5411fe36 r300-gallium: Turn true and false into TRUE and FALSE.
Match the rest of Gallium.
2009-02-27 12:25:09 -08:00
Corbin Simpson c28298855b r300-gallium: Add RS block setup.
This is still icky, and only compile-tested.
2009-02-27 10:19:22 -08:00
Corbin Simpson 65021162a4 r300-gallium: A handful of tiny vfmt fixups.
Using a tab of inputs should work, but I keep getting bad results.
If only Rawhide's GDB wasn't broken...
2009-02-27 10:19:22 -08:00
Corbin Simpson b003b2f6dd r300-gallium: Fix a handful of compile warnings.
Some harmless, some very dangerous.
2009-02-23 04:37:58 -08:00
Corbin Simpson 763714d900 r300-gallium: Finish VAP/VF setup.
Messy, messy.
2009-02-23 04:37:58 -08:00
Corbin Simpson 18f20b70b1 r300-gallium: Ooops, forgot to apply this stash.
"git stash": The cause of, and solution to, all my problems.
2009-02-16 03:16:59 -08:00
Corbin Simpson e511110b71 r300-gallium: Add derived state for vertex formats.
Next up: The evil RS block.
2009-02-13 23:22:39 -08:00