s/desc->type/desc->channel[0].type/
This commit is contained in:
@@ -71,7 +71,7 @@ nv50_vbo_type_to_hw(enum pipe_format format)
|
|||||||
desc = util_format_description(format);
|
desc = util_format_description(format);
|
||||||
assert(desc);
|
assert(desc);
|
||||||
|
|
||||||
switch (desc->type) {
|
switch (desc->channel[0].type) {
|
||||||
case UTIL_FORMAT_TYPE_FLOAT:
|
case UTIL_FORMAT_TYPE_FLOAT:
|
||||||
return NV50TCL_VERTEX_ARRAY_ATTRIB_TYPE_FLOAT;
|
return NV50TCL_VERTEX_ARRAY_ATTRIB_TYPE_FLOAT;
|
||||||
case UTIL_FORMAT_TYPE_UNSIGNED:
|
case UTIL_FORMAT_TYPE_UNSIGNED:
|
||||||
@@ -339,7 +339,7 @@ nv50_vbo_static_attrib(struct nv50_context *nv50, unsigned attrib,
|
|||||||
desc = util_format_description(pf);
|
desc = util_format_description(pf);
|
||||||
assert(desc);
|
assert(desc);
|
||||||
|
|
||||||
if ((desc->type != UTIL_FORMAT_TYPE_FLOAT) ||
|
if ((desc->channel[0].type != UTIL_FORMAT_TYPE_FLOAT) ||
|
||||||
util_format_get_component_bits(pf, UTIL_FORMAT_COLORSPACE_RGB, 0) != 32)
|
util_format_get_component_bits(pf, UTIL_FORMAT_COLORSPACE_RGB, 0) != 32)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
|
@@ -483,7 +483,7 @@ r300_translate_vertex_data_type(enum pipe_format format) {
|
|||||||
assert(0);
|
assert(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (desc->type) {
|
switch (desc->channel[0].type) {
|
||||||
/* Half-floats, floats, doubles */
|
/* Half-floats, floats, doubles */
|
||||||
case UTIL_FORMAT_TYPE_FLOAT:
|
case UTIL_FORMAT_TYPE_FLOAT:
|
||||||
switch (util_format_get_component_bits(format, UTIL_FORMAT_COLORSPACE_RGB, 0)) {
|
switch (util_format_get_component_bits(format, UTIL_FORMAT_COLORSPACE_RGB, 0)) {
|
||||||
@@ -525,7 +525,7 @@ r300_translate_vertex_data_type(enum pipe_format format) {
|
|||||||
assert(0);
|
assert(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (desc->type == UTIL_FORMAT_TYPE_SIGNED) {
|
if (desc->channel[0].type == UTIL_FORMAT_TYPE_SIGNED) {
|
||||||
result |= R300_SIGNED;
|
result |= R300_SIGNED;
|
||||||
}
|
}
|
||||||
if (desc->channel[0].normalized) {
|
if (desc->channel[0].normalized) {
|
||||||
|
@@ -99,20 +99,20 @@ st_get_format_info(enum pipe_format format, struct pipe_format_info *pinfo)
|
|||||||
else {
|
else {
|
||||||
const GLuint size = format_max_bits(format);
|
const GLuint size = format_max_bits(format);
|
||||||
if (size == 8) {
|
if (size == 8) {
|
||||||
if (desc->type == UTIL_FORMAT_TYPE_UNSIGNED)
|
if (desc->channel[0].type == UTIL_FORMAT_TYPE_UNSIGNED)
|
||||||
pinfo->datatype = GL_UNSIGNED_BYTE;
|
pinfo->datatype = GL_UNSIGNED_BYTE;
|
||||||
else
|
else
|
||||||
pinfo->datatype = GL_BYTE;
|
pinfo->datatype = GL_BYTE;
|
||||||
}
|
}
|
||||||
else if (size == 16) {
|
else if (size == 16) {
|
||||||
if (desc->type == UTIL_FORMAT_TYPE_UNSIGNED)
|
if (desc->channel[0].type == UTIL_FORMAT_TYPE_UNSIGNED)
|
||||||
pinfo->datatype = GL_UNSIGNED_SHORT;
|
pinfo->datatype = GL_UNSIGNED_SHORT;
|
||||||
else
|
else
|
||||||
pinfo->datatype = GL_SHORT;
|
pinfo->datatype = GL_SHORT;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
assert( size <= 32 );
|
assert( size <= 32 );
|
||||||
if (desc->type == UTIL_FORMAT_TYPE_UNSIGNED)
|
if (desc->channel[0].type == UTIL_FORMAT_TYPE_UNSIGNED)
|
||||||
pinfo->datatype = GL_UNSIGNED_INT;
|
pinfo->datatype = GL_UNSIGNED_INT;
|
||||||
else
|
else
|
||||||
pinfo->datatype = GL_INT;
|
pinfo->datatype = GL_INT;
|
||||||
|
Reference in New Issue
Block a user