void r300_emit_fragment_shader(struct r300_context* r300,
struct r300_fragment_shader* fs)
{
- CS_LOCALS(r300);
int i;
+ CS_LOCALS(r300);
BEGIN_CS(22);
void r500_emit_fragment_shader(struct r300_context* r300,
struct r500_fragment_shader* fs)
{
- CS_LOCALS(r300);
+ int i;
struct r300_constant_buffer* constants =
&r300->shader_constants[PIPE_SHADER_FRAGMENT];
- int i;
+ CS_LOCALS(r300);
BEGIN_CS(9 + (fs->instruction_count * 6) + (constants->count ? 3 : 0) +
(constants->count * 4));
void r300_emit_fb_state(struct r300_context* r300,
struct pipe_framebuffer_state* fb)
{
- CS_LOCALS(r300);
- struct r300_texture* tex;
int i;
+ struct r300_texture* tex;
+ CS_LOCALS(r300);
BEGIN_CS((6 * fb->nr_cbufs) + (fb->zsbuf ? 6 : 0) + 4);
for (i = 0; i < fb->nr_cbufs; i++) {
void r300_emit_rs_block_state(struct r300_context* r300,
struct r300_rs_block* rs)
{
+ int i;
struct r300_screen* r300screen = r300_screen(r300->context.screen);
CS_LOCALS(r300);
- int i;
BEGIN_CS(21);
if (r300screen->caps->is_r500) {
void r300_emit_vertex_format_state(struct r300_context* r300)
{
- CS_LOCALS(r300);
int i;
+ CS_LOCALS(r300);
BEGIN_CS(26);
OUT_CS_REG(R300_VAP_VTX_SIZE, r300->vertex_info.vinfo.size);
void r300_emit_vertex_shader(struct r300_context* r300,
struct r300_vertex_shader* vs)
{
- CS_LOCALS(r300);
- struct r300_screen* r300screen = r300_screen(r300->context.screen);
int i;
+ struct r300_screen* r300screen = r300_screen(r300->context.screen);
+ CS_LOCALS(r300);
if (!r300screen->caps->has_tcl) {
debug_printf("r300: Implementation error: emit_vertex_shader called,"
void r300_emit_viewport_state(struct r300_context* r300,
struct r300_viewport_state* viewport)
{
- /* XXX has_tcl */
- return;
CS_LOCALS(r300);
BEGIN_CS(7);
static void r300_begin_query(struct pipe_context* pipe,
struct pipe_query* query)
{
+ uint32_t* map;
struct r300_context* r300 = r300_context(pipe);
struct r300_query* q = (struct r300_query*)query;
CS_LOCALS(r300);
- uint32_t* map = pipe_buffer_map(pipe->screen, q->buf,
- PIPE_BUFFER_USAGE_CPU_WRITE);
+ map = pipe_buffer_map(pipe->screen, q->buf, PIPE_BUFFER_USAGE_CPU_WRITE);
*map = ~0;
pipe_buffer_unmap(pipe->screen, q->buf);
uint64_t* result)
{
struct r300_query* q = (struct r300_query*)query;
+ uint32_t* map;
uint32_t temp;
if (wait) {
pipe->flush(pipe, 0, NULL);
}
- uint32_t* map = pipe_buffer_map(pipe->screen, q->buf,
- PIPE_BUFFER_USAGE_CPU_READ);
+ map = pipe_buffer_map(pipe->screen, q->buf, PIPE_BUFFER_USAGE_CPU_READ);
temp = *map;
pipe_buffer_unmap(pipe->screen, q->buf);
const struct pipe_shader_state* state)
{
struct r300_context* context = r300_context(pipe);
+ tgsi_dump(state->tokens);
/* XXX handing this off to Draw for now */
return draw_create_vertex_shader(context->draw, state);
}
unsigned w, unsigned h)
{
struct r300_context* r300 = r300_context(pipe);
- CS_LOCALS(r300);
struct r300_capabilities* caps = r300_screen(pipe->screen)->caps;
struct r300_texture* tex = (struct r300_texture*)dest->texture;
unsigned pixpitch = tex->stride / tex->tex.block.size;
+ CS_LOCALS(r300);
r300_emit_blend_state(r300, &blend_clear_state);
r300_emit_blend_color_state(r300, &blend_color_clear_state);
unsigned w, unsigned h,
unsigned color)
{
+ int i;
+ float r, g, b, a, depth;
struct r300_context* r300 = r300_context(pipe);
- CS_LOCALS(r300);
struct r300_capabilities* caps = r300_screen(pipe->screen)->caps;
struct r300_texture* tex = (struct r300_texture*)dest->texture;
- int i;
- float r, g, b, a, depth;
unsigned pixpitch = tex->stride / tex->tex.block.size;
+ CS_LOCALS(r300);
a = (float)((color >> 24) & 0xff) / 255.0f;
r = (float)((color >> 16) & 0xff) / 255.0f;
unsigned w, unsigned h)
{
struct r300_context* r300 = r300_context(pipe);
- CS_LOCALS(r300);
struct r300_capabilities* caps = r300_screen(pipe->screen)->caps;
struct r300_texture* srctex = (struct r300_texture*)src->texture;
struct r300_texture* desttex = (struct r300_texture*)dest->texture;
-
unsigned pixpitch = srctex->stride / srctex->tex.block.size;
+ CS_LOCALS(r300);
+
debug_printf("r300: Copying surface %p at (%d,%d) to %p at (%d, %d),"
" dimensions %dx%d (pixel pitch %d)\n",
src, srcx, srcy, dest, destx, desty, w, h, pixpitch);
};
static struct r300_rs_block r500_rs_block_copy_state = {
- .ip[0] = R500_RS_SEL_S(R500_RS_IP_PTR_K0) |
- R500_RS_SEL_T(R500_RS_IP_PTR_K0) |
+ .ip[0] = R500_RS_SEL_S(0) |
+ R500_RS_SEL_T(1) |
R500_RS_SEL_R(R500_RS_IP_PTR_K0) |
R500_RS_SEL_Q(R500_RS_IP_PTR_K1),
- .inst[0] = R500_RS_INST_COL_CN_WRITE,
+ .inst[0] = R500_RS_INST_TEX_CN_WRITE,
.count = R300_IT_COUNT(2) | R300_IC_COUNT(0) | R300_HIRES_EN,
.inst_count = R300_RS_TX_OFFSET(6),
};