Hi,
I was playing a little around with r300 mainly looking at depth buffer. I'm still unable to make it work properly.
Thus i have few questions. In radeon driver it seems that default value for z_scale & z_offset are 0 (radeon/radeon_state_init.c)
Why are they set like that ?
I changed the depth in order to have something more conveniant on screen :
adaptor.depth_pitch=display_width | (0x8 << 16); maybe better to write it as : adaptor.depth_pitch=display_width | (0x4 << 17);
in void Emit3dRegs(void) i used informations from radeon register.
/* do not enable either of stencil, Z or anything else */ e32(CP_PACKET0(RADEON_RB3D_CNTL,0)); e32(RADEON_COLOR_FORMAT_ARGB8888 | RADEON_Z_ENABLE);
e32(CP_PACKET0(RADEON_RB3D_ZSTENCILCNTL,0));
e32(RADEON_Z_WRITE_ENABLE | RADEON_DEPTH_FORMAT_32BIT_FLOAT_Z | RADEON_Z_TEST_LESS);
You can find a screenshot here where we see the depth buffer & triangle drawn in depth buffer :
http://www.iteam.org/~lebowski/r300_depth.png
The triangle are drawn in the order they are send. The white & blue triangle should be cover by the colored triangle.
Did i miss something somewhere in order to activate the depth buffer or to make it works properly. If anyone has
a clue.
Maybe we should put somewhere a list of things to find and who is working on it, thus people won't work
on the same things in the mean time or they could work together more eviciently. Also maybe it could
be usefull to make a plan of things we want to discover.
z buffer & stencil buffer
matrix stack for modelview, projection & texture (is the information of radeon enought ?)
T&L route
I think with this feature we could make a quite good first hardware accelerated driver.
By the way i find that clear_depth_buffer & clear_color_buffer are quite
complex. Is all the stuff they have in really necessary ? (i will try to look at that latter but if someone already done it).
Oh yes i almost forgot :) my device id is 0x4e4a (it is a radeon 9800)
Jerome Glisse
------------------------------------------------------- This SF.net email is sponsored by: IT Product Guide on ITManagersJournal Use IT products in your business? Tell us what you think of them. Give us Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more http://productguide.itmanagersjournal.com/guidepromo.tmpl -- _______________________________________________ Dri-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/dri-devel