#include "glsl_parser_extras.h"
#include "ir_optimization.h"
#include "program.h"
+#include "program/hash_table.h"
#include "loop_analysis.h"
#include "standalone_scaffolding.h"
static int glsl_version = 330;
-extern "C" void
-_mesa_error_no_memory(const char *caller)
-{
- fprintf(stderr, "Mesa error: out of memory in %s", caller);
-}
-
static void
initialize_context(struct gl_context *ctx, gl_api api)
{
ctx->Const.MaxGeometryOutputVertices = 256;
ctx->Const.MaxGeometryTotalOutputComponents = 1024;
-// ctx->Const.MaxGeometryVaryingComponents = 64;
-
ctx->Const.MaxVarying = 60 / 4;
break;
case 300:
}
ctx->Const.GenerateTemporaryNames = true;
+ ctx->Const.MaxPatchVertices = 32;
+
ctx->Driver.NewShader = _mesa_new_shader;
}
{
const char *header =
- "usage: %s [options] <file.vert | file.geom | file.frag>\n"
+ "usage: %s [options] <file.vert | file.tesc | file.tese | file.geom | file.frag | file.comp>\n"
"\n"
"Possible options are:\n";
- printf(header, name, name);
+ printf(header, name);
for (const struct option *o = compiler_opts; o->name != 0; ++o) {
printf(" --%s\n", o->name);
}
assert(whole_program != NULL);
whole_program->InfoLog = ralloc_strdup(whole_program, "");
+ /* Created just to avoid segmentation faults */
+ whole_program->AttributeBindings = new string_to_uint_map;
+ whole_program->FragDataBindings = new string_to_uint_map;
+ whole_program->FragDataIndexBindings = new string_to_uint_map;
+
for (/* empty */; argc > optind; optind++) {
whole_program->Shaders =
reralloc(whole_program, whole_program->Shaders,
const char *const ext = & argv[optind][len - 5];
if (strncmp(".vert", ext, 5) == 0 || strncmp(".glsl", ext, 5) == 0)
shader->Type = GL_VERTEX_SHADER;
+ else if (strncmp(".tesc", ext, 5) == 0)
+ shader->Type = GL_TESS_CONTROL_SHADER;
+ else if (strncmp(".tese", ext, 5) == 0)
+ shader->Type = GL_TESS_EVALUATION_SHADER;
else if (strncmp(".geom", ext, 5) == 0)
shader->Type = GL_GEOMETRY_SHADER;
else if (strncmp(".frag", ext, 5) == 0)
}
if ((status == EXIT_SUCCESS) && do_link) {
- _mesa_clear_shader_program_data(ctx, whole_program);
+ _mesa_clear_shader_program_data(whole_program);
link_shaders(ctx, whole_program);
status = (whole_program->LinkStatus) ? EXIT_SUCCESS : EXIT_FAILURE;
for (unsigned i = 0; i < MESA_SHADER_STAGES; i++)
ralloc_free(whole_program->_LinkedShaders[i]);
+ delete whole_program->AttributeBindings;
+ delete whole_program->FragDataBindings;
+ delete whole_program->FragDataIndexBindings;
+
ralloc_free(whole_program);
_mesa_glsl_release_types();
_mesa_glsl_release_builtin_functions();