summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/r600
diff options
context:
space:
mode:
authorHenri Verbeet <[email protected]>2011-01-15 19:39:52 +0100
committerHenri Verbeet <[email protected]>2011-01-15 19:48:43 +0100
commitf6f7808028a7551fa7398e8f20ed39043779b493 (patch)
tree4e7d3b4a0ec07636abad6c428766069cad570f0b /src/gallium/drivers/r600
parent652901e95b4ed406293d0e1fabee857c054119b1 (diff)
r600g: Get rid of r600_translate_vertex_data_type().
This has been replaced with r600_vertex_data_type().
Diffstat (limited to 'src/gallium/drivers/r600')
-rw-r--r--src/gallium/drivers/r600/eg_state_inlines.h135
-rw-r--r--src/gallium/drivers/r600/r600_state_inlines.h135
2 files changed, 0 insertions, 270 deletions
diff --git a/src/gallium/drivers/r600/eg_state_inlines.h b/src/gallium/drivers/r600/eg_state_inlines.h
index ecea1db4f15..5a39d7cdeec 100644
--- a/src/gallium/drivers/r600/eg_state_inlines.h
+++ b/src/gallium/drivers/r600/eg_state_inlines.h
@@ -506,139 +506,4 @@ static INLINE boolean r600_is_vertex_format_supported(enum pipe_format format)
return r600_translate_colorformat(format) != ~0;
}
-static INLINE uint32_t r600_translate_vertex_data_type(enum pipe_format format)
-{
- uint32_t result = 0;
- const struct util_format_description *desc;
- unsigned i;
-
- desc = util_format_description(format);
- if (desc->layout != UTIL_FORMAT_LAYOUT_PLAIN) {
- goto out_unknown;
- }
-
- /* Find the first non-VOID channel. */
- for (i = 0; i < 4; i++) {
- if (desc->channel[i].type != UTIL_FORMAT_TYPE_VOID) {
- break;
- }
- }
-
- switch (desc->channel[i].type) {
- /* Half-floats, floats, doubles */
- case UTIL_FORMAT_TYPE_FLOAT:
- switch (desc->channel[i].size) {
- case 16:
- switch (desc->nr_channels) {
- case 1:
- result = FMT_16_FLOAT;
- break;
- case 2:
- result = FMT_16_16_FLOAT;
- break;
- case 3:
- result = FMT_16_16_16_FLOAT;
- break;
- case 4:
- result = FMT_16_16_16_16_FLOAT;
- break;
- }
- break;
- case 32:
- switch (desc->nr_channels) {
- case 1:
- result = FMT_32_FLOAT;
- break;
- case 2:
- result = FMT_32_32_FLOAT;
- break;
- case 3:
- result = FMT_32_32_32_FLOAT;
- break;
- case 4:
- result = FMT_32_32_32_32_FLOAT;
- break;
- }
- break;
- default:
- goto out_unknown;
- }
- break;
- /* Unsigned ints */
- case UTIL_FORMAT_TYPE_UNSIGNED:
- /* Signed ints */
- case UTIL_FORMAT_TYPE_SIGNED:
- switch (desc->channel[i].size) {
- case 8:
- switch (desc->nr_channels) {
- case 1:
- result = FMT_8;
- break;
- case 2:
- result = FMT_8_8;
- break;
- case 3:
-// result = V_038008_FMT_8_8_8; /* fails piglit draw-vertices test */
-// break;
- case 4:
- result = FMT_8_8_8_8;
- break;
- }
- break;
- case 16:
- switch (desc->nr_channels) {
- case 1:
- result = FMT_16;
- break;
- case 2:
- result = FMT_16_16;
- break;
- case 3:
-// result = V_038008_FMT_16_16_16; /* fails piglit draw-vertices test */
-// break;
- case 4:
- result = FMT_16_16_16_16;
- break;
- }
- break;
- case 32:
- switch (desc->nr_channels) {
- case 1:
- result = FMT_32;
- break;
- case 2:
- result = FMT_32_32;
- break;
- case 3:
- result = FMT_32_32_32;
- break;
- case 4:
- result = FMT_32_32_32_32;
- break;
- }
- break;
- default:
- goto out_unknown;
- }
- break;
- default:
- goto out_unknown;
- }
-
- result = S_030008_DATA_FORMAT(result);
-
- if (desc->channel[i].type == UTIL_FORMAT_TYPE_SIGNED) {
- result |= S_030008_FORMAT_COMP_ALL(1);
- }
- if (desc->channel[i].normalized) {
- result |= S_030008_NUM_FORMAT_ALL(0);
- } else {
- result |= S_030008_NUM_FORMAT_ALL(2);
- }
- return result;
-out_unknown:
- R600_ERR("unsupported vertex format %s\n", util_format_name(format));
- return ~0;
-}
-
#endif
diff --git a/src/gallium/drivers/r600/r600_state_inlines.h b/src/gallium/drivers/r600/r600_state_inlines.h
index d994196e19d..d5dabdc69b6 100644
--- a/src/gallium/drivers/r600/r600_state_inlines.h
+++ b/src/gallium/drivers/r600/r600_state_inlines.h
@@ -500,139 +500,4 @@ static INLINE boolean r600_is_vertex_format_supported(enum pipe_format format)
return r600_translate_colorformat(format) != ~0;
}
-static INLINE uint32_t r600_translate_vertex_data_type(enum pipe_format format)
-{
- uint32_t result = 0;
- const struct util_format_description *desc;
- unsigned i;
-
- desc = util_format_description(format);
- if (desc->layout != UTIL_FORMAT_LAYOUT_PLAIN) {
- goto out_unknown;
- }
-
- /* Find the first non-VOID channel. */
- for (i = 0; i < 4; i++) {
- if (desc->channel[i].type != UTIL_FORMAT_TYPE_VOID) {
- break;
- }
- }
-
- switch (desc->channel[i].type) {
- /* Half-floats, floats, doubles */
- case UTIL_FORMAT_TYPE_FLOAT:
- switch (desc->channel[i].size) {
- case 16:
- switch (desc->nr_channels) {
- case 1:
- result = FMT_16_FLOAT;
- break;
- case 2:
- result = FMT_16_16_FLOAT;
- break;
- case 3:
- result = FMT_16_16_16_FLOAT;
- break;
- case 4:
- result = FMT_16_16_16_16_FLOAT;
- break;
- }
- break;
- case 32:
- switch (desc->nr_channels) {
- case 1:
- result = FMT_32_FLOAT;
- break;
- case 2:
- result = FMT_32_32_FLOAT;
- break;
- case 3:
- result = FMT_32_32_32_FLOAT;
- break;
- case 4:
- result = FMT_32_32_32_32_FLOAT;
- break;
- }
- break;
- default:
- goto out_unknown;
- }
- break;
- /* Unsigned ints */
- case UTIL_FORMAT_TYPE_UNSIGNED:
- /* Signed ints */
- case UTIL_FORMAT_TYPE_SIGNED:
- switch (desc->channel[i].size) {
- case 8:
- switch (desc->nr_channels) {
- case 1:
- result = FMT_8;
- break;
- case 2:
- result = FMT_8_8;
- break;
- case 3:
- // result = FMT_8_8_8; /* fails piglit draw-vertices test */
- // break;
- case 4:
- result = FMT_8_8_8_8;
- break;
- }
- break;
- case 16:
- switch (desc->nr_channels) {
- case 1:
- result = FMT_16;
- break;
- case 2:
- result = FMT_16_16;
- break;
- case 3:
- // result = FMT_16_16_16; /* fails piglit draw-vertices test */
- // break;
- case 4:
- result = FMT_16_16_16_16;
- break;
- }
- break;
- case 32:
- switch (desc->nr_channels) {
- case 1:
- result = FMT_32;
- break;
- case 2:
- result = FMT_32_32;
- break;
- case 3:
- result = FMT_32_32_32;
- break;
- case 4:
- result = FMT_32_32_32_32;
- break;
- }
- break;
- default:
- goto out_unknown;
- }
- break;
- default:
- goto out_unknown;
- }
-
- result = S_038008_DATA_FORMAT(result);
-
- if (desc->channel[i].type == UTIL_FORMAT_TYPE_SIGNED) {
- result |= S_038008_FORMAT_COMP_ALL(1);
- }
- if (desc->channel[i].normalized) {
- result |= S_038008_NUM_FORMAT_ALL(0);
- } else {
- result |= S_038008_NUM_FORMAT_ALL(2);
- }
- return result;
-out_unknown:
- R600_ERR("unsupported vertex format %s\n", util_format_name(format));
- return ~0;
-}
-
#endif