From e0ae10c49ae7c7c93ba076ee1088e3d829173f46 Mon Sep 17 00:00:00 2001 From: Jason Ekstrand Date: Wed, 25 May 2016 17:46:07 -0700 Subject: [PATCH] i965: Move brw_new_shader to brw_link.cpp MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 Reviewed-by: Kristian Høgsberg --- src/mesa/drivers/dri/i965/brw_link.cpp | 17 +++++++++++++++++ src/mesa/drivers/dri/i965/brw_shader.cpp | 17 ----------------- 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) -- 2.30.2