&uni->storage[offset * elements];
unsigned bytes = sizeof(uni->storage[0]) * elements;
- if (bytes > bufSize) {
+ if (bytes > (unsigned) bufSize) {
elements = bufSize / sizeof(uni->storage[0]);
bytes = bufSize;
}
unsigned loc, offset;
unsigned components;
unsigned src_components;
- unsigned i;
enum glsl_base_type basicType;
struct gl_uniform_storage *uni;
* GL_INVALID_VALUE error and ignore the command.
*/
if (uni->type->is_sampler()) {
+ int i;
+
for (i = 0; i < count; i++) {
const unsigned texUnit = ((unsigned *) values)[i];
(const union gl_constant_value *) values;
union gl_constant_value *dst = &uni->storage[components * offset];
const unsigned elems = components * count;
+ unsigned i;
for (i = 0; i < elems; i++) {
if (basicType == GLSL_TYPE_FLOAT) {
* the changes through.
*/
if (uni->type->is_sampler()) {
+ int i;
+
for (i = 0; i < count; i++) {
shProg->SamplerUnits[uni->sampler + offset + i] =
((unsigned *) values)[i];
*/
extern "C" void
_mesa_uniform_matrix(struct gl_context *ctx, struct gl_shader_program *shProg,
- GLint cols, GLint rows,
+ GLuint cols, GLuint rows,
GLint location, GLsizei count,
GLboolean transpose, const GLfloat *values)
{
const float *src = values;
float *dst = &uni->storage[elements * offset].f;
- for (unsigned i = 0; i < count; i++) {
+ for (int i = 0; i < count; i++) {
for (unsigned r = 0; r < rows; r++) {
for (unsigned c = 0; c < cols; c++) {
dst[(c * components) + r] = src[c + (r * vectors)];
void
_mesa_uniform_matrix(struct gl_context *ctx, struct gl_shader_program *shProg,
- GLint cols, GLint rows,
+ GLuint cols, GLuint rows,
GLint location, GLsizei count,
GLboolean transpose, const GLfloat *values);