{
/* Reasonable defaults */
caps->num_vert_fpus = 4;
+ caps->num_tex_units = 16;
caps->has_tcl = debug_get_bool_option("RADEON_NO_TCL", FALSE) ? FALSE : TRUE;
caps->is_r400 = FALSE;
caps->is_r500 = FALSE;
caps->high_second_pipe = FALSE;
-
/* Note: These are not ordered by PCI ID. I leave that task to GCC,
* which will perform the ordering while collating jump tables. Instead,
* I've tried to group them according to capabilities and age. */
unsigned num_frag_pipes;
/* The number of z pipes */
unsigned num_z_pipes;
+ /* The number of texture units. */
+ unsigned num_tex_units;
/* Whether or not TCL is physically present */
boolean has_tcl;
/* Whether or not this is R400. The differences compared to their R3xx
struct r300_textures_state {
/* Textures. */
- struct pipe_sampler_view *fragment_sampler_views[8];
+ struct pipe_sampler_view *fragment_sampler_views[16];
int texture_count;
/* Sampler states. */
- struct r300_sampler_state *sampler_states[8];
+ struct r300_sampler_state *sampler_states[16];
int sampler_count;
/* These is the merge of the texture and sampler states. */
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];
+ } regs[16];
};
struct r300_vertex_stream_state {
switch (param) {
case PIPE_CAP_MAX_TEXTURE_IMAGE_UNITS:
case PIPE_CAP_MAX_COMBINED_SAMPLERS:
- /* XXX I'm told this goes up to 16 */
- return 8;
+ return r300screen->caps->num_tex_units;
case PIPE_CAP_NPOT_TEXTURES:
/* XXX enable now to get GL2.1 API,
* figure out later how to emulate this */
struct r300_context* r300 = r300_context(pipe);
struct r300_textures_state* state =
(struct r300_textures_state*)r300->textures_state.state;
+ unsigned tex_units = r300_screen(r300->context.screen)->caps->num_tex_units;
- if (count > 8) {
+ if (count > tex_units) {
return;
}
(struct r300_textures_state*)r300->textures_state.state;
struct r300_texture *texture;
unsigned i;
+ unsigned tex_units = r300_screen(r300->context.screen)->caps->num_tex_units;
boolean is_r500 = r300_screen(r300->context.screen)->caps->is_r500;
boolean dirty_tex = FALSE;
- /* XXX magic num */
- if (count > 8) {
+ if (count > tex_units) {
return;
}
}
}
- for (i = count; i < 8; i++) {
+ for (i = count; i < tex_units; i++) {
if (state->fragment_sampler_views[i]) {
pipe_sampler_view_reference(&state->fragment_sampler_views[i],
NULL);
// Map the range [0, 15] to [0, 63].
return R500_TX_MAX_ANISO(MIN2((unsigned)(max_aniso*4.2001), 63)) |
- R500_TX_ANISO_HIGH_QUALITY;;
+ R500_TX_ANISO_HIGH_QUALITY;
}
/* Non-CSO state. (For now.) */