mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 05:18:08 +02:00
r300-gallium, radeon: BO handling fixes, some useful asserts.
This commit is contained in:
parent
bed917641c
commit
1b26c2bbae
2 changed files with 9 additions and 3 deletions
|
|
@ -459,7 +459,7 @@ void r300_emit_dirty_state(struct r300_context* r300)
|
|||
/* Color buffers... */
|
||||
for (i = 0; i < r300->framebuffer_state.nr_cbufs; i++) {
|
||||
tex = (struct r300_texture*)r300->framebuffer_state.cbufs[i];
|
||||
//assert(tex && tex->buffer && "cbuf is marked, but NULL!");
|
||||
assert(tex && tex->buffer && "cbuf is marked, but NULL!");
|
||||
if (!tex->buffer) return;
|
||||
r300->winsys->add_buffer(r300->winsys, tex->buffer,
|
||||
0, RADEON_GEM_DOMAIN_VRAM);
|
||||
|
|
@ -467,7 +467,7 @@ void r300_emit_dirty_state(struct r300_context* r300)
|
|||
/* ...depth buffer... */
|
||||
if (r300->framebuffer_state.zsbuf) {
|
||||
tex = (struct r300_texture*)r300->framebuffer_state.zsbuf;
|
||||
//assert(tex && tex->buffer && "zsbuf is marked, but NULL!");
|
||||
assert(tex && tex->buffer && "zsbuf is marked, but NULL!");
|
||||
if (!tex->buffer) return;
|
||||
r300->winsys->add_buffer(r300->winsys, tex->buffer,
|
||||
0, RADEON_GEM_DOMAIN_VRAM);
|
||||
|
|
|
|||
|
|
@ -37,6 +37,8 @@ static void radeon_r300_add_buffer(struct r300_winsys* winsys,
|
|||
* find a slot for it otherwise. */
|
||||
for (i = 0; i < RADEON_MAX_BOS; i++) {
|
||||
if (sc[i].bo == bo) {
|
||||
sc[i].read_domains |= rd;
|
||||
sc[i].write_domain |= wd;
|
||||
return;
|
||||
} else if (sc[i].bo == NULL) {
|
||||
sc[i].bo = bo;
|
||||
|
|
@ -52,11 +54,15 @@ static void radeon_r300_add_buffer(struct r300_winsys* winsys,
|
|||
|
||||
static boolean radeon_r300_validate(struct r300_winsys* winsys)
|
||||
{
|
||||
int retval;
|
||||
int retval, i;
|
||||
struct radeon_winsys_priv* priv =
|
||||
(struct radeon_winsys_priv*)winsys->radeon_winsys;
|
||||
struct radeon_cs_space_check* sc = priv->sc;
|
||||
|
||||
debug_printf("Validation count: %d\n", priv->bo_count);
|
||||
for (i = 0; i < priv->bo_count; i++) {
|
||||
debug_printf("BO %d: %p rd: %d wd: %d\n", i, sc[i].bo, sc[i].read_domains, sc[i].write_domain);
|
||||
}
|
||||
retval = radeon_cs_space_check(priv->cs, sc, priv->bo_count);
|
||||
|
||||
if (retval == RADEON_CS_SPACE_OP_TO_BIG) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue