Re-organize emit order to reduce the number of dwords in the default 3D state. This change reduces the default state size from 514 dwords to 282.
Signed-off-by: Alex Deucher <alexdeuc...@gmail.com> --- drivers/gpu/drm/radeon/r600_blit_shaders.c | 677 +++++----------------------- 1 files changed, 111 insertions(+), 566 deletions(-) diff --git a/drivers/gpu/drm/radeon/r600_blit_shaders.c b/drivers/gpu/drm/radeon/r600_blit_shaders.c index 0271b53..8338d43 100644 --- a/drivers/gpu/drm/radeon/r600_blit_shaders.c +++ b/drivers/gpu/drm/radeon/r600_blit_shaders.c @@ -45,11 +45,8 @@ const u32 r6xx_default_state[] = 0x80000000, 0x80000000, 0xc0016800, - 0x00000010, - 0x00008000, - 0xc0016800, 0x00000542, - 0x07000003, + 0xf9000003, 0xc0016800, 0x000005c5, 0x00000000, @@ -62,11 +59,9 @@ const u32 r6xx_default_state[] = 0xc0016800, 0x0000060e, 0x01020204, - 0xc0016f00, + 0xc0026f00, 0x00000000, 0x00000000, - 0xc0016f00, - 0x00000001, 0x00000000, 0xc0096900, 0x0000022a, @@ -83,43 +78,24 @@ const u32 r6xx_default_state[] = 0x00000004, 0x00000000, 0xc0016900, - 0x0000000a, - 0x00000000, - 0xc0016900, - 0x0000000b, - 0x00000000, - 0xc0016900, - 0x0000010c, - 0x00000000, - 0xc0016900, - 0x0000010d, - 0x00000000, - 0xc0016900, 0x00000200, 0x00000000, - 0xc0016900, + 0xc0026900, 0x00000343, 0x00000060, - 0xc0016900, - 0x00000344, 0x00000040, 0xc0016900, 0x00000351, 0x0000aa00, 0xc0016900, - 0x00000104, - 0x00000000, - 0xc0016900, - 0x0000010e, - 0x00000000, - 0xc0046900, - 0x00000105, - 0x00000000, - 0x00000000, + 0x00000203, + 0x00000210, + 0xc0026900, + 0x0000000a, 0x00000000, 0x00000000, 0xc0036900, - 0x00000109, + 0x0000010c, 0x00000000, 0x00000000, 0x00000000, @@ -129,302 +105,149 @@ const u32 r6xx_default_state[] = 0x00000000, 0x00000000, 0x00000000, - 0xc0046900, - 0x00000048, - 0x3f800000, - 0x00000000, - 0x3f800000, - 0x3f800000, 0xc0016900, - 0x0000008e, + 0x0000008f, 0x0000000f, 0xc0016900, + 0x000001e8, + 0x00000001, + 0xc0056900, + 0x00000104, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0xc0016900, 0x00000080, 0x00000000, 0xc0016900, + 0x0000008c, + 0x00000000, + 0xc0016900, 0x00000083, 0x0000ffff, - 0xc0016900, + 0xc0026900, 0x00000084, 0x00000000, - 0xc0016900, - 0x00000085, 0x20002000, - 0xc0016900, + 0xc0026900, 0x00000086, 0x00000000, - 0xc0016900, - 0x00000087, 0x20002000, - 0xc0016900, + 0xc0026900, 0x00000088, 0x00000000, - 0xc0016900, - 0x00000089, 0x20002000, - 0xc0016900, + 0xc0026900, 0x0000008a, 0x00000000, - 0xc0016900, - 0x0000008b, 0x20002000, - 0xc0016900, - 0x0000008c, - 0x00000000, - 0xc0016900, + 0xc0026900, 0x00000094, 0x80000000, - 0xc0016900, - 0x00000095, 0x20002000, 0xc0026900, - 0x000000b4, - 0x00000000, - 0x3f800000, - 0xc0016900, 0x00000096, 0x80000000, - 0xc0016900, - 0x00000097, 0x20002000, 0xc0026900, - 0x000000b6, - 0x00000000, - 0x3f800000, - 0xc0016900, 0x00000098, 0x80000000, - 0xc0016900, - 0x00000099, 0x20002000, 0xc0026900, - 0x000000b8, - 0x00000000, - 0x3f800000, - 0xc0016900, 0x0000009a, 0x80000000, - 0xc0016900, - 0x0000009b, 0x20002000, 0xc0026900, - 0x000000ba, - 0x00000000, - 0x3f800000, - 0xc0016900, 0x0000009c, 0x80000000, - 0xc0016900, - 0x0000009d, 0x20002000, 0xc0026900, - 0x000000bc, - 0x00000000, - 0x3f800000, - 0xc0016900, 0x0000009e, 0x80000000, - 0xc0016900, - 0x0000009f, 0x20002000, 0xc0026900, - 0x000000be, - 0x00000000, - 0x3f800000, - 0xc0016900, 0x000000a0, 0x80000000, - 0xc0016900, - 0x000000a1, 0x20002000, 0xc0026900, - 0x000000c0, - 0x00000000, - 0x3f800000, - 0xc0016900, 0x000000a2, 0x80000000, - 0xc0016900, - 0x000000a3, 0x20002000, 0xc0026900, - 0x000000c2, - 0x00000000, - 0x3f800000, - 0xc0016900, 0x000000a4, 0x80000000, - 0xc0016900, - 0x000000a5, 0x20002000, 0xc0026900, - 0x000000c4, - 0x00000000, - 0x3f800000, - 0xc0016900, 0x000000a6, 0x80000000, - 0xc0016900, - 0x000000a7, 0x20002000, 0xc0026900, - 0x000000c6, - 0x00000000, - 0x3f800000, - 0xc0016900, 0x000000a8, 0x80000000, - 0xc0016900, - 0x000000a9, 0x20002000, 0xc0026900, - 0x000000c8, - 0x00000000, - 0x3f800000, - 0xc0016900, 0x000000aa, 0x80000000, - 0xc0016900, - 0x000000ab, 0x20002000, 0xc0026900, - 0x000000ca, - 0x00000000, - 0x3f800000, - 0xc0016900, 0x000000ac, 0x80000000, - 0xc0016900, - 0x000000ad, 0x20002000, 0xc0026900, - 0x000000cc, - 0x00000000, - 0x3f800000, - 0xc0016900, 0x000000ae, 0x80000000, - 0xc0016900, - 0x000000af, 0x20002000, 0xc0026900, - 0x000000ce, - 0x00000000, - 0x3f800000, - 0xc0016900, 0x000000b0, 0x80000000, - 0xc0016900, - 0x000000b1, 0x20002000, 0xc0026900, - 0x000000d0, - 0x00000000, - 0x3f800000, - 0xc0016900, 0x000000b2, 0x80000000, - 0xc0016900, - 0x000000b3, 0x20002000, 0xc0026900, - 0x000000d2, + 0x00000292, 0x00000000, - 0x3f800000, - 0xc0016900, - 0x00000293, 0x00004010, - 0xc0016900, + 0xc0096900, 0x00000300, 0x00000000, - 0xc0016900, - 0x00000301, - 0x00000000, - 0xc0016900, - 0x00000312, - 0xffffffff, - 0xc0016900, - 0x00000307, - 0x00000000, - 0xc0016900, - 0x00000308, - 0x00000000, - 0xc0016900, - 0x00000283, - 0x00000000, - 0xc0016900, - 0x00000292, - 0x00000000, - 0xc0066900, - 0x0000010f, - 0x00000000, - 0x00000000, - 0x00000000, - 0x00000000, 0x00000000, - 0x00000000, - 0xc0016900, - 0x00000206, - 0x00000000, - 0xc0016900, - 0x00000207, - 0x00000000, - 0xc0016900, - 0x00000208, - 0x00000000, - 0xc0046900, - 0x00000303, + 0x0000002d, 0x3f800000, 0x3f800000, 0x3f800000, 0x3f800000, + 0x00000000, + 0x00000000, 0xc0016900, - 0x00000205, + 0x00000312, + 0xffffffff, + 0xc0056900, + 0x00000204, + 0x00010000, 0x00000004, - 0xc0016900, - 0x00000280, + 0x00000100, 0x00000000, - 0xc0016900, - 0x00000281, 0x00000000, - 0xc0016900, + 0xc0066900, 0x0000037e, 0x00000000, - 0xc0016900, - 0x00000382, 0x00000000, - 0xc0016900, - 0x00000380, 0x00000000, - 0xc0016900, - 0x00000383, 0x00000000, - 0xc0016900, - 0x00000381, 0x00000000, - 0xc0016900, - 0x00000282, - 0x00000008, - 0xc0016900, - 0x00000302, - 0x0000002d, - 0xc0016900, - 0x0000037f, 0x00000000, 0xc0016900, 0x000001b2, 0x00000000, - 0xc0016900, + 0xc0046900, 0x000001b6, 0x00000000, - 0xc0016900, - 0x000001b7, 0x00000000, - 0xc0016900, - 0x000001b8, 0x00000000, - 0xc0016900, - 0x000001b9, 0x00000000, 0xc0016900, 0x00000225, @@ -435,125 +258,69 @@ const u32 r6xx_default_state[] = 0xc0016900, 0x00000237, 0x00000000, - 0xc0016900, + 0xc0046900, 0x00000100, 0x00000800, - 0xc0016900, - 0x00000101, + 0x00000000, + 0x00000000, 0x00000000, 0xc0016900, - 0x00000102, + 0x000002a1, 0x00000000, 0xc0016900, + 0x000002a5, + 0x00000000, + 0xc0026900, 0x000002a8, 0x00000000, - 0xc0016900, - 0x000002a9, 0x00000000, - 0xc0016900, - 0x00000103, + 0xc0116900, + 0x00000280, 0x00000000, - 0xc0016900, - 0x00000284, 0x00000000, - 0xc0016900, - 0x00000290, + 0x00000008, 0x00000000, - 0xc0016900, - 0x00000285, 0x00000000, - 0xc0016900, - 0x00000286, 0x00000000, - 0xc0016900, - 0x00000287, 0x00000000, - 0xc0016900, - 0x00000288, 0x00000000, - 0xc0016900, - 0x00000289, 0x00000000, - 0xc0016900, - 0x0000028a, 0x00000000, - 0xc0016900, - 0x0000028b, 0x00000000, - 0xc0016900, - 0x0000028c, 0x00000000, - 0xc0016900, - 0x0000028d, 0x00000000, - 0xc0016900, - 0x0000028e, 0x00000000, - 0xc0016900, - 0x0000028f, 0x00000000, - 0xc0016900, - 0x000002a1, 0x00000000, - 0xc0016900, - 0x000002a5, 0x00000000, - 0xc0016900, + 0xc0036900, 0x000002ac, 0x00000000, - 0xc0016900, - 0x000002ad, 0x00000000, - 0xc0016900, - 0x000002ae, 0x00000000, 0xc0016900, 0x000002c8, 0x00000000, 0xc0016900, - 0x00000206, - 0x00000100, - 0xc0016900, - 0x00000204, - 0x00010000, - 0xc0036e00, - 0x00000000, - 0x00000012, - 0x00000000, - 0x00000000, - 0xc0016900, - 0x0000008f, + 0x0000008e, 0x0000000f, 0xc0016900, - 0x000001e8, - 0x00000001, - 0xc0016900, 0x00000202, 0x00cc0000, 0xc0016900, - 0x00000205, - 0x00000244, - 0xc0016900, - 0x00000203, - 0x00000210, - 0xc0016900, 0x000001b1, 0x00000000, 0xc0016900, 0x00000185, 0x00000000, - 0xc0016900, + 0xc0036900, 0x000001b3, 0x00000001, - 0xc0016900, - 0x000001b4, + 0x00000000, 0x00000000, 0xc0016900, 0x00000191, - 0x00000b00, - 0xc0016900, - 0x000001b5, - 0x00000000, + 0x00000900, }; const u32 r7xx_default_state[] = @@ -562,11 +329,8 @@ const u32 r7xx_default_state[] = 0x80000000, 0x80000000, 0xc0016800, - 0x00000010, - 0x00008000, - 0xc0016800, 0x00000542, - 0x07000002, + 0xf9000002, 0xc0016800, 0x000005c5, 0x00000000, @@ -579,11 +343,9 @@ const u32 r7xx_default_state[] = 0xc0016800, 0x0000060e, 0x00420204, - 0xc0016f00, + 0xc0026f00, 0x00000000, 0x00000000, - 0xc0016f00, - 0x00000001, 0x00000000, 0xc0096900, 0x0000022a, @@ -600,38 +362,24 @@ const u32 r7xx_default_state[] = 0x00000004, 0x00000000, 0xc0016900, - 0x0000000a, - 0x00000000, - 0xc0016900, - 0x0000000b, - 0x00000000, - 0xc0016900, - 0x0000010c, - 0x00000000, - 0xc0016900, - 0x0000010d, - 0x00000000, - 0xc0016900, 0x00000200, 0x00000000, - 0xc0016900, + 0xc0026900, 0x00000343, 0x00000060, - 0xc0016900, - 0x00000344, 0x00000000, 0xc0016900, 0x00000351, 0x0000aa00, 0xc0016900, - 0x00000104, - 0x00000000, - 0xc0016900, - 0x0000010e, + 0x00000203, + 0x00000210, + 0xc0026900, + 0x0000000a, 0x00000000, - 0xc0046900, - 0x00000105, 0x00000000, + 0xc0036900, + 0x0000010c, 0x00000000, 0x00000000, 0x00000000, @@ -642,295 +390,148 @@ const u32 r7xx_default_state[] = 0x00000000, 0x00000000, 0xc0016900, - 0x0000008e, + 0x0000008f, 0x0000000f, 0xc0016900, + 0x000001e8, + 0x00000001, + 0xc0056900, + 0x00000104, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0xc0016900, 0x00000080, 0x00000000, 0xc0016900, + 0x0000008c, + 0xaaaaaaaa, + 0xc0016900, 0x00000083, 0x0000ffff, - 0xc0016900, + 0xc0026900, 0x00000084, 0x00000000, - 0xc0016900, - 0x00000085, 0x20002000, - 0xc0016900, + 0xc0026900, 0x00000086, 0x00000000, - 0xc0016900, - 0x00000087, 0x20002000, - 0xc0016900, + 0xc0026900, 0x00000088, 0x00000000, - 0xc0016900, - 0x00000089, 0x20002000, - 0xc0016900, + 0xc0026900, 0x0000008a, 0x00000000, - 0xc0016900, - 0x0000008b, 0x20002000, - 0xc0016900, - 0x0000008c, - 0xaaaaaaaa, - 0xc0016900, + 0xc0026900, 0x00000094, 0x80000000, - 0xc0016900, - 0x00000095, 0x20002000, 0xc0026900, - 0x000000b4, - 0x00000000, - 0x3f800000, - 0xc0016900, 0x00000096, 0x80000000, - 0xc0016900, - 0x00000097, 0x20002000, 0xc0026900, - 0x000000b6, - 0x00000000, - 0x3f800000, - 0xc0016900, 0x00000098, 0x80000000, - 0xc0016900, - 0x00000099, 0x20002000, 0xc0026900, - 0x000000b8, - 0x00000000, - 0x3f800000, - 0xc0016900, 0x0000009a, 0x80000000, - 0xc0016900, - 0x0000009b, 0x20002000, 0xc0026900, - 0x000000ba, - 0x00000000, - 0x3f800000, - 0xc0016900, 0x0000009c, 0x80000000, - 0xc0016900, - 0x0000009d, 0x20002000, 0xc0026900, - 0x000000bc, - 0x00000000, - 0x3f800000, - 0xc0016900, 0x0000009e, 0x80000000, - 0xc0016900, - 0x0000009f, 0x20002000, 0xc0026900, - 0x000000be, - 0x00000000, - 0x3f800000, - 0xc0016900, 0x000000a0, 0x80000000, - 0xc0016900, - 0x000000a1, 0x20002000, 0xc0026900, - 0x000000c0, - 0x00000000, - 0x3f800000, - 0xc0016900, 0x000000a2, 0x80000000, - 0xc0016900, - 0x000000a3, 0x20002000, 0xc0026900, - 0x000000c2, - 0x00000000, - 0x3f800000, - 0xc0016900, 0x000000a4, 0x80000000, - 0xc0016900, - 0x000000a5, 0x20002000, 0xc0026900, - 0x000000c4, - 0x00000000, - 0x3f800000, - 0xc0016900, 0x000000a6, 0x80000000, - 0xc0016900, - 0x000000a7, 0x20002000, 0xc0026900, - 0x000000c6, - 0x00000000, - 0x3f800000, - 0xc0016900, 0x000000a8, 0x80000000, - 0xc0016900, - 0x000000a9, 0x20002000, 0xc0026900, - 0x000000c8, - 0x00000000, - 0x3f800000, - 0xc0016900, 0x000000aa, 0x80000000, - 0xc0016900, - 0x000000ab, 0x20002000, 0xc0026900, - 0x000000ca, - 0x00000000, - 0x3f800000, - 0xc0016900, 0x000000ac, 0x80000000, - 0xc0016900, - 0x000000ad, 0x20002000, 0xc0026900, - 0x000000cc, - 0x00000000, - 0x3f800000, - 0xc0016900, 0x000000ae, 0x80000000, - 0xc0016900, - 0x000000af, 0x20002000, 0xc0026900, - 0x000000ce, - 0x00000000, - 0x3f800000, - 0xc0016900, 0x000000b0, 0x80000000, - 0xc0016900, - 0x000000b1, 0x20002000, 0xc0026900, - 0x000000d0, - 0x00000000, - 0x3f800000, - 0xc0016900, 0x000000b2, 0x80000000, - 0xc0016900, - 0x000000b3, 0x20002000, 0xc0026900, - 0x000000d2, + 0x00000292, 0x00000000, - 0x3f800000, - 0xc0016900, - 0x00000293, 0x00514000, - 0xc0016900, + 0xc0096900, 0x00000300, 0x00000000, - 0xc0016900, - 0x00000301, - 0x00000000, - 0xc0016900, - 0x00000312, - 0xffffffff, - 0xc0016900, - 0x00000307, - 0x00000000, - 0xc0016900, - 0x00000308, - 0x00000000, - 0xc0016900, - 0x00000283, - 0x00000000, - 0xc0016900, - 0x00000292, - 0x00000000, - 0xc0066900, - 0x0000010f, - 0x00000000, 0x00000000, - 0x00000000, - 0x00000000, - 0x00000000, - 0x00000000, - 0xc0016900, - 0x00000206, - 0x00000000, - 0xc0016900, - 0x00000207, - 0x00000000, - 0xc0016900, - 0x00000208, - 0x00000000, - 0xc0046900, - 0x00000303, + 0x0000002d, 0x3f800000, 0x3f800000, 0x3f800000, 0x3f800000, + 0x00000000, + 0x00000000, 0xc0016900, - 0x00000205, + 0x00000312, + 0xffffffff, + 0xc0056900, + 0x00000204, + 0x00010000, 0x00000004, - 0xc0016900, - 0x00000280, + 0x00000100, 0x00000000, - 0xc0016900, - 0x00000281, 0x00000000, - 0xc0016900, + 0xc0066900, 0x0000037e, 0x00000000, - 0xc0016900, - 0x00000382, 0x00000000, - 0xc0016900, - 0x00000380, 0x00000000, - 0xc0016900, - 0x00000383, 0x00000000, - 0xc0016900, - 0x00000381, 0x00000000, - 0xc0016900, - 0x00000282, - 0x00000008, - 0xc0016900, - 0x00000302, - 0x0000002d, - 0xc0016900, - 0x0000037f, 0x00000000, 0xc0016900, 0x000001b2, 0x00000001, - 0xc0016900, + 0xc0046900, 0x000001b6, 0x00000000, - 0xc0016900, - 0x000001b7, 0x00000000, - 0xc0016900, - 0x000001b8, 0x00000000, - 0xc0016900, - 0x000001b9, 0x00000000, 0xc0016900, 0x00000225, @@ -941,125 +542,69 @@ const u32 r7xx_default_state[] = 0xc0016900, 0x00000237, 0x00000000, - 0xc0016900, + 0xc0046900, 0x00000100, 0x00000800, - 0xc0016900, - 0x00000101, + 0x00000000, + 0x00000000, 0x00000000, 0xc0016900, - 0x00000102, + 0x000002a1, 0x00000000, 0xc0016900, + 0x000002a5, + 0x00000000, + 0xc0026900, 0x000002a8, 0x00000000, - 0xc0016900, - 0x000002a9, 0x00000000, - 0xc0016900, - 0x00000103, + 0xc0116900, + 0x00000280, 0x00000000, - 0xc0016900, - 0x00000284, 0x00000000, - 0xc0016900, - 0x00000290, + 0x00000008, 0x00000000, - 0xc0016900, - 0x00000285, 0x00000000, - 0xc0016900, - 0x00000286, 0x00000000, - 0xc0016900, - 0x00000287, 0x00000000, - 0xc0016900, - 0x00000288, 0x00000000, - 0xc0016900, - 0x00000289, 0x00000000, - 0xc0016900, - 0x0000028a, 0x00000000, - 0xc0016900, - 0x0000028b, 0x00000000, - 0xc0016900, - 0x0000028c, 0x00000000, - 0xc0016900, - 0x0000028d, 0x00000000, - 0xc0016900, - 0x0000028e, 0x00000000, - 0xc0016900, - 0x0000028f, 0x00000000, - 0xc0016900, - 0x000002a1, 0x00000000, - 0xc0016900, - 0x000002a5, 0x00000000, - 0xc0016900, + 0xc0036900, 0x000002ac, 0x00000000, - 0xc0016900, - 0x000002ad, 0x00000000, - 0xc0016900, - 0x000002ae, 0x00000000, 0xc0016900, 0x000002c8, 0x00000000, 0xc0016900, - 0x00000206, - 0x00000100, - 0xc0016900, - 0x00000204, - 0x00010000, - 0xc0036e00, - 0x00000000, - 0x00000012, - 0x00000000, - 0x00000000, - 0xc0016900, - 0x0000008f, + 0x0000008e, 0x0000000f, 0xc0016900, - 0x000001e8, - 0x00000001, - 0xc0016900, 0x00000202, 0x00cc0000, 0xc0016900, - 0x00000205, - 0x00000244, - 0xc0016900, - 0x00000203, - 0x00000210, - 0xc0016900, 0x000001b1, 0x00000000, 0xc0016900, 0x00000185, 0x00000000, - 0xc0016900, + 0xc0036900, 0x000001b3, 0x00000001, - 0xc0016900, - 0x000001b4, + 0x00000000, 0x00000000, 0xc0016900, 0x00000191, - 0x00000b00, - 0xc0016900, - 0x000001b5, - 0x00000000, + 0x00000900, }; /* same for r6xx/r7xx */ -- 1.7.0.1 _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/dri-devel