[Mesa-dev] [PATCH v2 09/73] st/mesa: get rid of st_glsl_types

Nicolai Hähnle nhaehnle at gmail.com
Wed Jul 5 10:47:53 UTC 2017


From: Nicolai Hähnle <nicolai.haehnle at amd.com>

It's a duplicate of glsl_type::count_attribute_slots.
---
 src/compiler/glsl_types.cpp                     |   4 +-
 src/gallium/drivers/freedreno/ir3/ir3_cmdline.c |  15 ++--
 src/gallium/drivers/freedreno/ir3/ir3_shader.c  |   6 ++
 src/gallium/drivers/freedreno/ir3/ir3_shader.h  |   5 ++
 src/gallium/drivers/vc4/vc4_program.c           |  10 ++-
 src/mesa/Makefile.sources                       |   2 -
 src/mesa/state_tracker/st_glsl_to_nir.cpp       |  17 ++--
 src/mesa/state_tracker/st_glsl_to_tgsi.cpp      |   5 +-
 src/mesa/state_tracker/st_glsl_types.cpp        | 107 ------------------------
 src/mesa/state_tracker/st_glsl_types.h          |  44 ----------
 10 files changed, 42 insertions(+), 173 deletions(-)
 delete mode 100644 src/mesa/state_tracker/st_glsl_types.cpp
 delete mode 100644 src/mesa/state_tracker/st_glsl_types.h

diff --git a/src/compiler/glsl_types.cpp b/src/compiler/glsl_types.cpp
index 188b72f..99cc696 100644
--- a/src/compiler/glsl_types.cpp
+++ b/src/compiler/glsl_types.cpp
@@ -1992,24 +1992,26 @@ glsl_type::count_attribute_slots(bool is_vertex_input) const
 
       for (unsigned i = 0; i < this->length; i++)
          size += this->fields.structure[i].type->count_attribute_slots(is_vertex_input);
 
       return size;
    }
 
    case GLSL_TYPE_ARRAY:
       return this->length * this->fields.array->count_attribute_slots(is_vertex_input);
 
+   case GLSL_TYPE_SUBROUTINE:
+      return 1;
+
    case GLSL_TYPE_FUNCTION:
    case GLSL_TYPE_ATOMIC_UINT:
    case GLSL_TYPE_VOID:
-   case GLSL_TYPE_SUBROUTINE:
    case GLSL_TYPE_ERROR:
       break;
    }
 
    assert(!"Unexpected type in count_attribute_slots()");
 
    return 0;
 }
 
 int
diff --git a/src/gallium/drivers/freedreno/ir3/ir3_cmdline.c b/src/gallium/drivers/freedreno/ir3/ir3_cmdline.c
index fdec3f2..cfcb807 100644
--- a/src/gallium/drivers/freedreno/ir3/ir3_cmdline.c
+++ b/src/gallium/drivers/freedreno/ir3/ir3_cmdline.c
@@ -39,33 +39,32 @@
 
 #include "freedreno_util.h"
 
 #include "ir3_compiler.h"
 #include "ir3_nir.h"
 #include "instr-a3xx.h"
 #include "ir3.h"
 
 #include "compiler/glsl/standalone.h"
 #include "compiler/glsl/glsl_to_nir.h"
+#include "compiler/nir_types.h"
 
 static void dump_info(struct ir3_shader_variant *so, const char *str)
 {
 	uint32_t *bin;
 	const char *type = ir3_shader_stage(so->shader);
 	bin = ir3_shader_assemble(so, so->shader->compiler->gpu_id);
 	debug_printf("; %s: %s\n", type, str);
 	ir3_shader_disasm(so, bin);
 	free(bin);
 }
 
-int st_glsl_type_size(const struct glsl_type *type);
-
 static void
 insert_sorted(struct exec_list *var_list, nir_variable *new_var)
 {
 	nir_foreach_variable(var, var_list) {
 		if (var->data.location > new_var->data.location) {
 			exec_node_insert_node_before(&var->node, &new_var->node);
 			return;
 		}
 	}
 	exec_list_push_tail(var_list, &new_var->node);
@@ -124,51 +123,51 @@ load_glsl(unsigned num_files, char* const* files, gl_shader_stage stage)
 	NIR_PASS_V(nir, nir_lower_var_copies);
 
 	NIR_PASS_V(nir, nir_split_var_copies);
 	NIR_PASS_V(nir, nir_lower_var_copies);
 	NIR_PASS_V(nir, nir_lower_io_types);
 
 	switch (stage) {
 	case MESA_SHADER_VERTEX:
 		nir_assign_var_locations(&nir->inputs,
 				&nir->num_inputs,
-				st_glsl_type_size);
+				ir3_glsl_type_size);
 
 		/* Re-lower global vars, to deal with any dead VS inputs. */
 		NIR_PASS_V(nir, nir_lower_global_vars_to_local);
 
 		sort_varyings(&nir->outputs);
 		nir_assign_var_locations(&nir->outputs,
 				&nir->num_outputs,
-				st_glsl_type_size);
+				ir3_glsl_type_size);
 		fixup_varying_slots(&nir->outputs);
 		break;
 	case MESA_SHADER_FRAGMENT:
 		sort_varyings(&nir->inputs);
 		nir_assign_var_locations(&nir->inputs,
 				&nir->num_inputs,
-				st_glsl_type_size);
+				ir3_glsl_type_size);
 		fixup_varying_slots(&nir->inputs);
 		nir_assign_var_locations(&nir->outputs,
 				&nir->num_outputs,
-				st_glsl_type_size);
+				ir3_glsl_type_size);
 		break;
 	default:
 		errx(1, "unhandled shader stage: %d", stage);
 	}
 
 	nir_assign_var_locations(&nir->uniforms,
 			&nir->num_uniforms,
-			st_glsl_type_size);
+			ir3_glsl_type_size);
 
 	NIR_PASS_V(nir, nir_lower_system_values);
-	NIR_PASS_V(nir, nir_lower_io, nir_var_all, st_glsl_type_size, 0);
+	NIR_PASS_V(nir, nir_lower_io, nir_var_all, ir3_glsl_type_size, 0);
 	NIR_PASS_V(nir, nir_lower_samplers, prog);
 
 	return nir;
 }
 
 static int
 read_file(const char *filename, void **ptr, size_t *size)
 {
 	int fd, ret;
 	struct stat st;
diff --git a/src/gallium/drivers/freedreno/ir3/ir3_shader.c b/src/gallium/drivers/freedreno/ir3/ir3_shader.c
index a176f16..636111b 100644
--- a/src/gallium/drivers/freedreno/ir3/ir3_shader.c
+++ b/src/gallium/drivers/freedreno/ir3/ir3_shader.c
@@ -34,20 +34,26 @@
 #include "tgsi/tgsi_dump.h"
 #include "tgsi/tgsi_parse.h"
 
 #include "freedreno_context.h"
 #include "freedreno_util.h"
 
 #include "ir3_shader.h"
 #include "ir3_compiler.h"
 #include "ir3_nir.h"
 
+int
+ir3_glsl_type_size(const struct glsl_type *type)
+{
+	return glsl_count_attribute_slots(type, false);
+}
+
 static void
 delete_variant(struct ir3_shader_variant *v)
 {
 	if (v->ir)
 		ir3_destroy(v->ir);
 	if (v->bo)
 		fd_bo_del(v->bo);
 	free(v);
 }
 
diff --git a/src/gallium/drivers/freedreno/ir3/ir3_shader.h b/src/gallium/drivers/freedreno/ir3/ir3_shader.h
index 6c2af6d..9984809 100644
--- a/src/gallium/drivers/freedreno/ir3/ir3_shader.h
+++ b/src/gallium/drivers/freedreno/ir3/ir3_shader.h
@@ -29,20 +29,22 @@
 #ifndef IR3_SHADER_H_
 #define IR3_SHADER_H_
 
 #include "pipe/p_state.h"
 #include "compiler/shader_enums.h"
 #include "util/bitscan.h"
 
 #include "ir3.h"
 #include "disasm.h"
 
+struct glsl_type;
+
 /* driver param indices: */
 enum ir3_driver_param {
 	/* compute shader driver params: */
 	IR3_DP_NUM_WORK_GROUPS_X = 0,
 	IR3_DP_NUM_WORK_GROUPS_Y = 1,
 	IR3_DP_NUM_WORK_GROUPS_Z = 2,
 	IR3_DP_CS_COUNT   = 4,   /* must be aligned to vec4 */
 
 	/* vertex shader driver params: */
 	IR3_DP_VTXID_BASE = 0,
@@ -332,20 +334,23 @@ uint64_t ir3_shader_outputs(const struct ir3_shader *so);
 
 struct fd_ringbuffer;
 struct fd_context;
 void ir3_emit_vs_consts(const struct ir3_shader_variant *v, struct fd_ringbuffer *ring,
 		struct fd_context *ctx, const struct pipe_draw_info *info);
 void ir3_emit_fs_consts(const struct ir3_shader_variant *v, struct fd_ringbuffer *ring,
 		struct fd_context *ctx);
 void ir3_emit_cs_consts(const struct ir3_shader_variant *v, struct fd_ringbuffer *ring,
 		struct fd_context *ctx, const struct pipe_grid_info *info);
 
+int
+ir3_glsl_type_size(const struct glsl_type *type);
+
 static inline const char *
 ir3_shader_stage(struct ir3_shader *shader)
 {
 	switch (shader->type) {
 	case SHADER_VERTEX:     return "VERT";
 	case SHADER_FRAGMENT:   return "FRAG";
 	case SHADER_COMPUTE:    return "CL";
 	default:
 		unreachable("invalid type");
 		return NULL;
diff --git a/src/gallium/drivers/vc4/vc4_program.c b/src/gallium/drivers/vc4/vc4_program.c
index 60eb68e..3beac61 100644
--- a/src/gallium/drivers/vc4/vc4_program.c
+++ b/src/gallium/drivers/vc4/vc4_program.c
@@ -26,31 +26,37 @@
 #include "util/u_format.h"
 #include "util/crc32.h"
 #include "util/u_math.h"
 #include "util/u_memory.h"
 #include "util/ralloc.h"
 #include "util/hash_table.h"
 #include "tgsi/tgsi_dump.h"
 #include "tgsi/tgsi_parse.h"
 #include "compiler/nir/nir.h"
 #include "compiler/nir/nir_builder.h"
+#include "compiler/nir_types.h"
 #include "nir/tgsi_to_nir.h"
 #include "vc4_context.h"
 #include "vc4_qpu.h"
 #include "vc4_qir.h"
-#include "mesa/state_tracker/st_glsl_types.h"
 
 static struct qreg
 ntq_get_src(struct vc4_compile *c, nir_src src, int i);
 static void
 ntq_emit_cf_list(struct vc4_compile *c, struct exec_list *list);
 
+static int
+type_size(const struct glsl_type *type)
+{
+   return glsl_count_attribute_slots(type, false);
+}
+
 static void
 resize_qreg_array(struct vc4_compile *c,
                   struct qreg **regs,
                   uint32_t *size,
                   uint32_t decl_size)
 {
         if (*size >= decl_size)
                 return;
 
         uint32_t old_size = *size;
@@ -1646,21 +1652,21 @@ ntq_setup_outputs(struct vc4_compile *c)
                                 break;
                         }
                 }
         }
 }
 
 static void
 ntq_setup_uniforms(struct vc4_compile *c)
 {
         nir_foreach_variable(var, &c->s->uniforms) {
-                uint32_t vec4_count = st_glsl_type_size(var->type);
+                uint32_t vec4_count = type_size(var->type);
                 unsigned vec4_size = 4 * sizeof(float);
 
                 declare_uniform_range(c, var->data.driver_location * vec4_size,
                                       vec4_count * vec4_size);
 
         }
 }
 
 /**
  * Sets up the mapping from nir_register to struct qreg *.
diff --git a/src/mesa/Makefile.sources b/src/mesa/Makefile.sources
index 86fbf39..47ea784 100644
--- a/src/mesa/Makefile.sources
+++ b/src/mesa/Makefile.sources
@@ -501,22 +501,20 @@ STATETRACKER_FILES = \
 	state_tracker/st_extensions.c \
 	state_tracker/st_extensions.h \
 	state_tracker/st_format.c \
 	state_tracker/st_format.h \
 	state_tracker/st_gen_mipmap.c \
 	state_tracker/st_gen_mipmap.h \
 	state_tracker/st_gl_api.h \
 	state_tracker/st_glsl_to_nir.cpp \
 	state_tracker/st_glsl_to_tgsi.cpp \
 	state_tracker/st_glsl_to_tgsi.h \
-	state_tracker/st_glsl_types.cpp \
-	state_tracker/st_glsl_types.h \
 	state_tracker/st_manager.c \
 	state_tracker/st_manager.h \
 	state_tracker/st_mesa_to_tgsi.c \
 	state_tracker/st_mesa_to_tgsi.h \
 	state_tracker/st_nir.h \
 	state_tracker/st_nir_lower_builtin.c \
 	state_tracker/st_nir_lower_tex_src_plane.c \
 	state_tracker/st_pbo.c \
 	state_tracker/st_pbo.h \
 	state_tracker/st_program.c \
diff --git a/src/mesa/state_tracker/st_glsl_to_nir.cpp b/src/mesa/state_tracker/st_glsl_to_nir.cpp
index c8a7464..dd3d6fa 100644
--- a/src/mesa/state_tracker/st_glsl_to_nir.cpp
+++ b/src/mesa/state_tracker/st_glsl_to_nir.cpp
@@ -32,28 +32,33 @@
 #include "program/prog_parameter.h"
 #include "program/ir_to_mesa.h"
 #include "main/mtypes.h"
 #include "main/errors.h"
 #include "main/shaderapi.h"
 #include "main/uniforms.h"
 #include "util/string_to_uint_map.h"
 
 #include "st_context.h"
 #include "st_program.h"
-#include "st_glsl_types.h"
 
 #include "compiler/nir/nir.h"
 #include "compiler/glsl_types.h"
 #include "compiler/glsl/glsl_to_nir.h"
 #include "compiler/glsl/ir.h"
 
 
+static int
+type_size(const struct glsl_type *type)
+{
+   return type->count_attribute_slots(false);
+}
+
 /* Depending on PIPE_CAP_TGSI_TEXCOORD (st->needs_texcoord_semantic) we
  * may need to fix up varying slots so the glsl->nir path is aligned
  * with the anything->tgsi->nir path.
  */
 static void
 st_nir_fixup_varying_slots(struct st_context *st, struct exec_list *var_list)
 {
    if (st->needs_texcoord_semantic)
       return;
 
@@ -198,21 +203,21 @@ st_nir_assign_uniform_locations(struct gl_program *prog,
          /* This state reference has already been setup by ir_to_mesa, but we'll
           * get the same index back here.
           */
          loc = _mesa_add_state_reference(prog->Parameters, stateTokens);
       } else {
          loc = st_nir_lookup_parameter_index(prog->Parameters, uniform->name);
       }
 
       uniform->data.driver_location = loc;
 
-      max = MAX2(max, loc + st_glsl_type_size(uniform->type));
+      max = MAX2(max, loc + type_size(uniform->type));
    }
    *size = max;
 }
 
 extern "C" {
 
 /* First half of converting glsl_to_nir.. this leaves things in a pre-
  * nir_lower_io state, so that shader variants can more easily insert/
  * replace variables, etc.
  */
@@ -325,31 +330,31 @@ st_finalize_nir(struct st_context *st, struct gl_program *prog, nir_shader *nir)
 
    if (nir->stage == MESA_SHADER_VERTEX) {
       /* Needs special handling so drvloc matches the vbo state: */
       st_nir_assign_vs_in_locations(prog, nir);
       /* Re-lower global vars, to deal with any dead VS inputs. */
       NIR_PASS_V(nir, nir_lower_global_vars_to_local);
 
       sort_varyings(&nir->outputs);
       nir_assign_var_locations(&nir->outputs,
                                &nir->num_outputs,
-                               st_glsl_type_size);
+                               type_size);
       st_nir_fixup_varying_slots(st, &nir->outputs);
    } else if (nir->stage == MESA_SHADER_FRAGMENT) {
       sort_varyings(&nir->inputs);
       nir_assign_var_locations(&nir->inputs,
                                &nir->num_inputs,
-                               st_glsl_type_size);
+                               type_size);
       st_nir_fixup_varying_slots(st, &nir->inputs);
       nir_assign_var_locations(&nir->outputs,
                                &nir->num_outputs,
-                               st_glsl_type_size);
+                               type_size);
    } else if (nir->stage == MESA_SHADER_COMPUTE) {
        /* TODO? */
    } else {
       unreachable("invalid shader type for tgsi bypass\n");
    }
 
    struct gl_shader_program *shader_program;
    switch (nir->stage) {
    case MESA_SHADER_VERTEX:
       shader_program = ((struct st_vertex_program *)prog)->shader_program;
@@ -365,21 +370,21 @@ st_finalize_nir(struct st_context *st, struct gl_program *prog, nir_shader *nir)
       return;
    }
 
    NIR_PASS_V(nir, nir_lower_atomics_to_ssbo,
          st->ctx->Const.Program[nir->stage].MaxAtomicBuffers);
 
    st_nir_assign_uniform_locations(prog, shader_program,
                                    &nir->uniforms, &nir->num_uniforms);
 
    NIR_PASS_V(nir, nir_lower_system_values);
-   NIR_PASS_V(nir, nir_lower_io, nir_var_all, st_glsl_type_size,
+   NIR_PASS_V(nir, nir_lower_io, nir_var_all, type_size,
               (nir_lower_io_options)0);
    if (screen->get_param(screen, PIPE_CAP_NIR_SAMPLERS_AS_DEREF))
       NIR_PASS_V(nir, nir_lower_samplers_as_deref, shader_program);
    else
       NIR_PASS_V(nir, nir_lower_samplers, shader_program);
 }
 
 struct gl_program *
 st_nir_get_mesa_program(struct gl_context *ctx,
                         struct gl_shader_program *shader_program,
diff --git a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
index 7c64a38..443d6c2 100644
--- a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
+++ b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
@@ -45,21 +45,20 @@
 
 #include "pipe/p_context.h"
 #include "pipe/p_screen.h"
 #include "tgsi/tgsi_ureg.h"
 #include "tgsi/tgsi_info.h"
 #include "util/u_math.h"
 #include "util/u_memory.h"
 #include "st_program.h"
 #include "st_mesa_to_tgsi.h"
 #include "st_format.h"
-#include "st_glsl_types.h"
 #include "st_nir.h"
 #include "st_shader_cache.h"
 
 #include "util/hash_table.h"
 #include <algorithm>
 
 #define PROGRAM_ANY_CONST ((1 << PROGRAM_STATE_VAR) |    \
                            (1 << PROGRAM_CONSTANT) |     \
                            (1 << PROGRAM_UNIFORM))
 
@@ -1221,27 +1220,27 @@ glsl_to_tgsi_visitor::st_src_reg_for_type(enum glsl_base_type type, int val)
    if (native_integers)
       return type == GLSL_TYPE_FLOAT ? st_src_reg_for_float(val) :
                                        st_src_reg_for_int(val);
    else
       return st_src_reg_for_float(val);
 }
 
 static int
 attrib_type_size(const struct glsl_type *type, bool is_vs_input)
 {
-   return st_glsl_attrib_type_size(type, is_vs_input);
+   return type->count_attribute_slots(is_vs_input);
 }
 
 static int
 type_size(const struct glsl_type *type)
 {
-   return st_glsl_type_size(type);
+   return type->count_attribute_slots(false);
 }
 
 /**
  * If the given GLSL type is an array or matrix or a structure containing
  * an array/matrix member, return true.  Else return false.
  *
  * This is used to determine which kind of temp storage (PROGRAM_TEMPORARY
  * or PROGRAM_ARRAY) should be used for variables of this type.  Anytime
  * we have an array that might be indexed with a variable, we need to use
  * the later storage type.
diff --git a/src/mesa/state_tracker/st_glsl_types.cpp b/src/mesa/state_tracker/st_glsl_types.cpp
deleted file mode 100644
index 37c3164..0000000
--- a/src/mesa/state_tracker/st_glsl_types.cpp
+++ /dev/null
@@ -1,107 +0,0 @@
-/*
- * Copyright (C) 2005-2007  Brian Paul   All Rights Reserved.
- * Copyright (C) 2008  VMware, Inc.   All Rights Reserved.
- * Copyright © 2010 Intel Corporation
- * Copyright © 2011 Bryan Cain
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the next
- * paragraph) shall be included in all copies or substantial portions of the
- * Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
- * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- */
-
-#include "st_glsl_types.h"
-
-/**
- * Returns type size in units of vec4 slots.
- */
-int
-st_glsl_attrib_type_size(const struct glsl_type *type, bool is_vs_input)
-{
-   unsigned int i;
-   int size;
-
-   switch (type->base_type) {
-   case GLSL_TYPE_UINT:
-   case GLSL_TYPE_INT:
-   case GLSL_TYPE_FLOAT:
-   case GLSL_TYPE_BOOL:
-      if (type->is_matrix()) {
-         return type->matrix_columns;
-      } else {
-         /* Regardless of size of vector, it gets a vec4. This is bad
-          * packing for things like floats, but otherwise arrays become a
-          * mess.  Hopefully a later pass over the code can pack scalars
-          * down if appropriate.
-          */
-         return 1;
-      }
-      break;
-   case GLSL_TYPE_DOUBLE:
-      if (type->is_matrix()) {
-         if (type->vector_elements <= 2 || is_vs_input)
-            return type->matrix_columns;
-         else
-            return type->matrix_columns * 2;
-      } else {
-         /* For doubles if we have a double or dvec2 they fit in one
-          * vec4, else they need 2 vec4s.
-          */
-         if (type->vector_elements <= 2 || is_vs_input)
-            return 1;
-         else
-            return 2;
-      }
-      break;
-   case GLSL_TYPE_UINT64:
-   case GLSL_TYPE_INT64:
-      if (type->vector_elements <= 2 || is_vs_input)
-         return 1;
-      else
-         return 2;
-   case GLSL_TYPE_ARRAY:
-      assert(type->length > 0);
-      return st_glsl_attrib_type_size(type->fields.array, is_vs_input) * type->length;
-   case GLSL_TYPE_STRUCT:
-      size = 0;
-      for (i = 0; i < type->length; i++) {
-         size += st_glsl_attrib_type_size(type->fields.structure[i].type, is_vs_input);
-      }
-      return size;
-   case GLSL_TYPE_SAMPLER:
-   case GLSL_TYPE_IMAGE:
-   case GLSL_TYPE_SUBROUTINE:
-      /* Samplers take up one slot in UNIFORMS[], but they're baked in
-       * at link time.
-       */
-      return 1;
-   case GLSL_TYPE_ATOMIC_UINT:
-   case GLSL_TYPE_INTERFACE:
-   case GLSL_TYPE_VOID:
-   case GLSL_TYPE_ERROR:
-   case GLSL_TYPE_FUNCTION:
-      assert(!"Invalid type in type_size");
-      break;
-   }
-   return 0;
-}
-
-int
-st_glsl_type_size(const struct glsl_type *type)
-{
-   return st_glsl_attrib_type_size(type, false);
-}
diff --git a/src/mesa/state_tracker/st_glsl_types.h b/src/mesa/state_tracker/st_glsl_types.h
deleted file mode 100644
index 3a39cee..0000000
--- a/src/mesa/state_tracker/st_glsl_types.h
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Copyright (C) 2005-2007  Brian Paul   All Rights Reserved.
- * Copyright (C) 2008  VMware, Inc.   All Rights Reserved.
- * Copyright © 2010 Intel Corporation
- * Copyright © 2011 Bryan Cain
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the next
- * paragraph) shall be included in all copies or substantial portions of the
- * Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
- * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- */
-
-#ifndef __ST_GLSL_TYPES_H__
-#define __ST_GLSL_TYPES_H__
-
-#include "compiler/glsl_types.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-int st_glsl_attrib_type_size(const struct glsl_type *type, bool is_vs_input);
-int st_glsl_type_size(const struct glsl_type *type);
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __ST_GLSL_TYPES_H__ */
-- 
2.9.3



More information about the mesa-dev mailing list