commit d324af4

Michael Forney  ·  2014-01-31 12:11:00 +0000 UTC
parent a0c4594
nouveau: Use inline commands when possible
1 files changed,  +6, -6
+6, -6
 1@@ -189,13 +189,13 @@ static bool nvc0_2d_initialize(struct nouveau_renderer * renderer)
 2     if (ret != 0)
 3         goto error0;
 4 
 5-    if (!ensure_space(renderer->pushbuf, 6))
 6+    if (!ensure_space(renderer->pushbuf, 4))
 7         goto error1;
 8 
 9     nvc0_2d(renderer->pushbuf, NV01_SUBCHAN_OBJECT, 1,
10             renderer->nvc0_2d->handle);
11-    nvc0_2d(renderer->pushbuf, NV50_2D_UNK0884, 1, 0x3f);
12-    nvc0_2d(renderer->pushbuf, NV50_2D_UNK0888, 1, 1);
13+    nvc0_2d_inline(renderer->pushbuf, NV50_2D_UNK0884, 0x3f);
14+    nvc0_2d_inline(renderer->pushbuf, NV50_2D_UNK0888, 1);
15 
16     return true;
17 
18@@ -474,7 +474,7 @@ void renderer_copy_rectangle(struct wld_renderer * base,
19     struct nouveau_buffer * buffer = nouveau_buffer(buffer_base);
20     uint32_t src_format, dst_format;
21 
22-    if (!ensure_space(renderer->pushbuf, 41))
23+    if (!ensure_space(renderer->pushbuf, 39))
24         return;
25 
26     src_format = nvc0_format(buffer->base.format);
27@@ -489,8 +489,8 @@ void renderer_copy_rectangle(struct wld_renderer * base,
28     if (nouveau_pushbuf_validate(renderer->pushbuf) != 0)
29         return;
30 
31-    nvc0_2d(renderer->pushbuf, NV50_GRAPH_SERIALIZE, 1, 0);
32-    nvc0_2d(renderer->pushbuf, NV50_2D_BLIT_CONTROL, 1, 0);
33+    nvc0_2d_inline(renderer->pushbuf, NV50_GRAPH_SERIALIZE, 0);
34+    nvc0_2d_inline(renderer->pushbuf, NV50_2D_BLIT_CONTROL, 0);
35     nvc0_2d(renderer->pushbuf, NV50_2D_BLIT_DST_X, 12,
36             dst_x, dst_y, width, height, 0, 1, 0, 1, 0, src_x, 0, src_y);
37