summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Turner <mattst88@gmail.com>2016-02-08 15:32:12 -0800
committerEmil Velikov <emil.l.velikov@gmail.com>2016-04-16 01:34:10 +0100
commit3eb4fd88916d01f236e5d40c08086ad2fa363bb8 (patch)
tree4f5d35862bdaaf9080ece4551a9a181371936abf
parentfd1e4331ee40627e5a8cad67b930bde4732ef93f (diff)
i965/vec4: Update vec4 unit tests for commit 01dacc83ff.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=94050 (cherry picked from commit c300559fbfa6127320b78c130061fdb6a454658d) Fixes: 9f2e22bf343 "i965/vec4: don't copy ATTR into 3src instructions with complex swizzles" Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=94954 Nominated-by: Emil Velikov <emil.velikov@collabora.com>
-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 ede409b6919..96e6de54101 100644
--- a/src/mesa/drivers/dri/i965/test_vec4_copy_propagation.cpp
+++ b/src/mesa/drivers/dri/i965/test_vec4_copy_propagation.cpp
@@ -38,6 +38,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;
};
@@ -45,10 +46,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:
@@ -90,13 +93,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 90a6bc3618f..c2b1672a8ca 100644
--- a/src/mesa/drivers/dri/i965/test_vec4_register_coalesce.cpp
+++ b/src/mesa/drivers/dri/i965/test_vec4_register_coalesce.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;
};
@@ -48,10 +49,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:
@@ -93,13 +96,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);