summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/i965/brw_shader.cpp
diff options
context:
space:
mode:
authorJason Ekstrand <jason.ekstrand@intel.com>2015-04-16 12:01:09 -0700
committerJason Ekstrand <jason.ekstrand@intel.com>2015-04-22 16:00:34 -0700
commitae3870df7043861632aa553e12cc9284a9aef827 (patch)
tree9deff649feaea8dabd816ed45f56cbd885f68f68 /src/mesa/drivers/dri/i965/brw_shader.cpp
parenta85c4c9b3f75cac9ab133caa91a40eec2e4816ae (diff)
downloadexternal_mesa3d-ae3870df7043861632aa553e12cc9284a9aef827.zip
external_mesa3d-ae3870df7043861632aa553e12cc9284a9aef827.tar.gz
external_mesa3d-ae3870df7043861632aa553e12cc9284a9aef827.tar.bz2
i965: Add a brw_compiler structure and store the register sets in it
Reviewed-by: Matt Turner <mattst88@gmail.com>
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_shader.cpp')
-rw-r--r--src/mesa/drivers/dri/i965/brw_shader.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_shader.cpp b/src/mesa/drivers/dri/i965/brw_shader.cpp
index 2e34057..79f0e1c 100644
--- a/src/mesa/drivers/dri/i965/brw_shader.cpp
+++ b/src/mesa/drivers/dri/i965/brw_shader.cpp
@@ -32,6 +32,19 @@
#include "glsl/glsl_parser_extras.h"
#include "main/shaderapi.h"
+struct brw_compiler *
+brw_compiler_create(void *mem_ctx, const struct brw_device_info *devinfo)
+{
+ struct brw_compiler *compiler = rzalloc(mem_ctx, struct brw_compiler);
+
+ compiler->devinfo = devinfo;
+
+ brw_fs_alloc_reg_sets(compiler);
+ brw_vec4_alloc_reg_set(compiler);
+
+ return compiler;
+}
+
struct gl_shader *
brw_new_shader(struct gl_context *ctx, GLuint name, GLuint type)
{