#include "brw_shader.h"
#include "brw_nir.h"
-#include "glsl/ir_uniform.h"
+#include "compiler/glsl/ir_uniform.h"
static void
brw_nir_setup_glsl_builtin_uniform(nir_variable *var,
const nir_state_slot *const slots = var->state_slots;
assert(var->state_slots != NULL);
- unsigned uniform_index = is_scalar ? var->data.driver_location :
- var->data.driver_location * 4;
+ unsigned uniform_index = var->data.driver_location / 4;
for (unsigned int i = 0; i < var->num_state_slots; i++) {
/* This state reference has already been setup by ir_to_mesa, but we'll
* get the same index back here.
int namelen = strlen(var->name);
/* The data for our (non-builtin) uniforms is stored in a series of
- * gl_uniform_driver_storage structs for each subcomponent that
+ * gl_uniform_storage structs for each subcomponent that
* glGetUniformLocation() could name. We know it's been set up in the same
* order we'd walk the type, so walk the list of storage and find anything
* with our name, or the prefix of a component that starts with our name.
*/
- unsigned uniform_index = is_scalar ? var->data.driver_location :
- var->data.driver_location * 4;
+ unsigned uniform_index = var->data.driver_location / 4;
for (unsigned u = 0; u < shader_prog->NumUniformStorage; u++) {
struct gl_uniform_storage *storage = &shader_prog->UniformStorage[u];