On Thu, Jan 7, 2010 at 4:34 AM, Keith Whitwell <kei...@vmware.com> wrote:
> > It looks like there are some unrelated changes in your diff -- can you > separate them out into disjoint changes? One way is to make several > commits to your local git repo and then use git-format-patch to create > email-ready changes with your authorship and commit message intact. > > Keith, Thanks for the pointer to git-format-patch. Here is my patch set restructured to be more understandable. While creating this stream I also removed a call to util_format_description that I had put into texture_action_read_info. I was thinking that could lead to a more compact icon selection of the icons. But the swizzle information in the description was harder to use than the format enum. Mike
From 24d8b23b3c4bdb0c0839c77b495ac334960a915e Mon Sep 17 00:00:00 2001 From: Mike Stroyan <m...@pavilion.stroyan> Date: Fri, 8 Jan 2010 11:00:43 -0700 Subject: [PATCH 1/5] Change from librbug.a, libtgsi.a, and libutil.a to libgallium.a --- Makefile.in | 4 +--- 1 files changed, 1 insertions(+), 3 deletions(-) diff --git a/Makefile.in b/Makefile.in index 1d39e8b..0cc3b45 100644 --- a/Makefile.in +++ b/Makefile.in @@ -17,9 +17,7 @@ MESA_INCLUDES = \ -I$(MESA)src/gallium/drivers MESA_LIBS = \ - $(MESA)src/gallium/auxiliary/rbug/librbug.a \ - $(MESA)src/gallium/auxiliary/tgsi/libtgsi.a \ - $(MESA)src/gallium/auxiliary/util/libutil.a + $(MESA)src/gallium/auxiliary/libgallium.a -- 1.6.3.3
From 03fc1a93c31045acea6f1f3e5575e2f5838c9070 Mon Sep 17 00:00:00 2001 From: Mike Stroyan <m...@pavilion.stroyan> Date: Fri, 8 Jan 2010 11:14:56 -0700 Subject: [PATCH 2/5] Use util_format_* functions instead of pf_* functions. --- src/texture.c | 167 +++++++++++++++++++++++++++++++++++++++++--------------- 1 files changed, 122 insertions(+), 45 deletions(-) diff --git a/src/texture.c b/src/texture.c index a9ba987..6553acc 100644 --- a/src/texture.c +++ b/src/texture.c @@ -27,6 +27,7 @@ #include "GL/gl.h" #include "pipe/p_format.h" +#include "util/u_format.h" /* needed for u_tile */ #include "pipe/p_state.h" @@ -233,7 +234,7 @@ struct texture_action_read unsigned stride; unsigned size; enum pipe_format format; - struct pipe_format_block block; + uint32_t block_height; void *data; }; @@ -319,9 +320,9 @@ static void texture_action_read_upload(struct texture_action_read *action, src_stride = action->stride; - if (!pf_is_compressed(action->format)) { + if (!util_format_is_compressed(action->format)) { uint32_t dst_stride = 4 * 4 * w; - uint32_t step_h = action->block.height; + uint32_t step_h = action->block_height; float *rgba = g_malloc(dst_stride * h); GLint format, type; unsigned i; @@ -342,7 +343,7 @@ static void texture_action_read_upload(struct texture_action_read *action, format, type, rgba); g_free(rgba); - } else if (pf_is_compressed(action->format)) { + } else if (util_format_is_compressed(action->format)) { if (action->format == PIPE_FORMAT_DXT1_RGB) internal_format = GL_COMPRESSED_RGB_S3TC_DXT1_EXT; @@ -392,11 +393,11 @@ static gboolean texture_action_read_read(struct rbug_event *e, if (!action->running) goto error; - if (pf_is_compressed(action->format)) { + if (util_format_is_compressed(action->format)) { size = read->data_len; } else { /* calculate needed size */ - size = pf_get_nblocksy(&action->block, action->height) * read->stride; + size = util_format_get_nblocksx(action->format, action->height) * read->stride; if (read->data_len < size) goto error; @@ -437,6 +438,7 @@ static gboolean texture_action_read_info(struct rbug_event *e, char info_short_string[64]; char info_long_string[128]; GdkPixbuf *buf = NULL; + const struct util_format_description *format_description; info = (struct rbug_proto_texture_info_reply *)header; action = (struct texture_action_read *)e; @@ -449,42 +451,119 @@ static gboolean texture_action_read_info(struct rbug_event *e, goto error; } - if (pf_layout(info->format) == PIPE_FORMAT_LAYOUT_RGBAZS) { - int swz = (info->format >> 2) & 0xFFF; - - if (!swz) - ; - else if (swz == _PIPE_FORMAT_RGBA) - buf = icon_get("rgba", p); - else if (swz == _PIPE_FORMAT_RGB1) - buf = icon_get("rgbx", p); - else if (swz == _PIPE_FORMAT_ARGB) - buf = icon_get("argb", p); - else if (swz == _PIPE_FORMAT_1RGB) - buf = icon_get("xrgb", p); - else if (swz == _PIPE_FORMAT_000R) - buf = icon_get("rgba", p); - - else if (swz == _PIPE_FORMAT_SZ00) - buf = icon_get("s8z24", p); - else if (swz == _PIPE_FORMAT_0Z00) - buf = icon_get("x8z24", p); - else if (swz == _PIPE_FORMAT_ZS00) - buf = icon_get("z24s8", p); - else if (swz == _PIPE_FORMAT_Z000) - buf = icon_get("z24x8", p); - - } else if (pf_layout(info->format) == PIPE_FORMAT_LAYOUT_DXT) { - - if (info->format == PIPE_FORMAT_DXT1_RGB) - buf = icon_get("dxt1_rgb", p); - else if (info->format == PIPE_FORMAT_DXT1_RGBA) - buf = icon_get("dxt1_rgba", p); - else if (info->format == PIPE_FORMAT_DXT3_RGBA) - buf = icon_get("dxt3_rgba", p); - else if (info->format == PIPE_FORMAT_DXT5_RGBA) - buf = icon_get("dxt5_rgba", p); - + format_description = util_format_description(info->format); + + switch (info->format) { + case PIPE_FORMAT_NONE: break; + case PIPE_FORMAT_A8R8G8B8_UNORM: buf = icon_get("argb", p); break; + case PIPE_FORMAT_X8R8G8B8_UNORM: buf = icon_get("xrgb", p); break; + case PIPE_FORMAT_B8G8R8A8_UNORM: break; + case PIPE_FORMAT_B8G8R8X8_UNORM: break; + case PIPE_FORMAT_A1R5G5B5_UNORM: buf = icon_get("argb", p); break; + case PIPE_FORMAT_A4R4G4B4_UNORM: buf = icon_get("argb", p); break; + case PIPE_FORMAT_R5G6B5_UNORM: buf = icon_get("rgb", p); break; + case PIPE_FORMAT_A2B10G10R10_UNORM: break; + case PIPE_FORMAT_L8_UNORM: break; + case PIPE_FORMAT_A8_UNORM: break; + case PIPE_FORMAT_I8_UNORM: break; + case PIPE_FORMAT_A8L8_UNORM: break; + case PIPE_FORMAT_L16_UNORM: break; + case PIPE_FORMAT_YCBCR: break; + case PIPE_FORMAT_YCBCR_REV: break; + case PIPE_FORMAT_Z16_UNORM: break; + case PIPE_FORMAT_Z32_UNORM: break; + case PIPE_FORMAT_Z32_FLOAT: break; + case PIPE_FORMAT_S8Z24_UNORM: buf = icon_get("s8z24", p); break; + case PIPE_FORMAT_Z24S8_UNORM: buf = icon_get("z24s8", p); break; + case PIPE_FORMAT_X8Z24_UNORM: buf = icon_get("x8z24", p); break; + case PIPE_FORMAT_Z24X8_UNORM: buf = icon_get("z24x8", p); break; + case PIPE_FORMAT_S8_UNORM: break; + case PIPE_FORMAT_R64_FLOAT: break; + case PIPE_FORMAT_R64G64_FLOAT: break; + case PIPE_FORMAT_R64G64B64_FLOAT: buf = icon_get("rgb", p); break; + case PIPE_FORMAT_R64G64B64A64_FLOAT: buf = icon_get("rgba", p); break; + case PIPE_FORMAT_R32_FLOAT: break; + case PIPE_FORMAT_R32G32_FLOAT: break; + case PIPE_FORMAT_R32G32B32_FLOAT: buf = icon_get("rgb", p); break; + case PIPE_FORMAT_R32G32B32A32_FLOAT: buf = icon_get("rgba", p); break; + case PIPE_FORMAT_R32_UNORM: break; + case PIPE_FORMAT_R32G32_UNORM: break; + case PIPE_FORMAT_R32G32B32_UNORM: buf = icon_get("rgb", p); break; + case PIPE_FORMAT_R32G32B32A32_UNORM: buf = icon_get("rgba", p); break; + case PIPE_FORMAT_R32_USCALED: break; + case PIPE_FORMAT_R32G32_USCALED: break; + case PIPE_FORMAT_R32G32B32_USCALED: buf = icon_get("rgb", p); break; + case PIPE_FORMAT_R32G32B32A32_USCALED: buf = icon_get("rgba", p); break; + case PIPE_FORMAT_R32_SNORM: break; + case PIPE_FORMAT_R32G32_SNORM: break; + case PIPE_FORMAT_R32G32B32_SNORM: buf = icon_get("rgb", p); break; + case PIPE_FORMAT_R32G32B32A32_SNORM: buf = icon_get("rgba", p); break; + case PIPE_FORMAT_R32_SSCALED: break; + case PIPE_FORMAT_R32G32_SSCALED: break; + case PIPE_FORMAT_R32G32B32_SSCALED: buf = icon_get("rgb", p); break; + case PIPE_FORMAT_R32G32B32A32_SSCALED: buf = icon_get("rgba", p); break; + case PIPE_FORMAT_R16_UNORM: break; + case PIPE_FORMAT_R16G16_UNORM: break; + case PIPE_FORMAT_R16G16B16_UNORM: buf = icon_get("rgb", p); break; + case PIPE_FORMAT_R16G16B16A16_UNORM: buf = icon_get("rgba", p); break; + case PIPE_FORMAT_R16_USCALED: break; + case PIPE_FORMAT_R16G16_USCALED: break; + case PIPE_FORMAT_R16G16B16_USCALED: buf = icon_get("rgb", p); break; + case PIPE_FORMAT_R16G16B16A16_USCALED: buf = icon_get("rgba", p); break; + case PIPE_FORMAT_R16_SNORM: break; + case PIPE_FORMAT_R16G16_SNORM: break; + case PIPE_FORMAT_R16G16B16_SNORM: buf = icon_get("rgb", p); break; + case PIPE_FORMAT_R16G16B16A16_SNORM: buf = icon_get("rgba", p); break; + case PIPE_FORMAT_R16_SSCALED: break; + case PIPE_FORMAT_R16G16_SSCALED: break; + case PIPE_FORMAT_R16G16B16_SSCALED: buf = icon_get("rgb", p); break; + case PIPE_FORMAT_R16G16B16A16_SSCALED: buf = icon_get("rgba", p); break; + case PIPE_FORMAT_R8_UNORM: break; + case PIPE_FORMAT_R8G8_UNORM: break; + case PIPE_FORMAT_R8G8B8_UNORM: buf = icon_get("rgb", p); break; + case PIPE_FORMAT_R8G8B8A8_UNORM: buf = icon_get("rgba", p); break; + case PIPE_FORMAT_R8G8B8X8_UNORM: buf = icon_get("rgbx", p); break; + case PIPE_FORMAT_R8_USCALED: break; + case PIPE_FORMAT_R8G8_USCALED: break; + case PIPE_FORMAT_R8G8B8_USCALED: buf = icon_get("rgb", p); break; + case PIPE_FORMAT_R8G8B8A8_USCALED: buf = icon_get("rgba", p); break; + case PIPE_FORMAT_R8G8B8X8_USCALED: buf = icon_get("rgbx", p); break; + case PIPE_FORMAT_R8_SNORM: break; + case PIPE_FORMAT_R8G8_SNORM: break; + case PIPE_FORMAT_R8G8B8_SNORM: buf = icon_get("rgb", p); break; + case PIPE_FORMAT_R8G8B8A8_SNORM: buf = icon_get("rgba", p); break; + case PIPE_FORMAT_R8G8B8X8_SNORM: buf = icon_get("rgbx", p); break; + case PIPE_FORMAT_B6G5R5_SNORM: buf = icon_get("bgr", p); break; + case PIPE_FORMAT_A8B8G8R8_SNORM: buf = icon_get("abgr", p); break; + case PIPE_FORMAT_X8B8G8R8_SNORM: buf = icon_get("xbgr", p); break; + case PIPE_FORMAT_R8_SSCALED: break; + case PIPE_FORMAT_R8G8_SSCALED: break; + case PIPE_FORMAT_R8G8B8_SSCALED: buf = icon_get("rgb", p); break; + case PIPE_FORMAT_R8G8B8A8_SSCALED: buf = icon_get("rgba", p); break; + case PIPE_FORMAT_R8G8B8X8_SSCALED: buf = icon_get("rgbx", p); break; + case PIPE_FORMAT_R32_FIXED: break; + case PIPE_FORMAT_R32G32_FIXED: break; + case PIPE_FORMAT_R32G32B32_FIXED: buf = icon_get("rgb", p); break; + case PIPE_FORMAT_R32G32B32A32_FIXED: buf = icon_get("rgba", p); break; + case PIPE_FORMAT_L8_SRGB: break; + case PIPE_FORMAT_A8L8_SRGB: break; + case PIPE_FORMAT_R8G8B8_SRGB: buf = icon_get("rgb", p); break; + case PIPE_FORMAT_R8G8B8A8_SRGB: buf = icon_get("rgba", p); break; + case PIPE_FORMAT_R8G8B8X8_SRGB: buf = icon_get("rgbx", p); break; + case PIPE_FORMAT_A8R8G8B8_SRGB: buf = icon_get("argb", p); break; + case PIPE_FORMAT_X8R8G8B8_SRGB: buf = icon_get("xrgb", p); break; + case PIPE_FORMAT_B8G8R8A8_SRGB: break; + case PIPE_FORMAT_B8G8R8X8_SRGB: break; + case PIPE_FORMAT_X8UB8UG8SR8S_NORM: buf = icon_get("xbgr", p); break; + case PIPE_FORMAT_B6UG5SR5S_NORM: buf = icon_get("bgr", p); break; + case PIPE_FORMAT_DXT1_RGB: buf = icon_get("dxt1_rgb", p); break; + case PIPE_FORMAT_DXT1_RGBA: buf = icon_get("dxt1_rgba", p); break; + case PIPE_FORMAT_DXT3_RGBA: buf = icon_get("dxt3_rgba", p); break; + case PIPE_FORMAT_DXT5_RGBA: buf = icon_get("dxt5_rgba", p); break; + case PIPE_FORMAT_DXT1_SRGB: buf = icon_get("dxt1_rgb", p); break; + case PIPE_FORMAT_DXT1_SRGBA: buf = icon_get("dxt1_rgba", p); break; + case PIPE_FORMAT_DXT3_SRGBA: buf = icon_get("dxt3_rgba", p); break; + case PIPE_FORMAT_DXT5_SRGBA: buf = icon_get("dxt5_rgba", p); break; } snprintf(info_short_string, 64, "%ux%ux%u", info->width[0], info->height[0], info->depth[0]); @@ -501,9 +580,7 @@ static gboolean texture_action_read_info(struct rbug_event *e, action->width = info->width[0]; action->height = info->height[0]; - action->block.width = info->blockw; - action->block.height = info->blockh; - action->block.size = info->blocksize; + action->block_height = info->blockh; action->format = info->format; rbug_send_texture_read(con, action->id, -- 1.6.3.3
From 3c064708b2518a1f45d7f23cab88ed5fb5e31cee Mon Sep 17 00:00:00 2001 From: Mike Stroyan <m...@pavilion.stroyan> Date: Fri, 8 Jan 2010 11:29:20 -0700 Subject: [PATCH 3/5] Add new icons for pipe formats. --- res/a.png | Bin 0 -> 100 bytes res/abgr.png | Bin 0 -> 109 bytes res/al.png | Bin 0 -> 198 bytes res/bgra.png | Bin 0 -> 104 bytes res/bgrx.png | Bin 0 -> 103 bytes res/i.png | Bin 0 -> 270 bytes res/l.png | Bin 0 -> 249 bytes res/r.png | Bin 0 -> 99 bytes res/rg.png | Bin 0 -> 104 bytes res/s.png | Bin 0 -> 99 bytes res/ycbcr.png | Bin 0 -> 223 bytes res/ycbcr_rev.png | Bin 0 -> 229 bytes res/z.png | Bin 0 -> 117 bytes src/main.c | 16 +++++++++ src/texture.c | 98 ++++++++++++++++++++++++++--------------------------- 15 files changed, 64 insertions(+), 50 deletions(-) create mode 100644 res/a.png create mode 100644 res/abgr.png create mode 100644 res/al.png create mode 100644 res/bgra.png create mode 100644 res/bgrx.png create mode 100644 res/i.png create mode 100644 res/l.png create mode 100644 res/r.png create mode 100644 res/rg.png create mode 100644 res/s.png create mode 100644 res/ycbcr.png create mode 100644 res/ycbcr_rev.png create mode 100644 res/z.png diff --git a/res/a.png b/res/a.png new file mode 100644 index 0000000000000000000000000000000000000000..82695d2cba0ad9eb04bf712e8bc1ab539bb9000e GIT binary patch literal 100 zcm...@n?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|<UCy*Lo7}w v|M~y_e?1!)gD`Vz!j*<VW;b359iX1<Q!FySZ_GXpRLS7!>gTe~DWM4fjz1eX literal 0 HcmV?d00001 diff --git a/res/abgr.png b/res/abgr.png new file mode 100644 index 0000000000000000000000000000000000000000..026cfe49fab8a67f30120bb98cb240587c5c99bc GIT binary patch literal 109 zcm...@n?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|)ID7sLo7}w z|M~y_e?6PZffFYhxc(VGdTeB17{KAiD`A>&rQu)_1B0V2n;b*?#...@44$rjf6*2u Fng9*3AYcFh literal 0 HcmV?d00001 diff --git a/res/al.png b/res/al.png new file mode 100644 index 0000000000000000000000000000000000000000..4cfc8f2b61f12de10337b9f5215e0da35e4a83c7 GIT binary patch literal 198 zcm...@n?(olHy`uVBq!ia0vp^0wB!61SBU+%rFB|jKx9jP7LeL$-D$|8a!PbLp08B zo#e>JtjNQhzU1HkmD&gG4%oJAn%-)=<tt}Ej*Pn6L%!pR4IC^>xZ-s#{QmnppHov` z-ri17NF<Fv;abbJwk3)U0wuo>hs;+upLXut)a_?Z-?|jOv8{tqo->r|<cV_MjOkgd vQH*OipGU|kZqEE({NuCU)@-J$<qvs-;@t9<1SBm6x`n~h)z4*}Q$iB}KrTm? literal 0 HcmV?d00001 diff --git a/res/bgra.png b/res/bgra.png new file mode 100644 index 0000000000000000000000000000000000000000..d986d06c260f59fedc76a357f135bab681b92e61 GIT binary patch literal 104 zcm...@n?(olHy`uVBq!ia0vp^0wB!61SBU+%rFB|jKx9jP7LeL$-D$|lssJ=Lp07O zrzHG1&%pj)a-*T7#6RUL28I(j+)R72B&?(uSov9H->(e...@nasyk>gTe~DWM4fpS2m@ literal 0 HcmV?d00001 diff --git a/res/bgrx.png b/res/bgrx.png new file mode 100644 index 0000000000000000000000000000000000000000..561228d7f0f7ffbf6394fbddb3302222afcfdaaf GIT binary patch literal 103 zcm...@n?(olHy`uVBq!ia0vp^0wB!61SBU+%rFB|jKx9jP7LeL$-D$|6g^!WLp07O zrzHG1&%pj)a-*T-gc&?OJSt6ryo;sU`q&t(ikth=cb9kp6*g9c`nj...@xnagh3hr literal 0 HcmV?d00001 diff --git a/res/i.png b/res/i.png new file mode 100644 index 0000000000000000000000000000000000000000..741fbeb26c4119264683ab3a623153381ce9c7f3 GIT binary patch literal 270 zcmV+p0rCEcP)<h;3K|Lk000e1NJLTq000mG000mO0ssI2kdbIM00001b5ch_0Itp) z=>Px#$Vo&&R4C7tlF_ciAPhr~CI0_AcVF?|y...@wejwn29vykw|vC&7CBJqQ3|ZN7yd z3{m~m...@oz1bo}gn-gk`%mbu7kiwp03y`jjcbtsk0f<v-S<sxf+?aq...@p(jY-1 z=?FkBvcpf8oCGOsv(@hq)k0x-&L$B=(n4{OD~1pl(?+{7Wwl=bQQREKH6``c1gfU{ z=TtasOG*MrM`2H`wH94XNhG=z@@a1...@d~w4cwg660y-r$w&{vu>J?Zg`9E0uBhE Ur?y?T>Hq)$07*qoM6N<$g5RTSfdBvi literal 0 HcmV?d00001 diff --git a/res/l.png b/res/l.png new file mode 100644 index 0000000000000000000000000000000000000000..d1386e36c231a6e34502409bf556cc70ca648591 GIT binary patch literal 249 zcmV<V00#ewP)<h;3K|Lk000e1NJLTq000mG000mO0ssI2kdbIM00001b5ch_0Itp) z=>Px#vq?ljR4C7#l1mPRFbqSVrQZLhEC>hiEZh$RLTJVkP}($cUaM^*Qh&f0=BxmN zumRdpSe!y$)b`>hwY|c#x*...@fng@BU+6L%CazMn3h(W%(tqMOvtOw;LsDLu0*T- z>M}*}WVYz(Y-!Q;`OD?!w&9gh?O4O`KylUVP{Ddb5nL-2?9R8<@!ekx3!Sod(BN1~ zM5x*83fXJ_O!i09_1x>@<?}k!45sOvK>Ch8Dm`a(M?M!}00000NkvXXu0mjfJV$Tz literal 0 HcmV?d00001 diff --git a/res/r.png b/res/r.png new file mode 100644 index 0000000000000000000000000000000000000000..0adcfae366d75035ab72c16b17d606912b69904a GIT binary patch literal 99 zcm...@n?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|WIbIRLo7}w v|2co)!~90314ks...@~pgz2oubu%(V<TA;*Ze8*NsF1<a)z4*}Q$iB}nMWJR literal 0 HcmV?d00001 diff --git a/res/rg.png b/res/rg.png new file mode 100644 index 0000000000000000000000000000000000000000..82bfc944d0b95cf835bb7e2e2035df5af8ae7e17 GIT binary patch literal 104 zcm...@n?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|lssJ=Lo7}w z|2co)!+b{mgd^Ig4;(n+peSLQaHS!TnXQ|v!...@9a{;4Do{0pr>mdKI;Vst05$6! A1poj5 literal 0 HcmV?d00001 diff --git a/res/s.png b/res/s.png new file mode 100644 index 0000000000000000000000000000000000000000..34f554f4ad0bc92aaa6b3caf8456779bad8a53ab GIT binary patch literal 99 zcm...@n?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|WIbIRLo7}w vr~LT;-=3MZp|jD+AnU*i#>H$rV$2K)bD3oy+~|D*RLJ1z>gTe~DWM4feKQ+r literal 0 HcmV?d00001 diff --git a/res/ycbcr.png b/res/ycbcr.png new file mode 100644 index 0000000000000000000000000000000000000000..411ff39388b896d65a05e1e7895c39e08cdc7686 GIT binary patch literal 223 zcm...@n?(olHy`uVBq!ia0vp^0wB!61SBU+%rFB|jKx9jP7LeL$-D$|W_r3fhG?9h zI?<5tumKNqf5ZGs3%%R<{(8nmKGBTbRiZIr`v&L7M<&i...@g-%|B-L|Cj^Erbj1S_M zD&5eP*#4$fN^5$E`TELAmm{Y4_szS_*p~Gp&Hnj`_dZ$cqzXTp+MaqQ*ZF+moWAvs z-nF%4?PTVN-M~MWYyOgj(HCys6u)*(weg3...@ivs_~3i24y~rcwifm>#_pF|FB!d WS)EyYrzRHYNCr<=KbLh*2~7awB3O$6 literal 0 HcmV?d00001 diff --git a/res/ycbcr_rev.png b/res/ycbcr_rev.png new file mode 100644 index 0000000000000000000000000000000000000000..cccdfd652959d1c167e60c4cad0b801fb89c211a GIT binary patch literal 229 zcm...@n?(olHy`uVBq!ia0vp^0wB!61SBU+%rFB|jKx9jP7LeL$-D$|=6kw0hG?9h zI?0jmumTUuanbn9^=Ff3g>S1rX<5s2o7ti%DM-{cW5XG%xSU7(rzS8SsIj-JT5+6( z-#)%=iCNsiBX%o<ucc...@1??$=mao=a&yTPEwPeRJz|;7uVSNO<cPCuhFt>yNzyj zXWp9Ld-Wx%n)^E|Z?4|$e+6=tr!n$mdh4y=o0blmisskh_hwrb*m...@~na-4^dv9 d>%1?Eyv{X`$*LW5-U6M<;OXk;v...@?2>_hNTp|Df literal 0 HcmV?d00001 diff --git a/res/z.png b/res/z.png new file mode 100644 index 0000000000000000000000000000000000000000..00280443c87352704e4394c240aa2b8e8133b211 GIT binary patch literal 117 zcm...@n?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|*pj^6T^Rm@ z;DWu&Cj&)fJzX3_EKVo?Isf6mJu_=VXQPur)`1m_i...@m>Cl1Fv}XIELa9q$l&Sf K=d#Wzp$P!BzadQk literal 0 HcmV?d00001 diff --git a/src/main.c b/src/main.c index 830b309..7423023 100644 --- a/src/main.c +++ b/src/main.c @@ -292,6 +292,22 @@ static void icon_setup(struct program *p) icon_add("res/dxt3_rgba.png", "dxt3_rgba", p); icon_add("res/dxt5_rgba.png", "dxt5_rgba", p); + icon_add("res/a.png", "a", p); + icon_add("res/i.png", "i", p); + icon_add("res/z.png", "z", p); + icon_add("res/s.png", "s", p); + + icon_add("res/r.png", "r", p); + icon_add("res/rg.png", "rg", p); + + icon_add("res/bgra.png", "bgra", p); + icon_add("res/bgrx.png", "bgrx", p); + icon_add("res/abgr.png", "abgr", p); + icon_add("res/xbgr.png", "xbgr", p); + + icon_add("res/ycbcr.png", "ycbcr", p); + icon_add("res/ycbcr_rev.png", "ycbcr_rev", p); + icon_add("res/screen.png", "screen", p); icon_add("res/shader_on_normal.png", "shader_on_normal", p); diff --git a/src/texture.c b/src/texture.c index 6553acc..0f21620 100644 --- a/src/texture.c +++ b/src/texture.c @@ -438,7 +438,6 @@ static gboolean texture_action_read_info(struct rbug_event *e, char info_short_string[64]; char info_long_string[128]; GdkPixbuf *buf = NULL; - const struct util_format_description *format_description; info = (struct rbug_proto_texture_info_reply *)header; action = (struct texture_action_read *)e; @@ -451,109 +450,108 @@ static gboolean texture_action_read_info(struct rbug_event *e, goto error; } - format_description = util_format_description(info->format); switch (info->format) { case PIPE_FORMAT_NONE: break; case PIPE_FORMAT_A8R8G8B8_UNORM: buf = icon_get("argb", p); break; case PIPE_FORMAT_X8R8G8B8_UNORM: buf = icon_get("xrgb", p); break; - case PIPE_FORMAT_B8G8R8A8_UNORM: break; - case PIPE_FORMAT_B8G8R8X8_UNORM: break; + case PIPE_FORMAT_B8G8R8A8_UNORM: buf = icon_get("bgra", p); break; + case PIPE_FORMAT_B8G8R8X8_UNORM: buf = icon_get("bgrx", p); break; case PIPE_FORMAT_A1R5G5B5_UNORM: buf = icon_get("argb", p); break; case PIPE_FORMAT_A4R4G4B4_UNORM: buf = icon_get("argb", p); break; case PIPE_FORMAT_R5G6B5_UNORM: buf = icon_get("rgb", p); break; - case PIPE_FORMAT_A2B10G10R10_UNORM: break; - case PIPE_FORMAT_L8_UNORM: break; - case PIPE_FORMAT_A8_UNORM: break; - case PIPE_FORMAT_I8_UNORM: break; - case PIPE_FORMAT_A8L8_UNORM: break; - case PIPE_FORMAT_L16_UNORM: break; - case PIPE_FORMAT_YCBCR: break; - case PIPE_FORMAT_YCBCR_REV: break; - case PIPE_FORMAT_Z16_UNORM: break; - case PIPE_FORMAT_Z32_UNORM: break; - case PIPE_FORMAT_Z32_FLOAT: break; + case PIPE_FORMAT_A2B10G10R10_UNORM: buf = icon_get("abgr", p); break; + case PIPE_FORMAT_L8_UNORM: buf = icon_get("l", p); break; + case PIPE_FORMAT_A8_UNORM: buf = icon_get("a", p); break; + case PIPE_FORMAT_I8_UNORM: buf = icon_get("i", p); break; + case PIPE_FORMAT_A8L8_UNORM: buf = icon_get("al", p); break; + case PIPE_FORMAT_L16_UNORM: buf = icon_get("l", p); break; + case PIPE_FORMAT_YCBCR: buf = icon_get("ycbr", p); break; + case PIPE_FORMAT_YCBCR_REV: buf = icon_get("ycbr_rev", p); break; + case PIPE_FORMAT_Z16_UNORM: buf = icon_get("z", p); break; + case PIPE_FORMAT_Z32_UNORM: buf = icon_get("z", p); break; + case PIPE_FORMAT_Z32_FLOAT: buf = icon_get("z", p); break; case PIPE_FORMAT_S8Z24_UNORM: buf = icon_get("s8z24", p); break; case PIPE_FORMAT_Z24S8_UNORM: buf = icon_get("z24s8", p); break; case PIPE_FORMAT_X8Z24_UNORM: buf = icon_get("x8z24", p); break; case PIPE_FORMAT_Z24X8_UNORM: buf = icon_get("z24x8", p); break; - case PIPE_FORMAT_S8_UNORM: break; - case PIPE_FORMAT_R64_FLOAT: break; - case PIPE_FORMAT_R64G64_FLOAT: break; + case PIPE_FORMAT_S8_UNORM: buf = icon_get("s", p); break; + case PIPE_FORMAT_R64_FLOAT: buf = icon_get("r", p); break; + case PIPE_FORMAT_R64G64_FLOAT: buf = icon_get("rg", p); break; case PIPE_FORMAT_R64G64B64_FLOAT: buf = icon_get("rgb", p); break; case PIPE_FORMAT_R64G64B64A64_FLOAT: buf = icon_get("rgba", p); break; - case PIPE_FORMAT_R32_FLOAT: break; - case PIPE_FORMAT_R32G32_FLOAT: break; + case PIPE_FORMAT_R32_FLOAT: buf = icon_get("r", p); break; + case PIPE_FORMAT_R32G32_FLOAT: buf = icon_get("rg", p); break; case PIPE_FORMAT_R32G32B32_FLOAT: buf = icon_get("rgb", p); break; case PIPE_FORMAT_R32G32B32A32_FLOAT: buf = icon_get("rgba", p); break; - case PIPE_FORMAT_R32_UNORM: break; - case PIPE_FORMAT_R32G32_UNORM: break; + case PIPE_FORMAT_R32_UNORM: buf = icon_get("r", p); break; + case PIPE_FORMAT_R32G32_UNORM: buf = icon_get("rg", p); break; case PIPE_FORMAT_R32G32B32_UNORM: buf = icon_get("rgb", p); break; case PIPE_FORMAT_R32G32B32A32_UNORM: buf = icon_get("rgba", p); break; - case PIPE_FORMAT_R32_USCALED: break; - case PIPE_FORMAT_R32G32_USCALED: break; + case PIPE_FORMAT_R32_USCALED: buf = icon_get("r", p); break; + case PIPE_FORMAT_R32G32_USCALED: buf = icon_get("rg", p); break; case PIPE_FORMAT_R32G32B32_USCALED: buf = icon_get("rgb", p); break; case PIPE_FORMAT_R32G32B32A32_USCALED: buf = icon_get("rgba", p); break; - case PIPE_FORMAT_R32_SNORM: break; - case PIPE_FORMAT_R32G32_SNORM: break; + case PIPE_FORMAT_R32_SNORM: buf = icon_get("r", p); break; + case PIPE_FORMAT_R32G32_SNORM: buf = icon_get("rg", p); break; case PIPE_FORMAT_R32G32B32_SNORM: buf = icon_get("rgb", p); break; case PIPE_FORMAT_R32G32B32A32_SNORM: buf = icon_get("rgba", p); break; - case PIPE_FORMAT_R32_SSCALED: break; - case PIPE_FORMAT_R32G32_SSCALED: break; + case PIPE_FORMAT_R32_SSCALED: buf = icon_get("r", p); break; + case PIPE_FORMAT_R32G32_SSCALED: buf = icon_get("rg", p); break; case PIPE_FORMAT_R32G32B32_SSCALED: buf = icon_get("rgb", p); break; case PIPE_FORMAT_R32G32B32A32_SSCALED: buf = icon_get("rgba", p); break; - case PIPE_FORMAT_R16_UNORM: break; - case PIPE_FORMAT_R16G16_UNORM: break; + case PIPE_FORMAT_R16_UNORM: buf = icon_get("r", p); break; + case PIPE_FORMAT_R16G16_UNORM: buf = icon_get("rg", p); break; case PIPE_FORMAT_R16G16B16_UNORM: buf = icon_get("rgb", p); break; case PIPE_FORMAT_R16G16B16A16_UNORM: buf = icon_get("rgba", p); break; - case PIPE_FORMAT_R16_USCALED: break; - case PIPE_FORMAT_R16G16_USCALED: break; + case PIPE_FORMAT_R16_USCALED: buf = icon_get("r", p); break; + case PIPE_FORMAT_R16G16_USCALED: buf = icon_get("rg", p); break; case PIPE_FORMAT_R16G16B16_USCALED: buf = icon_get("rgb", p); break; case PIPE_FORMAT_R16G16B16A16_USCALED: buf = icon_get("rgba", p); break; - case PIPE_FORMAT_R16_SNORM: break; - case PIPE_FORMAT_R16G16_SNORM: break; + case PIPE_FORMAT_R16_SNORM: buf = icon_get("r", p); break; + case PIPE_FORMAT_R16G16_SNORM: buf = icon_get("rg", p); break; case PIPE_FORMAT_R16G16B16_SNORM: buf = icon_get("rgb", p); break; case PIPE_FORMAT_R16G16B16A16_SNORM: buf = icon_get("rgba", p); break; - case PIPE_FORMAT_R16_SSCALED: break; - case PIPE_FORMAT_R16G16_SSCALED: break; + case PIPE_FORMAT_R16_SSCALED: buf = icon_get("r", p); break; + case PIPE_FORMAT_R16G16_SSCALED: buf = icon_get("rg", p); break; case PIPE_FORMAT_R16G16B16_SSCALED: buf = icon_get("rgb", p); break; case PIPE_FORMAT_R16G16B16A16_SSCALED: buf = icon_get("rgba", p); break; - case PIPE_FORMAT_R8_UNORM: break; - case PIPE_FORMAT_R8G8_UNORM: break; + case PIPE_FORMAT_R8_UNORM: buf = icon_get("r", p); break; + case PIPE_FORMAT_R8G8_UNORM: buf = icon_get("rg", p); break; case PIPE_FORMAT_R8G8B8_UNORM: buf = icon_get("rgb", p); break; case PIPE_FORMAT_R8G8B8A8_UNORM: buf = icon_get("rgba", p); break; case PIPE_FORMAT_R8G8B8X8_UNORM: buf = icon_get("rgbx", p); break; - case PIPE_FORMAT_R8_USCALED: break; - case PIPE_FORMAT_R8G8_USCALED: break; + case PIPE_FORMAT_R8_USCALED: buf = icon_get("r", p); break; + case PIPE_FORMAT_R8G8_USCALED: buf = icon_get("rg", p); break; case PIPE_FORMAT_R8G8B8_USCALED: buf = icon_get("rgb", p); break; case PIPE_FORMAT_R8G8B8A8_USCALED: buf = icon_get("rgba", p); break; case PIPE_FORMAT_R8G8B8X8_USCALED: buf = icon_get("rgbx", p); break; - case PIPE_FORMAT_R8_SNORM: break; - case PIPE_FORMAT_R8G8_SNORM: break; + case PIPE_FORMAT_R8_SNORM: buf = icon_get("r", p); break; + case PIPE_FORMAT_R8G8_SNORM: buf = icon_get("rg", p); break; case PIPE_FORMAT_R8G8B8_SNORM: buf = icon_get("rgb", p); break; case PIPE_FORMAT_R8G8B8A8_SNORM: buf = icon_get("rgba", p); break; case PIPE_FORMAT_R8G8B8X8_SNORM: buf = icon_get("rgbx", p); break; case PIPE_FORMAT_B6G5R5_SNORM: buf = icon_get("bgr", p); break; case PIPE_FORMAT_A8B8G8R8_SNORM: buf = icon_get("abgr", p); break; case PIPE_FORMAT_X8B8G8R8_SNORM: buf = icon_get("xbgr", p); break; - case PIPE_FORMAT_R8_SSCALED: break; - case PIPE_FORMAT_R8G8_SSCALED: break; + case PIPE_FORMAT_R8_SSCALED: buf = icon_get("r", p); break; + case PIPE_FORMAT_R8G8_SSCALED: buf = icon_get("rg", p); break; case PIPE_FORMAT_R8G8B8_SSCALED: buf = icon_get("rgb", p); break; case PIPE_FORMAT_R8G8B8A8_SSCALED: buf = icon_get("rgba", p); break; case PIPE_FORMAT_R8G8B8X8_SSCALED: buf = icon_get("rgbx", p); break; - case PIPE_FORMAT_R32_FIXED: break; - case PIPE_FORMAT_R32G32_FIXED: break; + case PIPE_FORMAT_R32_FIXED: buf = icon_get("r", p); break; + case PIPE_FORMAT_R32G32_FIXED: buf = icon_get("rg", p); break; case PIPE_FORMAT_R32G32B32_FIXED: buf = icon_get("rgb", p); break; case PIPE_FORMAT_R32G32B32A32_FIXED: buf = icon_get("rgba", p); break; - case PIPE_FORMAT_L8_SRGB: break; - case PIPE_FORMAT_A8L8_SRGB: break; + case PIPE_FORMAT_L8_SRGB: buf = icon_get("l", p); break; + case PIPE_FORMAT_A8L8_SRGB: buf = icon_get("al", p); break; case PIPE_FORMAT_R8G8B8_SRGB: buf = icon_get("rgb", p); break; case PIPE_FORMAT_R8G8B8A8_SRGB: buf = icon_get("rgba", p); break; case PIPE_FORMAT_R8G8B8X8_SRGB: buf = icon_get("rgbx", p); break; case PIPE_FORMAT_A8R8G8B8_SRGB: buf = icon_get("argb", p); break; case PIPE_FORMAT_X8R8G8B8_SRGB: buf = icon_get("xrgb", p); break; - case PIPE_FORMAT_B8G8R8A8_SRGB: break; - case PIPE_FORMAT_B8G8R8X8_SRGB: break; + case PIPE_FORMAT_B8G8R8A8_SRGB: buf = icon_get("bgra", p); break; + case PIPE_FORMAT_B8G8R8X8_SRGB: buf = icon_get("bgrx", p); break; case PIPE_FORMAT_X8UB8UG8SR8S_NORM: buf = icon_get("xbgr", p); break; case PIPE_FORMAT_B6UG5SR5S_NORM: buf = icon_get("bgr", p); break; case PIPE_FORMAT_DXT1_RGB: buf = icon_get("dxt1_rgb", p); break; -- 1.6.3.3
From e5d95c99177bc6ec187f99f57df192f0da36ce5b Mon Sep 17 00:00:00 2001 From: Mike Stroyan <m...@pavilion.stroyan> Date: Fri, 8 Jan 2010 11:30:08 -0700 Subject: [PATCH 4/5] Fix icon file name for "bgr" format. --- src/main.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/main.c b/src/main.c index 7423023..cf3474e 100644 --- a/src/main.c +++ b/src/main.c @@ -285,7 +285,7 @@ static void icon_setup(struct program *p) icon_add("res/z24x8.png", "z24x8", p); icon_add("res/rgb.png", "rgb", p); - icon_add("res/rgb.png", "bgr", p); + icon_add("res/bgr.png", "bgr", p); icon_add("res/dxt1_rgb.png", "dxt1_rgb", p); icon_add("res/dxt1_rgba.png", "dxt1_rgba", p); -- 1.6.3.3
From e1da258a4814bc76973c38670e8735e998150fdb Mon Sep 17 00:00:00 2001 From: Mike Stroyan <m...@pavilion.stroyan> Date: Fri, 8 Jan 2010 11:31:13 -0700 Subject: [PATCH 5/5] Remove "#if 0" code using old pf_* functions. --- src/texture.c | 52 ---------------------------------------------------- 1 files changed, 0 insertions(+), 52 deletions(-) diff --git a/src/texture.c b/src/texture.c index 0f21620..100d6d8 100644 --- a/src/texture.c +++ b/src/texture.c @@ -254,58 +254,6 @@ static void texture_action_read_clean(struct texture_action_read *action, static void texture_action_read_upload(struct texture_action_read *action, struct program *p) { -#if 0 - GLint format, internal_format, type; - unsigned needed_stride; - uint32_t w, h, i; - - if (!action) - return; - - w = action->width; - h = action->height; - - if (action->block.size != 4) - return; - - if (pf_has_alpha(action->format)) { - internal_format = 4; - format = GL_BGRA; - type = GL_UNSIGNED_INT_8_8_8_8_REV; - } else { - internal_format = 3; - format = GL_BGR; - type = GL_UNSIGNED_INT_8_8_8_8_REV; - } - - needed_stride = pf_get_nblocksx(&action->block, w) * action->block.size; - - if (action->stride % action->block.size) - g_print("warning stride not mupltiple of block.size\n"); - if (w % action->block.width) - g_print("warning width not multiple of block.width\n"); - if (h % action->block.height) - g_print("warning height not multiple of block.height\n"); - - /* bad stride */ - if (action->stride > needed_stride) { - glTexImage2D(GL_TEXTURE_2D, 0, internal_format, - w, h, 0, - format, type, NULL); - - for (i = 0; i < h; i += action->block.height) { - glTexSubImage2D(GL_TEXTURE_2D, 0, - 0, i, w, action->block.height, - format, type, action->data + action->stride * i); - } - } else if (action->stride == needed_stride) { - glTexImage2D(GL_TEXTURE_2D, 0, internal_format, - w, h, 0, - format, type, action->data); - } else { - g_assert(0); - } -#endif GLint internal_format; uint32_t w, h; uint32_t src_stride; -- 1.6.3.3
------------------------------------------------------------------------------ This SF.Net email is sponsored by the Verizon Developer Community Take advantage of Verizon's best-in-class app development support A streamlined, 14 day to market process makes app distribution fast and easy Join now and get one step closer to millions of Verizon customers http://p.sf.net/sfu/verizon-dev2dev
_______________________________________________ Mesa3d-dev mailing list Mesa3d-dev@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mesa3d-dev