summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorMatt Turner <[email protected]>2016-02-08 15:32:12 -0800
committerMatt Turner <[email protected]>2016-02-08 15:32:12 -0800
commitc300559fbfa6127320b78c130061fdb6a454658d (patch)
tree92f390e2f89a3d44b772fa58afbb37074fbb0949 /src/mesa
parent01dacc83ff43a054513277e3e1296c3fc8cd750a (diff)
i965/vec4: Update vec4 unit tests for commit 01dacc83ff.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=94050
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/drivers/dri/i965/test_vec4_cmod_propagation.cpp14
-rw-r--r--src/mesa/drivers/dri/i965/test_vec4_copy_propagation.cpp10
-rw-r--r--src/mesa/drivers/dri/i965/test_vec4_register_coalesce.cpp10
3 files changed, 24 insertions, 10 deletions
diff --git a/src/mesa/drivers/dri/i965/test_vec4_cmod_propagation.cpp b/src/mesa/drivers/dri/i965/test_vec4_cmod_propagation.cpp
index e5e566c60bc..8d4a447a88b 100644
--- a/src/mesa/drivers/dri/i965/test_vec4_cmod_propagation.cpp
+++ b/src/mesa/drivers/dri/i965/test_vec4_cmod_propagation.cpp
@@ -40,6 +40,7 @@ public:
struct gl_context *ctx;
struct gl_shader_program *shader_prog;
struct brw_vertex_program *vp;
+ struct brw_vue_prog_data *prog_data;
vec4_visitor *v;
};
@@ -47,9 +48,13 @@ class cmod_propagation_vec4_visitor : public vec4_visitor
{
public:
cmod_propagation_vec4_visitor(struct brw_compiler *compiler,
- nir_shader *shader)
- : vec4_visitor(compiler, NULL, NULL, NULL, shader, NULL,
- false, -1) {}
+ nir_shader *shader,
+ struct brw_vue_prog_data *prog_data)
+ : vec4_visitor(compiler, NULL, NULL, prog_data, shader, NULL,
+ false, -1)
+ {
+ prog_data->dispatch_mode = DISPATCH_MODE_4X2_DUAL_OBJECT;
+ }
protected:
/* Dummy implementation for pure virtual methods */
@@ -96,13 +101,14 @@ void cmod_propagation_test::SetUp()
ctx = (struct gl_context *)calloc(1, sizeof(*ctx));
compiler = (struct brw_compiler *)calloc(1, sizeof(*compiler));
devinfo = (struct brw_device_info *)calloc(1, sizeof(*devinfo));
+ prog_data = (struct brw_vue_prog_data *)calloc(1, sizeof(*prog_data));
compiler->devinfo = devinfo;
vp = ralloc(NULL, struct brw_vertex_program);
nir_shader *shader = nir_shader_create(NULL, MESA_SHADER_VERTEX, NULL);
- v = new cmod_propagation_vec4_visitor(compiler, shader);
+ v = new cmod_propagation_vec4_visitor(compiler, shader, prog_data);
_mesa_init_gl_program(&vp->program.Base, GL_VERTEX_SHADER, 0);
diff --git a/src/mesa/drivers/dri/i965/test_vec4_copy_propagation.cpp b/src/mesa/drivers/dri/i965/test_vec4_copy_propagation.cpp
index 12667ffd23c..311f07a7cca 100644
--- a/src/mesa/drivers/dri/i965/test_vec4_copy_propagation.cpp
+++ b/src/mesa/drivers/dri/i965/test_vec4_copy_propagation.cpp
@@ -39,6 +39,7 @@ public:
struct gl_context *ctx;
struct gl_shader_program *shader_prog;
struct brw_vertex_program *vp;
+ struct brw_vue_prog_data *prog_data;
vec4_visitor *v;
};
@@ -46,10 +47,12 @@ class copy_propagation_vec4_visitor : public vec4_visitor
{
public:
copy_propagation_vec4_visitor(struct brw_compiler *compiler,
- nir_shader *shader)
- : vec4_visitor(compiler, NULL, NULL, NULL, shader, NULL,
+ nir_shader *shader,
+ struct brw_vue_prog_data *prog_data)
+ : vec4_visitor(compiler, NULL, NULL, prog_data, shader, NULL,
false /* no_spills */, -1)
{
+ prog_data->dispatch_mode = DISPATCH_MODE_4X2_DUAL_OBJECT;
}
protected:
@@ -91,13 +94,14 @@ void copy_propagation_test::SetUp()
ctx = (struct gl_context *)calloc(1, sizeof(*ctx));
compiler = (struct brw_compiler *)calloc(1, sizeof(*compiler));
devinfo = (struct brw_device_info *)calloc(1, sizeof(*devinfo));
+ prog_data = (struct brw_vue_prog_data *)calloc(1, sizeof(*prog_data));
compiler->devinfo = devinfo;
vp = ralloc(NULL, struct brw_vertex_program);
nir_shader *shader = nir_shader_create(NULL, MESA_SHADER_VERTEX, NULL);
- v = new copy_propagation_vec4_visitor(compiler, shader);
+ v = new copy_propagation_vec4_visitor(compiler, shader, prog_data);
_mesa_init_gl_program(&vp->program.Base, GL_VERTEX_SHADER, 0);
diff --git a/src/mesa/drivers/dri/i965/test_vec4_register_coalesce.cpp b/src/mesa/drivers/dri/i965/test_vec4_register_coalesce.cpp
index 34dcf95dc48..cc4a2de89d5 100644
--- a/src/mesa/drivers/dri/i965/test_vec4_register_coalesce.cpp
+++ b/src/mesa/drivers/dri/i965/test_vec4_register_coalesce.cpp
@@ -41,6 +41,7 @@ public:
struct gl_context *ctx;
struct gl_shader_program *shader_prog;
struct brw_vertex_program *vp;
+ struct brw_vue_prog_data *prog_data;
vec4_visitor *v;
};
@@ -49,10 +50,12 @@ class register_coalesce_vec4_visitor : public vec4_visitor
{
public:
register_coalesce_vec4_visitor(struct brw_compiler *compiler,
- nir_shader *shader)
- : vec4_visitor(compiler, NULL, NULL, NULL, shader, NULL,
+ nir_shader *shader,
+ struct brw_vue_prog_data *prog_data)
+ : vec4_visitor(compiler, NULL, NULL, prog_data, shader, NULL,
false /* no_spills */, -1)
{
+ prog_data->dispatch_mode = DISPATCH_MODE_4X2_DUAL_OBJECT;
}
protected:
@@ -94,13 +97,14 @@ void register_coalesce_test::SetUp()
ctx = (struct gl_context *)calloc(1, sizeof(*ctx));
compiler = (struct brw_compiler *)calloc(1, sizeof(*compiler));
devinfo = (struct brw_device_info *)calloc(1, sizeof(*devinfo));
+ prog_data = (struct brw_vue_prog_data *)calloc(1, sizeof(*prog_data));
compiler->devinfo = devinfo;
vp = ralloc(NULL, struct brw_vertex_program);
nir_shader *shader = nir_shader_create(NULL, MESA_SHADER_VERTEX, NULL);
- v = new register_coalesce_vec4_visitor(compiler, shader);
+ v = new register_coalesce_vec4_visitor(compiler, shader, prog_data);
_mesa_init_gl_program(&vp->program.Base, GL_VERTEX_SHADER, 0);