<value name="all samples" value="3"/>
</enum>
+ <enum name="Internal Type" prefix="V3D_INTERNAL_TYPE">
+ <value name="8i" value="0"/>
+ <value name="8ui" value="1"/>
+ <value name="8" value="2"/>
+ <value name="16i" value="4"/>
+ <value name="16ui" value="5"/>
+ <value name="16f" value="6"/>
+ <value name="32i" value="8"/>
+ <value name="32ui" value="9"/>
+ <value name="32f" value="10"/>
+ </enum>
+
+ <enum name="Internal BPP" prefix="V3D_INTERNAL_BPP">
+ <value name="32" value="0"/>
+ <value name="64" value="1"/>
+ <value name="128" value="2"/>
+ </enum>
+
+ <enum name="Internal Depth Type" prefix="V3D_INTERNAL_TYPE">
+ <value name="depth_32f" value="0"/>
+ <value name="depth_24" value="1"/>
+ <value name="depth_16" value="2"/>
+ </enum>
+
<enum name="Output Image Format" prefix="V3D_OUTPUT_IMAGE_FORMAT">
<!--
Formats appear with their channels named from the low bits to
<field name="Double-buffer in non-ms mode" size="1" start="63" type="bool"/>
<field name="Multisample Mode (4x)" size="1" start="62" type="bool"/>
- <field name="Maximum BPP of all render targets" size="2" start="60" type="uint">
- <value name="Render target maximum 32bpp" value="0"/>
- <value name="Render target maximum 64bpp" value="1"/>
- <value name="Render target maximum 128bpp" value="2"/>
- </field>
+ <field name="Maximum BPP of all render targets" size="2" start="60" type="Internal BPP"/>
<field name="Number of Render Targets" size="4" start="56" type="uint"/>
<field name="Height (in tiles)" size="12" start="44" type="uint"/>
<field name="Decimate mode" size="2" start="14" type="Decimate Mode"/>
- <field name="Internal Type" size="4" start="10" type="uint" prefix="Internal Type">
- <value name="8i" value="0"/>
- <value name="8ui" value="1"/>
- <value name="8" value="2"/>
- <value name="16i" value="4"/>
- <value name="16ui" value="5"/>
- <value name="16f" value="6"/>
- <value name="32i" value="8"/>
- <value name="32ui" value="9"/>
- <value name="32f" value="10"/>
- </field>
-
- <field name="Internal BPP" size="2" start="8" type="uint" prefix="Internal Bpp">
- <value name="32" value="0"/>
- <value name="64" value="1"/>
- <value name="128" value="2"/>
- </field>
+ <field name="Internal Type" size="4" start="10" type="Internal Type"/>
+ <field name="Internal BPP" size="2" start="8" type="Internal BPP"/>
<field name="Render Target Number" size="4" start="4" type="uint"/>
<field name="sub-id" size="4" start="0" type="uint" default="2"/>
</packet>
<field name="Decimate mode" size="2" start="14" type="uint"/>
- <field name="Internal Type" size="4" start="10" type="uint" prefix="Internal Type">
- <value name="depth_32f" value="0"/>
- <value name="depth_24" value="1"/>
- <value name="depth_16" value="2"/>
- </field>
+ <field name="Internal Type" size="4" start="10" type="Internal Depth Type"/>
<field name="Internal BPP (ignored)" size="2" start="8" type="uint"/>
<!-- selects between Z/Stencil config packet and Separate Stencil packet. -->
}
switch (surf->internal_type) {
- case INTERNAL_TYPE_8:
+ case V3D_INTERNAL_TYPE_8:
if (surf->format == PIPE_FORMAT_B4G4R4A4_UNORM ||
surf->format == PIPE_FORMAT_B4G4R4A4_UNORM) {
/* Our actual hardware layout is ABGR4444, but
}
memcpy(job->clear_color[i], uc.ui, internal_size);
break;
- case INTERNAL_TYPE_8I:
- case INTERNAL_TYPE_8UI:
+ case V3D_INTERNAL_TYPE_8I:
+ case V3D_INTERNAL_TYPE_8UI:
job->clear_color[i][0] = ((uc.ui[0] & 0xff) |
(uc.ui[1] & 0xff) << 8 |
(uc.ui[2] & 0xff) << 16 |
(uc.ui[3] & 0xff) << 24);
break;
- case INTERNAL_TYPE_16F:
+ case V3D_INTERNAL_TYPE_16F:
util_pack_color(color->f, PIPE_FORMAT_R16G16B16A16_FLOAT,
&uc);
memcpy(job->clear_color[i], uc.ui, internal_size);
break;
- case INTERNAL_TYPE_16I:
- case INTERNAL_TYPE_16UI:
+ case V3D_INTERNAL_TYPE_16I:
+ case V3D_INTERNAL_TYPE_16UI:
job->clear_color[i][0] = ((uc.ui[0] & 0xffff) |
uc.ui[1] << 16);
job->clear_color[i][1] = ((uc.ui[2] & 0xffff) |
uc.ui[3] << 16);
break;
- case INTERNAL_TYPE_32F:
- case INTERNAL_TYPE_32I:
- case INTERNAL_TYPE_32UI:
+ case V3D_INTERNAL_TYPE_32F:
+ case V3D_INTERNAL_TYPE_32I:
+ case V3D_INTERNAL_TYPE_32UI:
memcpy(job->clear_color[i], color->ui, internal_size);
break;
}
case V3D_OUTPUT_IMAGE_FORMAT_ABGR4444:
case V3D_OUTPUT_IMAGE_FORMAT_BGR565:
case V3D_OUTPUT_IMAGE_FORMAT_ABGR1555:
- *type = INTERNAL_TYPE_8;
- *bpp = INTERNAL_BPP_32;
+ *type = V3D_INTERNAL_TYPE_8;
+ *bpp = V3D_INTERNAL_BPP_32;
break;
case V3D_OUTPUT_IMAGE_FORMAT_RGBA8I:
case V3D_OUTPUT_IMAGE_FORMAT_RG8I:
case V3D_OUTPUT_IMAGE_FORMAT_R8I:
- *type = INTERNAL_TYPE_8I;
- *bpp = INTERNAL_BPP_32;
+ *type = V3D_INTERNAL_TYPE_8I;
+ *bpp = V3D_INTERNAL_BPP_32;
break;
case V3D_OUTPUT_IMAGE_FORMAT_RGBA8UI:
case V3D_OUTPUT_IMAGE_FORMAT_RG8UI:
case V3D_OUTPUT_IMAGE_FORMAT_R8UI:
- *type = INTERNAL_TYPE_8UI;
- *bpp = INTERNAL_BPP_32;
+ *type = V3D_INTERNAL_TYPE_8UI;
+ *bpp = V3D_INTERNAL_BPP_32;
break;
case V3D_OUTPUT_IMAGE_FORMAT_SRGB8_ALPHA8:
* and the conversion to sRGB happens at tilebuffer
* load/store.
*/
- *type = INTERNAL_TYPE_16F;
- *bpp = INTERNAL_BPP_64;
+ *type = V3D_INTERNAL_TYPE_16F;
+ *bpp = V3D_INTERNAL_BPP_64;
break;
case V3D_OUTPUT_IMAGE_FORMAT_RG16F:
case V3D_OUTPUT_IMAGE_FORMAT_R16F:
- *type = INTERNAL_TYPE_16F;
+ *type = V3D_INTERNAL_TYPE_16F;
/* Use 64bpp to make sure the TLB doesn't throw away the alpha
* channel before alpha test happens.
*/
- *bpp = INTERNAL_BPP_64;
+ *bpp = V3D_INTERNAL_BPP_64;
break;
case V3D_OUTPUT_IMAGE_FORMAT_RGBA16I:
- *type = INTERNAL_TYPE_16I;
- *bpp = INTERNAL_BPP_64;
+ *type = V3D_INTERNAL_TYPE_16I;
+ *bpp = V3D_INTERNAL_BPP_64;
break;
case V3D_OUTPUT_IMAGE_FORMAT_RG16I:
case V3D_OUTPUT_IMAGE_FORMAT_R16I:
- *type = INTERNAL_TYPE_16I;
- *bpp = INTERNAL_BPP_32;
+ *type = V3D_INTERNAL_TYPE_16I;
+ *bpp = V3D_INTERNAL_BPP_32;
break;
case V3D_OUTPUT_IMAGE_FORMAT_RGBA16UI:
- *type = INTERNAL_TYPE_16UI;
- *bpp = INTERNAL_BPP_64;
+ *type = V3D_INTERNAL_TYPE_16UI;
+ *bpp = V3D_INTERNAL_BPP_64;
break;
case V3D_OUTPUT_IMAGE_FORMAT_RG16UI:
case V3D_OUTPUT_IMAGE_FORMAT_R16UI:
- *type = INTERNAL_TYPE_16UI;
- *bpp = INTERNAL_BPP_32;
+ *type = V3D_INTERNAL_TYPE_16UI;
+ *bpp = V3D_INTERNAL_BPP_32;
break;
case V3D_OUTPUT_IMAGE_FORMAT_RGBA32I:
- *type = INTERNAL_TYPE_32I;
- *bpp = INTERNAL_BPP_128;
+ *type = V3D_INTERNAL_TYPE_32I;
+ *bpp = V3D_INTERNAL_BPP_128;
break;
case V3D_OUTPUT_IMAGE_FORMAT_RG32I:
- *type = INTERNAL_TYPE_32I;
- *bpp = INTERNAL_BPP_64;
+ *type = V3D_INTERNAL_TYPE_32I;
+ *bpp = V3D_INTERNAL_BPP_64;
break;
case V3D_OUTPUT_IMAGE_FORMAT_R32I:
- *type = INTERNAL_TYPE_32I;
- *bpp = INTERNAL_BPP_32;
+ *type = V3D_INTERNAL_TYPE_32I;
+ *bpp = V3D_INTERNAL_BPP_32;
break;
case V3D_OUTPUT_IMAGE_FORMAT_RGBA32UI:
- *type = INTERNAL_TYPE_32UI;
- *bpp = INTERNAL_BPP_128;
+ *type = V3D_INTERNAL_TYPE_32UI;
+ *bpp = V3D_INTERNAL_BPP_128;
break;
case V3D_OUTPUT_IMAGE_FORMAT_RG32UI:
- *type = INTERNAL_TYPE_32UI;
- *bpp = INTERNAL_BPP_64;
+ *type = V3D_INTERNAL_TYPE_32UI;
+ *bpp = V3D_INTERNAL_BPP_64;
break;
case V3D_OUTPUT_IMAGE_FORMAT_R32UI:
- *type = INTERNAL_TYPE_32UI;
- *bpp = INTERNAL_BPP_32;
+ *type = V3D_INTERNAL_TYPE_32UI;
+ *bpp = V3D_INTERNAL_BPP_32;
break;
case V3D_OUTPUT_IMAGE_FORMAT_RGBA32F:
- *type = INTERNAL_TYPE_32F;
- *bpp = INTERNAL_BPP_128;
+ *type = V3D_INTERNAL_TYPE_32F;
+ *bpp = V3D_INTERNAL_BPP_128;
break;
case V3D_OUTPUT_IMAGE_FORMAT_RG32F:
- *type = INTERNAL_TYPE_32F;
- *bpp = INTERNAL_BPP_64;
+ *type = V3D_INTERNAL_TYPE_32F;
+ *bpp = V3D_INTERNAL_BPP_64;
break;
case V3D_OUTPUT_IMAGE_FORMAT_R32F:
- *type = INTERNAL_TYPE_32F;
- *bpp = INTERNAL_BPP_32;
+ *type = V3D_INTERNAL_TYPE_32F;
+ *bpp = V3D_INTERNAL_BPP_32;
break;
default:
* creation time, even if an RB with this format isn't
* supported.
*/
- *type = INTERNAL_TYPE_8;
- *bpp = INTERNAL_BPP_32;
+ *type = V3D_INTERNAL_TYPE_8;
+ *bpp = V3D_INTERNAL_BPP_32;
break;
}
}
clear.render_target_number = i;
};
- if (surf->internal_bpp >= INTERNAL_BPP_64) {
+ if (surf->internal_bpp >= V3D_INTERNAL_BPP_64) {
cl_emit(&job->rcl, TILE_RENDERING_MODE_CONFIGURATION_CLEAR_COLORS_PART2,
clear) {
clear.clear_color_mid_low_32_bits =
};
}
- if (surf->internal_bpp >= INTERNAL_BPP_128 || clear_pad) {
+ if (surf->internal_bpp >= V3D_INTERNAL_BPP_128 || clear_pad) {
cl_emit(&job->rcl, TILE_RENDERING_MODE_CONFIGURATION_CLEAR_COLORS_PART3,
clear) {
clear.uif_padded_height_in_uif_blocks = clear_pad;
&internal_type,
&internal_bpp);
switch (internal_bpp) {
- case INTERNAL_BPP_32:
+ case V3D_INTERNAL_BPP_32:
rsc->cpp = 4;
break;
- case INTERNAL_BPP_64:
+ case V3D_INTERNAL_BPP_64:
rsc->cpp = 8;
break;
- case INTERNAL_BPP_128:
+ case V3D_INTERNAL_BPP_128:
rsc->cpp = 16;
break;
}
if (util_format_is_depth_or_stencil(psurf->format)) {
switch (psurf->format) {
case PIPE_FORMAT_Z16_UNORM:
- surface->internal_type = INTERNAL_TYPE_DEPTH_16;
+ surface->internal_type = V3D_INTERNAL_TYPE_DEPTH_16;
break;
case PIPE_FORMAT_Z32_FLOAT:
case PIPE_FORMAT_Z32_FLOAT_S8X24_UINT:
- surface->internal_type = INTERNAL_TYPE_DEPTH_32F;
+ surface->internal_type = V3D_INTERNAL_TYPE_DEPTH_32F;
break;
default:
- surface->internal_type = INTERNAL_TYPE_DEPTH_24;
+ surface->internal_type = V3D_INTERNAL_TYPE_DEPTH_24;
}
} else {
uint32_t bpp, type;
&internal_bpp);
switch (internal_type) {
- case INTERNAL_TYPE_8:
+ case V3D_INTERNAL_TYPE_8:
tex.texture_type = TEXTURE_DATA_FORMAT_RGBA8;
break;
- case INTERNAL_TYPE_16F:
+ case V3D_INTERNAL_TYPE_16F:
tex.texture_type = TEXTURE_DATA_FORMAT_RGBA16F;
break;
default: