Brian,
Took a quick look at the sketched out sampler state, with a couple of
comments.
It's always worth taking a look at the i965/brw_structs.h file as this
gives a clear idea of what hardware state structs look like & this is
more or less the style of interface I'm keen to target with softpipe.
Looking at it, they pack the whole sampler state into 4 dwords, though
one of them is a pointer to another state object, for default color.
I'd say default color shouldn't be part of the static state struct anyway.
The rest of the packing is acheived with the used of fixed point fields.
That may be a step too far for softpipe, unless we are generous about
the size of those fields it will potentially limit more capable hardware.
I'd say we only care about state from the first two dwords in softpipe,
but would want larger or perhaps floating point versions of several of
the fields.
Have a look in brw_defines for the enums to go with the state definitions.
Keith
---------------------
struct brw_sampler_state
{
struct
{
GLuint shadow_function:3;
GLuint lod_bias:11;
GLuint min_filter:3;
GLuint mag_filter:3;
GLuint mip_filter:2;
GLuint base_level:5;
GLuint pad:1;
GLuint lod_preclamp:1;
GLuint default_color_mode:1;
GLuint pad0:1;
GLuint disable:1;
} ss0;
struct
{
GLuint r_wrap_mode:3;
GLuint t_wrap_mode:3;
GLuint s_wrap_mode:3;
GLuint pad:3;
GLuint max_lod:10;
GLuint min_lod:10;
} ss1;
struct
{
GLuint pad:5;
GLuint default_color_pointer:27;
} ss2;
struct
{
GLuint pad:19;
GLuint max_aniso:3;
GLuint chroma_key_mode:1;
GLuint chroma_key_index:2;
GLuint chroma_key_enable:1;
GLuint monochrome_filter_width:3;
GLuint monochrome_filter_height:3;
} ss3;
};
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Mesa3d-dev mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mesa3d-dev