~mmach/netext73/mesa-ryzen

« back to all changes in this revision

Viewing changes to src/gallium/drivers/r300/r300_emit.c

  • Committer: mmach
  • Date: 2023-11-02 21:31:35 UTC
  • Revision ID: netbit73@gmail.com-20231102213135-18d4tzh7tj0uz752
2023-11-02 22:11:57

Show diffs side-by-side

added added

removed removed

Lines of Context:
83
83
    struct r300_dsa_state* dsa = (struct r300_dsa_state*)state;
84
84
    struct pipe_framebuffer_state* fb =
85
85
        (struct pipe_framebuffer_state*)r300->fb_state.state;
86
 
    boolean is_r500 = r300->screen->caps.is_r500;
 
86
    bool is_r500 = r300->screen->caps.is_r500;
87
87
    CS_LOCALS(r300);
88
88
    uint32_t alpha_func = dsa->alpha_function;
89
89
 
659
659
    }
660
660
    OUT_CS_REG(R300_ZB_ZPASS_DATA, 0);
661
661
    END_CS;
662
 
    query->begin_emitted = TRUE;
 
662
    query->begin_emitted = true;
663
663
}
664
664
 
665
665
static void r300_emit_query_end_frag_pipes(struct r300_context *r300,
755
755
    if (!query)
756
756
        return;
757
757
 
758
 
    if (query->begin_emitted == FALSE)
 
758
    if (query->begin_emitted == false)
759
759
        return;
760
760
 
761
761
    if (caps->family == CHIP_RV530) {
766
766
    } else 
767
767
        r300_emit_query_end_frag_pipes(r300, query);
768
768
 
769
 
    query->begin_emitted = FALSE;
 
769
    query->begin_emitted = false;
770
770
    query->num_results += query->num_pipes;
771
771
 
772
772
    /* XXX grab all the results and reset the counter. */
895
895
    struct r300_texture_sampler_state *texstate;
896
896
    struct r300_resource *tex;
897
897
    unsigned i;
898
 
    boolean has_us_format = r300->screen->caps.has_us_format;
 
898
    bool has_us_format = r300->screen->caps.has_us_format;
899
899
    CS_LOCALS(r300);
900
900
 
901
901
    BEGIN_CS(size);
928
928
}
929
929
 
930
930
void r300_emit_vertex_arrays(struct r300_context* r300, int offset,
931
 
                             boolean indexed, int instance_id)
 
931
                             bool indexed, int instance_id)
932
932
{
933
933
    struct pipe_vertex_buffer *vbuf = r300->vertex_buffer;
934
934
    struct pipe_vertex_element *velem = r300->velems->velem;
1027
1027
    END_CS;
1028
1028
}
1029
1029
 
1030
 
void r300_emit_vertex_arrays_swtcl(struct r300_context *r300, boolean indexed)
 
1030
void r300_emit_vertex_arrays_swtcl(struct r300_context *r300, bool indexed)
1031
1031
{
1032
1032
    CS_LOCALS(r300);
1033
1033
 
1233
1233
    END_CS;
1234
1234
 
1235
1235
    /* Mark the current zbuffer's hiz ram as in use. */
1236
 
    r300->hiz_in_use = TRUE;
 
1236
    r300->hiz_in_use = true;
1237
1237
    r300->hiz_func = HIZ_FUNC_NONE;
1238
1238
    r300_mark_atom_dirty(r300, &r300->hyperz_state);
1239
1239
}
1255
1255
    END_CS;
1256
1256
 
1257
1257
    /* Mark the current zbuffer's zmask as in use. */
1258
 
    r300->zmask_in_use = TRUE;
 
1258
    r300->zmask_in_use = true;
1259
1259
    r300_mark_atom_dirty(r300, &r300->hyperz_state);
1260
1260
}
1261
1261
 
1276
1276
    END_CS;
1277
1277
 
1278
1278
    /* Mark the current zbuffer's zmask as in use. */
1279
 
    r300->cmask_in_use = TRUE;
 
1279
    r300->cmask_in_use = true;
1280
1280
    r300_mark_fb_state_dirty(r300, R300_CHANGED_CMASK_ENABLE);
1281
1281
}
1282
1282
 
1300
1300
    END_CS;
1301
1301
}
1302
1302
 
1303
 
boolean r300_emit_buffer_validate(struct r300_context *r300,
1304
 
                                  boolean do_validate_vertex_buffers,
1305
 
                                  struct pipe_resource *index_buffer)
 
1303
bool r300_emit_buffer_validate(struct r300_context *r300,
 
1304
                               bool do_validate_vertex_buffers,
 
1305
                               struct pipe_resource *index_buffer)
1306
1306
{
1307
1307
    struct pipe_framebuffer_state *fb =
1308
1308
        (struct pipe_framebuffer_state*)r300->fb_state.state;
1311
1311
        (struct r300_textures_state*)r300->textures_state.state;
1312
1312
    struct r300_resource *tex;
1313
1313
    unsigned i;
1314
 
    boolean flushed = FALSE;
 
1314
    bool flushed = false;
1315
1315
 
1316
1316
validate:
1317
1317
    if (r300->fb_state.dirty) {
1404
1404
    if (!r300->rws->cs_validate(&r300->cs)) {
1405
1405
        /* Ooops, an infinite loop, give up. */
1406
1406
        if (flushed)
1407
 
            return FALSE;
 
1407
            return false;
1408
1408
 
1409
 
        flushed = TRUE;
 
1409
        flushed = true;
1410
1410
        goto validate;
1411
1411
    }
1412
1412
 
1413
 
    return TRUE;
 
1413
    return true;
1414
1414
}
1415
1415
 
1416
1416
unsigned r300_get_num_dirty_dwords(struct r300_context *r300)
1452
1452
    foreach_dirty_atom(r300, atom) {
1453
1453
        if (atom->dirty) {
1454
1454
            atom->emit(r300, atom->size, atom->state);
1455
 
            atom->dirty = FALSE;
 
1455
            atom->dirty = false;
1456
1456
        }
1457
1457
    }
1458
1458