mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-03 01:18:06 +02:00
mesa: use new 64-bit checks instead of explicit double checks.
This just moves to the new interfaces in advance of int64. Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu> Signed-off-by: Dave Airlie <airlied@redhat.com>
This commit is contained in:
parent
2df46519e4
commit
152f5eea62
2 changed files with 5 additions and 5 deletions
|
|
@ -322,8 +322,8 @@ _mesa_get_uniform(struct gl_context *ctx, GLuint program, GLint location,
|
|||
{
|
||||
unsigned elements = (uni->type->is_sampler())
|
||||
? 1 : uni->type->components();
|
||||
const int dmul = uni->type->base_type == GLSL_TYPE_DOUBLE ? 2 : 1;
|
||||
const int rmul = returnType == GLSL_TYPE_DOUBLE ? 2 : 1;
|
||||
const int dmul = uni->type->is_64bit() ? 2 : 1;
|
||||
const int rmul = glsl_base_type_is_64bit(returnType) ? 2 : 1;
|
||||
|
||||
/* Calculate the source base address *BEFORE* modifying elements to
|
||||
* account for the size of the user's buffer.
|
||||
|
|
@ -548,7 +548,7 @@ _mesa_propagate_uniforms_to_driver_storage(struct gl_uniform_storage *uni,
|
|||
*/
|
||||
const unsigned components = MAX2(1, uni->type->vector_elements);
|
||||
const unsigned vectors = MAX2(1, uni->type->matrix_columns);
|
||||
const int dmul = uni->type->base_type == GLSL_TYPE_DOUBLE ? 2 : 1;
|
||||
const int dmul = uni->type->is_64bit() ? 2 : 1;
|
||||
|
||||
/* Store the data in the driver's requested type in the driver's storage
|
||||
* areas.
|
||||
|
|
@ -668,7 +668,7 @@ _mesa_uniform(struct gl_context *ctx, struct gl_shader_program *shProg,
|
|||
unsigned src_components)
|
||||
{
|
||||
unsigned offset;
|
||||
int size_mul = basicType == GLSL_TYPE_DOUBLE ? 2 : 1;
|
||||
int size_mul = glsl_base_type_is_64bit(basicType) ? 2 : 1;
|
||||
|
||||
struct gl_uniform_storage *const uni =
|
||||
validate_uniform_parameters(ctx, shProg, location, count,
|
||||
|
|
|
|||
|
|
@ -2407,7 +2407,7 @@ add_uniform_to_shader::visit_field(const glsl_type *type, const char *name,
|
|||
|
||||
if (type->is_vector() || type->is_scalar()) {
|
||||
size = type->vector_elements;
|
||||
if (type->is_double())
|
||||
if (type->is_64bit())
|
||||
size *= 2;
|
||||
} else {
|
||||
size = type_size(type) * 4;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue