summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2016-05-25 17:46:07 -0700
committerJason Ekstrand <[email protected]>2016-05-26 14:13:38 -0700
commite0ae10c49ae7c7c93ba076ee1088e3d829173f46 (patch)
treeb7a271d4d08e0067579b82404776af607beabfc1 /src/mesa/drivers
parent5136b67915ffbafa1715e08be4bd714c6ff540b3 (diff)
i965: Move brw_new_shader to brw_link.cpp
That's where brw_link_shader lives and they seem to go together. Also, this gets it out of libi965_compiler. Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Kristian Høgsberg <[email protected]>
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r--src/mesa/drivers/dri/i965/brw_link.cpp17
-rw-r--r--src/mesa/drivers/dri/i965/brw_shader.cpp17
2 files changed, 17 insertions, 17 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_link.cpp b/src/mesa/drivers/dri/i965/brw_link.cpp
index c169658e337..16bfbaa8d7e 100644
--- a/src/mesa/drivers/dri/i965/brw_link.cpp
+++ b/src/mesa/drivers/dri/i965/brw_link.cpp
@@ -31,6 +31,7 @@
#include "compiler/glsl/program.h"
#include "program/program.h"
#include "main/shaderapi.h"
+#include "main/shaderobj.h"
#include "main/uniforms.h"
/**
@@ -183,6 +184,22 @@ process_glsl_ir(gl_shader_stage stage,
}
}
+extern "C" struct gl_shader *
+brw_new_shader(struct gl_context *ctx, GLuint name, GLuint type)
+{
+ struct brw_shader *shader;
+
+ shader = rzalloc(NULL, struct brw_shader);
+ if (shader) {
+ shader->base.Type = type;
+ shader->base.Stage = _mesa_shader_enum_to_shader_stage(type);
+ shader->base.Name = name;
+ _mesa_init_shader(ctx, &shader->base);
+ }
+
+ return &shader->base;
+}
+
extern "C" GLboolean
brw_link_shader(struct gl_context *ctx, struct gl_shader_program *shProg)
{
diff --git a/src/mesa/drivers/dri/i965/brw_shader.cpp b/src/mesa/drivers/dri/i965/brw_shader.cpp
index fa8cf88d33e..d24db58a046 100644
--- a/src/mesa/drivers/dri/i965/brw_shader.cpp
+++ b/src/mesa/drivers/dri/i965/brw_shader.cpp
@@ -27,25 +27,8 @@
#include "brw_fs.h"
#include "brw_nir.h"
#include "brw_vec4_tes.h"
-#include "main/shaderobj.h"
#include "main/uniforms.h"
-extern "C" struct gl_shader *
-brw_new_shader(struct gl_context *ctx, GLuint name, GLuint type)
-{
- struct brw_shader *shader;
-
- shader = rzalloc(NULL, struct brw_shader);
- if (shader) {
- shader->base.Type = type;
- shader->base.Stage = _mesa_shader_enum_to_shader_stage(type);
- shader->base.Name = name;
- _mesa_init_shader(ctx, &shader->base);
- }
-
- return &shader->base;
-}
-
extern "C" void
brw_mark_surface_used(struct brw_stage_prog_data *prog_data,
unsigned surf_index)