summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/r300/r300_context.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/drivers/r300/r300_context.h')
-rw-r--r--src/gallium/drivers/r300/r300_context.h35
1 files changed, 23 insertions, 12 deletions
diff --git a/src/gallium/drivers/r300/r300_context.h b/src/gallium/drivers/r300/r300_context.h
index 3eb884a0cf..b98fe347b8 100644
--- a/src/gallium/drivers/r300/r300_context.h
+++ b/src/gallium/drivers/r300/r300_context.h
@@ -118,7 +118,7 @@ struct r300_sampler_state {
unsigned min_lod, max_lod;
};
-struct r300_texture_state {
+struct r300_texture_format_state {
uint32_t format0; /* R300_TX_FORMAT0: 0x4480 */
uint32_t format1; /* R300_TX_FORMAT1: 0x44c0 */
uint32_t format2; /* R300_TX_FORMAT2: 0x4500 */
@@ -134,6 +134,25 @@ struct r300_texture_fb_state {
uint32_t zb_format; /* R300_ZB_FORMAT */
};
+struct r300_textures_state {
+ /* Textures. */
+ struct r300_texture *textures[8];
+ int texture_count;
+ /* Sampler states. */
+ struct r300_sampler_state *sampler_states[8];
+ int sampler_count;
+
+ /* These is the merge of the texture and sampler states. */
+ unsigned count;
+ uint32_t tx_enable; /* R300_TX_ENABLE: 0x4101 */
+ struct r300_texture_sampler_state {
+ uint32_t format[3]; /* R300_TX_FORMAT[0-2] */
+ uint32_t filter[2]; /* R300_TX_FILTER[0-1] */
+ uint32_t border_color; /* R300_TX_BORDER_COLOR: 0x45c0 */
+ uint32_t tile_config; /* R300_TX_OFFSET (subset thereof) */
+ } regs[8];
+};
+
struct r300_vertex_stream_state {
/* R300_VAP_PROG_STREAK_CNTL_[0-7] */
uint32_t vap_prog_stream_cntl[8];
@@ -165,10 +184,6 @@ struct r300_ztop_state {
#define R300_NEW_FRAGMENT_SHADER 0x00000020
#define R300_NEW_FRAGMENT_SHADER_CONSTANTS 0x00000040
-#define R300_NEW_SAMPLER 0x00000200
-#define R300_ANY_NEW_SAMPLERS 0x0001fe00
-#define R300_NEW_TEXTURE 0x00040000
-#define R300_ANY_NEW_TEXTURES 0x03fc0000
#define R300_NEW_VERTEX_SHADER_CONSTANTS 0x10000000
#define R300_NEW_QUERY 0x40000000
#define R300_NEW_KITCHEN_SINK 0x7fffffff
@@ -254,7 +269,7 @@ struct r300_texture {
struct pipe_buffer* buffer;
/* Registers carrying texture format data. */
- struct r300_texture_state state;
+ struct r300_texture_format_state state;
struct r300_texture_fb_state fb_state;
/* Buffer tiling */
@@ -306,14 +321,10 @@ struct r300_context {
struct r300_atom rs_state;
/* RS block state. */
struct r300_atom rs_block_state;
- /* Sampler states. */
- struct r300_sampler_state* sampler_states[8];
- int sampler_count;
/* Scissor state. */
struct r300_atom scissor_state;
- /* Texture states. */
- struct r300_texture* textures[8];
- int texture_count;
+ /* Textures state. */
+ struct r300_atom textures_state;
/* Vertex stream formatting state. */
struct r300_atom vertex_stream_state;
/* VAP (vertex shader) output mapping state. */