diff options
Diffstat (limited to 'src/mesa/drivers/dri/nouveau/nouveau_surface.c')
-rw-r--r-- | src/mesa/drivers/dri/nouveau/nouveau_surface.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/mesa/drivers/dri/nouveau/nouveau_surface.c b/src/mesa/drivers/dri/nouveau/nouveau_surface.c index e6a712095c6..f2521149088 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_surface.c +++ b/src/mesa/drivers/dri/nouveau/nouveau_surface.c @@ -34,7 +34,7 @@ nouveau_surface_alloc(struct gl_context *ctx, struct nouveau_surface *s, unsigned flags, unsigned format, unsigned width, unsigned height) { - unsigned tile_mode = 0, tile_flags = 0; + union nouveau_bo_config config = {}; int ret, cpp = _mesa_get_format_bytes(format); nouveau_bo_ref(NULL, &s->bo); @@ -50,22 +50,22 @@ nouveau_surface_alloc(struct gl_context *ctx, struct nouveau_surface *s, if (layout == TILED) { s->pitch = align(s->pitch, 256); - tile_mode = s->pitch; + config.nv04.surf_pitch = s->pitch; if (cpp == 4) - tile_flags = NOUVEAU_BO_TILE_32BPP; + config.nv04.surf_flags = NV04_BO_32BPP; else if (cpp == 2) - tile_flags = NOUVEAU_BO_TILE_16BPP; + config.nv04.surf_flags = NV04_BO_16BPP; if (_mesa_get_format_bits(format, GL_DEPTH_BITS)) - tile_flags |= NOUVEAU_BO_TILE_ZETA; + config.nv04.surf_flags |= NV04_BO_ZETA; } else { s->pitch = align(s->pitch, 64); } - ret = nouveau_bo_new_tile(context_dev(ctx), flags, 0, s->pitch * height, - tile_mode, tile_flags, &s->bo); + ret = nouveau_bo_new(context_dev(ctx), flags, 0, s->pitch * height, + &config, &s->bo); assert(!ret); } |