static void r300_setup_atoms(struct r300_context* r300)
{
- boolean is_r500 = r300_screen(r300->context.screen)->caps->is_r500;
- boolean has_tcl = r300_screen(r300->context.screen)->caps->has_tcl;
+ boolean is_r500 = r300->screen->caps.is_r500;
+ boolean has_tcl = r300->screen->caps.has_tcl;
/* Create the actual atom list.
*
return NULL;
r300->rws = rws;
+ r300->screen = r300screen;
r300->context.winsys = (struct pipe_winsys*)rws;
r300->context.screen = screen;
r300->context.surface_copy = r300_surface_copy;
r300->context.surface_fill = r300_surface_fill;
- if (r300screen->caps->has_tcl) {
+ if (r300screen->caps.has_tcl) {
r300->context.draw_arrays = r300_draw_arrays;
r300->context.draw_elements = r300_draw_elements;
r300->context.draw_range_elements = r300_draw_range_elements;
/* The interface to the windowing system, etc. */
struct r300_winsys_screen *rws;
+ /* Screen. */
+ struct r300_screen *screen;
/* Draw module. Used mostly for SW TCL. */
struct draw_context* draw;
/* Accelerated blit support. */
static INLINE boolean CTX_DBG_ON(struct r300_context * ctx, unsigned flags)
{
- return SCREEN_DBG_ON(r300_screen(ctx->context.screen), flags);
+ return SCREEN_DBG_ON(ctx->screen, flags);
}
static INLINE void CTX_DBG(struct r300_context * ctx, unsigned flags,
unsigned size, void* state)
{
struct r300_blend_color_state* bc = (struct r300_blend_color_state*)state;
- struct r300_screen* r300screen = r300_screen(r300->context.screen);
CS_LOCALS(r300);
- if (r300screen->caps->is_r500) {
+ if (r300->screen->caps.is_r500) {
BEGIN_CS(size);
OUT_CS_REG_SEQ(R500_RB3D_CONSTANT_COLOR_AR, 2);
OUT_CS(bc->blend_color_red_alpha);
{
struct pipe_clip_state* clip = (struct pipe_clip_state*)state;
int i;
- struct r300_screen* r300screen = r300_screen(r300->context.screen);
CS_LOCALS(r300);
- if (r300screen->caps->has_tcl) {
+ if (r300->screen->caps.has_tcl) {
BEGIN_CS(size);
OUT_CS_REG(R300_VAP_PVS_VECTOR_INDX_REG,
- (r300screen->caps->is_r500 ?
+ (r300->screen->caps.is_r500 ?
R500_PVS_UCP_START : R300_PVS_UCP_START));
OUT_CS_ONE_REG(R300_VAP_PVS_UPLOAD_DATA, 6 * 4);
for (i = 0; i < 6; i++) {
void r300_emit_dsa_state(struct r300_context* r300, unsigned size, void* state)
{
struct r300_dsa_state* dsa = (struct r300_dsa_state*)state;
- struct r300_screen* r300screen = r300_screen(r300->context.screen);
struct pipe_framebuffer_state* fb =
(struct pipe_framebuffer_state*)r300->fb_state.state;
struct pipe_stencil_ref stencil_ref = r300->stencil_ref;
OUT_CS(dsa->stencil_ref_mask | stencil_ref.ref_value[0]);
- if (r300screen->caps->is_r500) {
+ if (r300->screen->caps.is_r500) {
OUT_CS_REG(R500_ZB_STENCILREFMASK_BF, dsa->stencil_ref_bf | stencil_ref.ref_value[1]);
}
END_CS;
void r300_emit_fb_state(struct r300_context* r300, unsigned size, void* state)
{
struct pipe_framebuffer_state* fb = (struct pipe_framebuffer_state*)state;
- struct r300_screen* r300screen = r300_screen(r300->context.screen);
struct r300_texture* tex;
struct pipe_surface* surf;
int i;
/* Set the number of colorbuffers. */
if (fb->nr_cbufs > 1) {
- if (r300screen->caps->is_r500) {
+ if (r300->screen->caps.is_r500) {
OUT_CS_REG(R300_RB3D_CCTL,
R300_RB3D_CCTL_NUM_MULTIWRITES(fb->nr_cbufs) |
R300_RB3D_CCTL_INDEPENDENT_COLORFORMAT_ENABLE_ENABLE);
void r300_emit_query_start(struct r300_context *r300)
{
- struct r300_capabilities *caps = r300_screen(r300->context.screen)->caps;
struct r300_query *query = r300->query_current;
CS_LOCALS(r300);
return;
BEGIN_CS(4);
- if (caps->family == CHIP_FAMILY_RV530) {
+ if (r300->screen->caps.family == CHIP_FAMILY_RV530) {
OUT_CS_REG(RV530_FG_ZBREG_DEST, RV530_FG_ZBREG_DEST_PIPE_SELECT_ALL);
} else {
OUT_CS_REG(R300_SU_REG_DEST, R300_RASTER_PIPE_SELECT_ALL);
static void r300_emit_query_finish(struct r300_context *r300,
struct r300_query *query)
{
- struct r300_capabilities* caps = r300_screen(r300->context.screen)->caps;
+ struct r300_capabilities* caps = &r300->screen->caps;
CS_LOCALS(r300);
assert(caps->num_frag_pipes);
void r300_emit_query_end(struct r300_context* r300)
{
- struct r300_capabilities *caps = r300_screen(r300->context.screen)->caps;
+ struct r300_capabilities *caps = &r300->screen->caps;
struct r300_query *query = r300->query_current;
if (!query)
{
struct r300_rs_block* rs = (struct r300_rs_block*)state;
unsigned i;
- struct r300_screen* r300screen = r300_screen(r300->context.screen);
/* It's the same for both INST and IP tables */
unsigned count = (rs->inst_count & R300_RS_INST_COUNT_MASK) + 1;
CS_LOCALS(r300);
DBG(r300, DBG_DRAW, "r300: RS emit:\n");
BEGIN_CS(size);
- if (r300screen->caps->is_r500) {
+ if (r300->screen->caps.is_r500) {
OUT_CS_REG_SEQ(R500_RS_IP_0, count);
} else {
OUT_CS_REG_SEQ(R300_RS_IP_0, count);
OUT_CS(rs->count);
OUT_CS(rs->inst_count);
- if (r300screen->caps->is_r500) {
+ if (r300->screen->caps.is_r500) {
OUT_CS_REG_SEQ(R500_RS_INST_0, count);
} else {
OUT_CS_REG_SEQ(R300_RS_INST_0, count);
{
unsigned minx, miny, maxx, maxy;
uint32_t top_left, bottom_right;
- struct r300_screen* r300screen = r300_screen(r300->context.screen);
struct pipe_scissor_state* scissor = (struct pipe_scissor_state*)state;
struct pipe_framebuffer_state* fb =
(struct pipe_framebuffer_state*)r300->fb_state.state;
maxy = 1;
}
- if (r300screen->caps->is_r500) {
+ if (r300->screen->caps.is_r500) {
top_left =
(minx << R300_SCISSORS_X_SHIFT) |
(miny << R300_SCISSORS_Y_SHIFT);
{
struct r300_vertex_shader* vs = (struct r300_vertex_shader*)state;
struct r300_vertex_program_code* code = &vs->code;
- struct r300_screen* r300screen = r300_screen(r300->context.screen);
+ struct r300_screen* r300screen = r300->screen;
unsigned instruction_count = code->length / 4;
unsigned i;
- unsigned vtx_mem_size = r300screen->caps->is_r500 ? 128 : 72;
+ unsigned vtx_mem_size = r300screen->caps.is_r500 ? 128 : 72;
unsigned input_count = MAX2(util_bitcount(code->InputsRead), 1);
unsigned output_count = MAX2(util_bitcount(code->OutputsWritten), 1);
unsigned temp_count = MAX2(code->num_temporaries, 1);
OUT_CS_REG(R300_VAP_CNTL, R300_PVS_NUM_SLOTS(pvs_num_slots) |
R300_PVS_NUM_CNTLRS(pvs_num_controllers) |
- R300_PVS_NUM_FPUS(r300screen->caps->num_vert_fpus) |
+ R300_PVS_NUM_FPUS(r300screen->caps.num_vert_fpus) |
R300_PVS_VF_MAX_VTX_NUM(12) |
- (r300screen->caps->is_r500 ? R500_TCL_STATE_OPTIMIZATION : 0));
+ (r300screen->caps.is_r500 ? R500_TCL_STATE_OPTIMIZATION : 0));
END_CS;
}
void r300_emit_vs_constant_buffer(struct r300_context* r300,
struct rc_constant_list* constants)
{
- struct r300_screen* r300screen = r300_screen(r300->context.screen);
unsigned i;
CS_LOCALS(r300);
BEGIN_CS(constants->Count * 4 + 3);
OUT_CS_REG(R300_VAP_PVS_VECTOR_INDX_REG,
- (r300screen->caps->is_r500 ?
+ (r300->screen->caps.is_r500 ?
R500_PVS_CONST_START : R300_PVS_CONST_START));
OUT_CS_ONE_REG(R300_VAP_PVS_UPLOAD_DATA, constants->Count * 4);
for (i = 0; i < constants->Count; i++) {
/* Emit all dirty state. */
void r300_emit_dirty_state(struct r300_context* r300)
{
- struct r300_screen* r300screen = r300_screen(r300->context.screen);
+ struct r300_screen* r300screen = r300->screen;
struct r300_atom* atom;
if (r300->dirty_state & R300_NEW_QUERY) {
if (r300->dirty_state & R300_NEW_FRAGMENT_SHADER) {
r300_emit_fragment_depth_config(r300, r300->fs);
- if (r300screen->caps->is_r500) {
+ if (r300screen->caps.is_r500) {
r500_emit_fragment_program_code(r300, &r300->fs->shader->code);
} else {
r300_emit_fragment_program_code(r300, &r300->fs->shader->code);
}
if (r300->dirty_state & R300_NEW_FRAGMENT_SHADER_CONSTANTS) {
- if (r300screen->caps->is_r500) {
+ if (r300screen->caps.is_r500) {
r500_emit_fs_constant_buffer(r300,
&r300->fs->shader->code.constants);
} else {
*/
/* Emit the VBO for SWTCL. */
- if (!r300screen->caps->has_tcl) {
+ if (!r300screen->caps.has_tcl) {
r300_emit_vertex_buffer(r300);
}
}
/* Unmark HWTCL state for SWTCL. */
- if (!r300_screen(pipe->screen)->caps->has_tcl) {
+ if (!r300->screen->caps.has_tcl) {
r300->vs_state.dirty = FALSE;
r300->dirty_state &= ~R300_NEW_VERTEX_SHADER_CONSTANTS;
}
compiler.code = &shader->code;
compiler.state = shader->compare_state;
- compiler.is_r500 = r300_screen(r300->context.screen)->caps->is_r500;
+ compiler.is_r500 = r300->screen->caps.is_r500;
compiler.max_temp_regs = compiler.is_r500 ? 128 : 32;
compiler.AllocateHwInputs = &allocate_hardware_inputs;
compiler.UserData = &fs->inputs;
unsigned query_type)
{
struct r300_context *r300 = r300_context(pipe);
- struct r300_screen *r300screen = r300_screen(r300->context.screen);
+ struct r300_screen *r300screen = r300->screen;
unsigned query_size;
struct r300_query *q, *qptr;
q->active = FALSE;
- if (r300screen->caps->family == CHIP_FAMILY_RV530)
- query_size = r300screen->caps->num_z_pipes * sizeof(uint32_t);
+ if (r300screen->caps.family == CHIP_FAMILY_RV530)
+ query_size = r300screen->caps.num_z_pipes * sizeof(uint32_t);
else
- query_size = r300screen->caps->num_frag_pipes * sizeof(uint32_t);
+ query_size = r300screen->caps.num_frag_pipes * sizeof(uint32_t);
if (!is_empty_list(&r300->query_list)) {
qptr = last_elem(&r300->query_list);
uint64_t* result)
{
struct r300_context* r300 = r300_context(pipe);
- struct r300_screen* r300screen = r300_screen(r300->context.screen);
+ struct r300_screen* r300screen = r300->screen;
struct r300_query *q = (struct r300_query*)query;
unsigned flags = PIPE_BUFFER_USAGE_CPU_READ;
uint32_t* map;
return FALSE;
map += q->offset / 4;
- if (r300screen->caps->family == CHIP_FAMILY_RV530)
- num_results = r300screen->caps->num_z_pipes;
+ if (r300screen->caps.family == CHIP_FAMILY_RV530)
+ num_results = r300screen->caps.num_z_pipes;
else
- num_results = r300screen->caps->num_frag_pipes;
+ num_results = r300screen->caps.num_frag_pipes;
for (i = 0; i < num_results; i++) {
if (*map == ~0U) {
struct r300_context* r300 = r300_context(pipe);
struct pipe_buffer* orgIndexBuffer = indexBuffer;
#if defined(ENABLE_ALT_NUM_VERTS)
- boolean alt_num_verts = r300_screen(pipe->screen)->caps->is_r500 &&
+ boolean alt_num_verts = r300->screen->caps.is_r500 &&
count > 65536;
#else
boolean alt_num_verts = FALSE;
{
struct r300_context* r300 = r300_context(pipe);
#if defined(ENABLE_ALT_NUM_VERTS)
- boolean alt_num_verts = r300_screen(pipe->screen)->caps->is_r500 &&
+ boolean alt_num_verts = r300->screen->caps.is_r500 &&
count > 65536;
#else
boolean alt_num_verts = FALSE;
{
struct r300_screen* r300screen = r300_screen(pscreen);
- return chip_families[r300screen->caps->family];
+ return chip_families[r300screen->caps.family];
}
static int r300_get_param(struct pipe_screen* pscreen, int param)
switch (param) {
case PIPE_CAP_MAX_TEXTURE_IMAGE_UNITS:
case PIPE_CAP_MAX_COMBINED_SAMPLERS:
- return r300screen->caps->num_tex_units;
+ 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 */
return 1;
case PIPE_CAP_TWO_SIDED_STENCIL:
- if (r300screen->caps->is_r500) {
+ if (r300screen->caps.is_r500) {
return 1;
} else {
return 0;
case PIPE_CAP_MAX_TEXTURE_2D_LEVELS:
case PIPE_CAP_MAX_TEXTURE_3D_LEVELS:
case PIPE_CAP_MAX_TEXTURE_CUBE_LEVELS:
- if (r300screen->caps->is_r500) {
+ if (r300screen->caps.is_r500) {
/* 13 == 4096 */
return 13;
} else {
case PIPE_CAP_BLEND_EQUATION_SEPARATE:
return 1;
case PIPE_CAP_SM3:
- if (r300screen->caps->is_r500) {
+ if (r300screen->caps.is_r500) {
return 1;
} else {
return 0;
case PIPE_CAP_MAX_POINT_WIDTH_AA:
/* The maximum dimensions of the colorbuffer are our practical
* rendering limits. 2048 pixels should be enough for anybody. */
- if (r300screen->caps->is_r500) {
+ if (r300screen->caps.is_r500) {
return 4096.0f;
- } else if (r300screen->caps->is_r400) {
+ } else if (r300screen->caps.is_r400) {
return 4021.0f;
} else {
return 2560.0f;
unsigned geom_flags)
{
uint32_t retval = 0;
- boolean is_r500 = r300_screen(screen)->caps->is_r500;
- boolean is_r400 = r300_screen(screen)->caps->is_r400;
+ boolean is_r500 = r300_screen(screen)->caps.is_r500;
+ boolean is_r400 = r300_screen(screen)->caps.is_r400;
boolean is_z24 = format == PIPE_FORMAT_X8Z24_UNORM ||
format == PIPE_FORMAT_S8_USCALED_Z24_UNORM;
boolean is_color2101010 = format == PIPE_FORMAT_R10G10B10A2_UNORM;
if (rws)
rws->destroy(rws);
- FREE(r300screen->caps);
FREE(r300screen);
}
struct pipe_screen* r300_create_screen(struct r300_winsys_screen *rws)
{
struct r300_screen *r300screen = CALLOC_STRUCT(r300_screen);
- struct r300_capabilities *caps = CALLOC_STRUCT(r300_capabilities);
- if (!r300screen || !caps) {
+ if (!r300screen) {
FREE(r300screen);
- FREE(caps);
return NULL;
}
- caps->pci_id = rws->get_value(rws, R300_VID_PCI_ID);
- caps->num_frag_pipes = rws->get_value(rws, R300_VID_GB_PIPES);
- caps->num_z_pipes = rws->get_value(rws, R300_VID_Z_PIPES);
+ r300screen->caps.pci_id = rws->get_value(rws, R300_VID_PCI_ID);
+ r300screen->caps.num_frag_pipes = rws->get_value(rws, R300_VID_GB_PIPES);
+ r300screen->caps.num_z_pipes = rws->get_value(rws, R300_VID_Z_PIPES);
r300_init_debug(r300screen);
- r300_parse_chipset(caps);
+ r300_parse_chipset(&r300screen->caps);
- r300screen->caps = caps;
r300screen->rws = rws;
r300screen->screen.winsys = (struct pipe_winsys*)rws;
r300screen->screen.destroy = r300_destroy_screen;
struct r300_winsys_screen *rws;
/* Chipset capabilities */
- struct r300_capabilities* caps;
+ struct r300_capabilities caps;
/** Combination of DBG_xxx flags */
unsigned debug;
/* Enable reading from the colorbuffer. */
blend->blend_control |= R300_READ_ENABLE;
- if (r300_screen(r300_context(pipe)->context.screen)->caps->is_r500) {
+ if (r300screen->caps.is_r500) {
/* Optimization: Depending on incoming pixels, we can
* conditionally disable the reading in hardware... */
if (eqRGB != PIPE_BLEND_MIN && eqA != PIPE_BLEND_MIN &&
/* Color channel masks for all MRTs. */
blend->color_channel_mask = bgra_cmask(state->rt[0].colormask);
- if (r300screen->caps->is_r500 && state->independent_blend_enable) {
+ if (r300screen->caps.is_r500 && state->independent_blend_enable) {
if (state->rt[1].blend_enable) {
blend->color_channel_mask |= bgra_cmask(state->rt[1].colormask) << 4;
}
const struct pipe_blend_color* color)
{
struct r300_context* r300 = r300_context(pipe);
- struct r300_screen* r300screen = r300_screen(pipe->screen);
struct r300_blend_color_state* state =
(struct r300_blend_color_state*)r300->blend_color_state.state;
union util_color uc;
float_to_fixed10(color->color[2]) |
(float_to_fixed10(color->color[1]) << 16);
- r300->blend_color_state.size = r300screen->caps->is_r500 ? 3 : 2;
+ r300->blend_color_state.size = r300->screen->caps.is_r500 ? 3 : 2;
r300->blend_color_state.dirty = TRUE;
}
r300->clip = *state;
- if (r300_screen(pipe->screen)->caps->has_tcl) {
+ if (r300->screen->caps.has_tcl) {
memcpy(r300->clip_state.state, state, sizeof(struct pipe_clip_state));
r300->clip_state.size = 29;
} else {
r300_create_dsa_state(struct pipe_context* pipe,
const struct pipe_depth_stencil_alpha_state* state)
{
- struct r300_capabilities *caps =
- r300_screen(r300_context(pipe)->context.screen)->caps;
+ struct r300_capabilities *caps = &r300_screen(pipe->screen)->caps;
struct r300_dsa_state* dsa = CALLOC_STRUCT(r300_dsa_state);
/* Depth test setup. */
const struct pipe_framebuffer_state* state)
{
struct r300_context* r300 = r300_context(pipe);
- struct r300_screen* r300screen = r300_screen(pipe->screen);
struct pipe_framebuffer_state *old_state = r300->fb_state.state;
unsigned max_width, max_height;
uint32_t zbuffer_bpp = 0;
return;
}
- if (r300screen->caps->is_r500) {
+ if (r300->screen->caps.is_r500) {
max_width = max_height = 4096;
- } else if (r300screen->caps->is_r400) {
+ } else if (r300->screen->caps.is_r400) {
max_width = max_height = 4021;
} else {
max_width = max_height = 2560;
static void* r300_create_rs_state(struct pipe_context* pipe,
const struct pipe_rasterizer_state* state)
{
- struct r300_screen* r300screen = r300_screen(pipe->screen);
struct r300_rs_state* rs = CALLOC_STRUCT(r300_rs_state);
/* Copy rasterizer state for Draw. */
#endif
/* If no TCL engine is present, turn off the HW TCL. */
- if (!r300screen->caps->has_tcl) {
+ if (!r300_screen(pipe->screen)->caps.has_tcl) {
rs->vap_control_status |= R300_VAP_TCL_BYPASS;
}
{
struct r300_context* r300 = r300_context(pipe);
struct r300_sampler_state* sampler = CALLOC_STRUCT(r300_sampler_state);
- boolean is_r500 = r300_screen(pipe->screen)->caps->is_r500;
+ boolean is_r500 = r300->screen->caps.is_r500;
int lod_bias;
union util_color uc;
sampler->border_color = uc.ui;
/* R500-specific fixups and optimizations */
- if (r300_screen(r300->context.screen)->caps->is_r500) {
+ if (r300->screen->caps.is_r500) {
sampler->filter1 |= R500_BORDER_FIX;
}
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;
+ unsigned tex_units = r300->screen->caps.num_tex_units;
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;
+ unsigned tex_units = r300->screen->caps.num_tex_units;
+ boolean is_r500 = r300->screen->caps.is_r500;
boolean dirty_tex = FALSE;
if (count > tex_units) {
unsigned count,
const struct pipe_vertex_element* attribs)
{
- struct r300_screen* r300screen = r300_screen(pipe->screen);
struct r300_vertex_element_state *velems;
unsigned i, size;
velems->count = count;
memcpy(velems->velem, attribs, sizeof(struct pipe_vertex_element) * count);
- if (r300screen->caps->has_tcl) {
+ if (r300_screen(pipe->screen)->caps.has_tcl) {
/* Check if the format is aligned to the size of DWORD. */
for (i = 0; i < count; i++) {
size = util_format_get_blocksize(attribs[i].src_format);
struct r300_vertex_shader* vs = CALLOC_STRUCT(r300_vertex_shader);
r300_vertex_shader_common_init(vs, shader);
- if (r300_screen(pipe->screen)->caps->has_tcl) {
+ if (r300->screen->caps.has_tcl) {
r300_translate_vertex_shader(r300, vs);
} else {
vs->draw_vs = draw_create_vertex_shader(r300->draw, shader);
/* The majority of the RS block bits is dependent on the vertex shader. */
r300->rs_block_state.dirty = TRUE; /* Will be updated before the emission. */
- if (r300_screen(pipe->screen)->caps->has_tcl) {
+ if (r300->screen->caps.has_tcl) {
r300->vs_state.dirty = TRUE;
r300->vs_state.size = vs->code.length + 9;
struct r300_context* r300 = r300_context(pipe);
struct r300_vertex_shader* vs = (struct r300_vertex_shader*)shader;
- if (r300_screen(pipe->screen)->caps->has_tcl) {
+ if (r300->screen->caps.has_tcl) {
rc_constants_destroy(&vs->code.constants);
} else {
draw_delete_vertex_shader(r300->draw,
struct pipe_buffer *buf)
{
struct r300_context* r300 = r300_context(pipe);
- struct r300_screen *r300screen = r300_screen(pipe->screen);
void *mapped;
int max_size = 0;
max_size = 256;
break;
case PIPE_SHADER_FRAGMENT:
- if (r300screen->caps->is_r500) {
+ if (r300->screen->caps.is_r500) {
max_size = 256;
/* XXX Implement emission of r400's extended constant buffer. */
- /*} else if (r300screen->caps->is_r400) {
+ /*} else if (r300->screen->caps.is_r400) {
max_size = 64;*/
} else {
max_size = 32;
pipe_buffer_unmap(pipe->screen, buf);
if (shader == PIPE_SHADER_VERTEX) {
- if (r300screen->caps->has_tcl) {
+ if (r300->screen->caps.has_tcl) {
r300->dirty_state |= R300_NEW_VERTEX_SHADER_CONSTANTS;
r300->pvs_flush.dirty = TRUE;
} else if (r300->draw) {
boolean any_bcolor_used = vs_outputs->bcolor[0] != ATTR_UNUSED ||
vs_outputs->bcolor[1] != ATTR_UNUSED;
- if (r300_screen(r300->context.screen)->caps->is_r500) {
+ if (r300->screen->caps.is_r500) {
rX00_rs_col = r500_rs_col;
rX00_rs_col_write = r500_rs_col_write;
rX00_rs_tex = r500_rs_tex;
void r300_emit_invariant_state(struct r300_context* r300,
unsigned size, void* state)
{
- struct r300_capabilities* caps = r300_screen(r300->context.screen)->caps;
+ struct r300_capabilities* caps = &r300_screen(r300->context.screen)->caps;
CS_LOCALS(r300);
BEGIN_CS(14 + (caps->has_tcl ? 2: 0));
struct r300_texture_format_state* state = &tex->state;
struct pipe_texture *pt = &tex->tex;
unsigned i;
- boolean is_r500 = screen->caps->is_r500;
+ boolean is_r500 = screen->caps.is_r500;
/* Set sampler state. */
state->format0 = R300_TX_WIDTH((pt->width0 - 1) & 0x7ff) |
{
struct pipe_texture* base = &tex->tex;
unsigned stride, size, layer_size, nblocksy, i;
- boolean rv350_mode = screen->caps->family >= CHIP_FAMILY_RV350;
+ boolean rv350_mode = screen->caps.family >= CHIP_FAMILY_RV350;
SCREEN_DBG(screen, DBG_TEX, "r300: Making miptree for texture, format %s\n",
util_format_name(base->format));
{
struct r300_winsys_screen *rws = (struct r300_winsys_screen *)screen->winsys;
enum pipe_format format = tex->tex.format;
- boolean rv350_mode = r300_screen(screen)->caps->family >= CHIP_FAMILY_RV350;
+ boolean rv350_mode = r300_screen(screen)->caps.family >= CHIP_FAMILY_RV350;
if (!r300_format_is_plain(format)) {
return;