All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] Add r6xx/r7xx tiling support to mesa
@ 2010-05-25 23:12 Alex Deucher
  2010-05-25 23:12 ` [PATCH 1/3] r600: add span support for 2D tiling Alex Deucher
  0 siblings, 1 reply; 16+ messages in thread
From: Alex Deucher @ 2010-05-25 23:12 UTC (permalink / raw)
  To: airlied, dri-devel

These patches along with the drm and ddx patches enable tiling
on r6xx/r7xx hardware.

Alex

^ permalink raw reply	[flat|nested] 16+ messages in thread
* Re: [PATCH 1/3] r600: add span support for 2D tiling
@ 2010-05-27  7:54 Frieder Ferlemann
  0 siblings, 0 replies; 16+ messages in thread
From: Frieder Ferlemann @ 2010-05-27  7:54 UTC (permalink / raw)
  To: dri-devel

Hi Alex,

not tested (admittedly I haven't compiled it),
and probably not really relevant but these
switch cases could be more compact:

+static inline GLint r600_2d_tile_helper(const struct radeon_renderbuffer * rrb,
+                    GLint x, GLint y, GLint is_depth, GLint is_stencil)

...

+        switch (element_bytes) {
+        case 1:
+            pixel_number |= ((x >> 0) & 1) << 0; // pn[0] = x[0]
+            pixel_number |= ((x >> 1) & 1) << 1; // pn[1] = x[1]
+            pixel_number |= ((x >> 2) & 1) << 2; // pn[2] = x[2]
+            pixel_number |= ((y >> 1) & 1) << 3; // pn[3] = y[1]
+            pixel_number |= ((y >> 0) & 1) << 4; // pn[4] = y[0]
+            pixel_number |= ((y >> 2) & 1) << 5; // pn[5] = y[2]
+            break;
+        case 2:
+            pixel_number |= ((x >> 0) & 1) << 0; // pn[0] = x[0]
+            pixel_number |= ((x >> 1) & 1) << 1; // pn[1] = x[1]
+            pixel_number |= ((x >> 2) & 1) << 2; // pn[2] = x[2]
+            pixel_number |= ((y >> 0) & 1) << 3; // pn[3] = y[0]
+            pixel_number |= ((y >> 1) & 1) << 4; // pn[4] = y[1]
+            pixel_number |= ((y >> 2) & 1) << 5; // pn[5] = y[2]
+            break;
+        case 4:
+            pixel_number |= ((x >> 0) & 1) << 0; // pn[0] = x[0]
+            pixel_number |= ((x >> 1) & 1) << 1; // pn[1] = x[1]
+            pixel_number |= ((y >> 0) & 1) << 2; // pn[2] = y[0]
+            pixel_number |= ((x >> 2) & 1) << 3; // pn[3] = x[2]
+            pixel_number |= ((y >> 1) & 1) << 4; // pn[4] = y[1]
+            pixel_number |= ((y >> 2) & 1) << 5; // pn[5] = y[2]
+            break;
+        }


when using 

+        switch (element_bytes) {
+        case 1:
+            pixel_number |= (x & 0x07) << 0;      // pn[0] = x[0], pn[1] = x[1], pn[2] = x[2]
+            pixel_number |= ((y >> 1) & 1) << 3; // pn[3] = y[1]
+            pixel_number |= ((y >> 0) & 1) << 4; // pn[4] = y[0]
+            pixel_number |= ((y >> 2) & 1) << 5; // pn[5] = y[2]
+            break;
+        case 2:
+            pixel_number |= (x & 0x07) << 0;     // pn[0] = x[0], pn[1] = x[1], pn[2] = x[2]
+            pixel_number |= (y & 0x07) << 3;     // pn[3] = y[0], pn[4] = y[1], pn[5] = y[2]
+            break;
+        case 4:
+            pixel_number |= (x & 0x03) << 0;     // pn[0] = x[0], pn[1] = x[1]
+            pixel_number |= (y & 0x01) << 2;     // pn[2] = y[0]
+            pixel_number |= (x & 0x04) << 1;     // pn[3] = x[2]
+            pixel_number |= (y & 0x06) << 3;     // pn[4] = y[1], pn[5] = y[2]
+            break;
+        }

Greetings,
Frieder
___________________________________________________________
NEU: WEB.DE DSL für 19,99 EUR/mtl. und ohne Mindest-Laufzeit!
http://produkte.web.de/go/02/
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2010-05-28  0:10 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-25 23:12 [PATCH 0/3] Add r6xx/r7xx tiling support to mesa Alex Deucher
2010-05-25 23:12 ` [PATCH 1/3] r600: add span support for 2D tiling Alex Deucher
2010-05-25 23:12   ` [PATCH 2/3] r600: add new relocs for tiling support Alex Deucher
2010-05-25 23:12     ` [PATCH 3/3] r600: add support for getting the tiling config via drm ioctl Alex Deucher
2010-05-27 14:55   ` [PATCH 1/3] r600: add span support for 2D tiling Matt Turner
2010-05-27 15:20     ` Alex Deucher
2010-05-27 15:37       ` Alan Cox
2010-05-27 15:51       ` Brian Paul
2010-05-27 22:04         ` Conn Clark
2010-05-27 22:36           ` Alan Cox
2010-05-27 23:01           ` Frieder Ferlemann
2010-05-27 23:34             ` Conn Clark
2010-05-27 23:52               ` Alan Cox
2010-05-27 23:47                 ` Alex Deucher
2010-05-28  0:10                 ` Matt Turner
  -- strict thread matches above, loose matches on Subject: below --
2010-05-27  7:54 Frieder Ferlemann

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.