On Mon, Aug 6, 2018 at 11:05 PM Henri Verbeet hverbeet@codeweavers.com wrote:
From: Connor McAdams conmanx360@gmail.com
/* Note that uploading 3D textures may require quite some address
* space; it may make sense to upload them per-slice instead. */
I think Connor wrote (but probably didn't send) a version of this patch doing exactly that. Actually IIRC that was necessary to avoid running out of address space in Halo Online. Connor, do you want to prepare a followup patch to improve on that?
Tiny nitpick:
+static void build_dxtn_alpha_table(BYTE alpha0, BYTE alpha1, BYTE alpha_table[8]) +{
- unsigned int i;
- alpha_table[0] = alpha0;
- alpha_table[1] = alpha1;
- if (alpha0 > alpha1)
- {
for (i = 0; i < 6; ++i)
{
alpha_table[2 + i] = ((6 - i) * alpha0 + (i + 1) * alpha1) / 7;
}
return;
- }
- else
- {
for (i = 0; i < 4; ++i)
{
alpha_table[2 + i] = ((4 - i) * alpha0 + (i + 1) * alpha1) / 5;
}
alpha_table[6] = 0x00;
alpha_table[7] = 0xff;
- }
+}
Technically this is DXT5 / BC3 only, the function name could reflect that.