gallium+mesa: fix tgsi_semantic array type
Fixes: ed23335a31
("gallium: use enums in p_shader_tokens.h (v2)")
Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
This commit is contained in:
@@ -213,8 +213,10 @@ set_vertex_shader(struct blit_state *ctx)
|
|||||||
* fragment shader input semantics and vertex_element/buffers.
|
* fragment shader input semantics and vertex_element/buffers.
|
||||||
*/
|
*/
|
||||||
if (!ctx->vs) {
|
if (!ctx->vs) {
|
||||||
const uint semantic_names[] = { TGSI_SEMANTIC_POSITION,
|
const enum tgsi_semantic semantic_names[] = {
|
||||||
TGSI_SEMANTIC_GENERIC };
|
TGSI_SEMANTIC_POSITION,
|
||||||
|
TGSI_SEMANTIC_GENERIC
|
||||||
|
};
|
||||||
const uint semantic_indexes[] = { 0, 0 };
|
const uint semantic_indexes[] = { 0, 0 };
|
||||||
ctx->vs = util_make_vertex_passthrough_shader(ctx->pipe, 2,
|
ctx->vs = util_make_vertex_passthrough_shader(ctx->pipe, 2,
|
||||||
semantic_names,
|
semantic_names,
|
||||||
|
@@ -176,8 +176,10 @@ set_vertex_shader(struct st_context *st)
|
|||||||
if (use_nir) {
|
if (use_nir) {
|
||||||
st->clear.vs = make_nir_clear_vertex_shader(st, false);
|
st->clear.vs = make_nir_clear_vertex_shader(st, false);
|
||||||
} else {
|
} else {
|
||||||
const uint semantic_names[] = { TGSI_SEMANTIC_POSITION,
|
const enum tgsi_semantic semantic_names[] = {
|
||||||
TGSI_SEMANTIC_GENERIC };
|
TGSI_SEMANTIC_POSITION,
|
||||||
|
TGSI_SEMANTIC_GENERIC
|
||||||
|
};
|
||||||
const uint semantic_indexes[] = { 0, 0 };
|
const uint semantic_indexes[] = { 0, 0 };
|
||||||
st->clear.vs = util_make_vertex_passthrough_shader(st->pipe, 2,
|
st->clear.vs = util_make_vertex_passthrough_shader(st->pipe, 2,
|
||||||
semantic_names,
|
semantic_names,
|
||||||
|
@@ -324,10 +324,12 @@ st_make_passthrough_vertex_shader(struct st_context *st)
|
|||||||
MESA_SHADER_VERTEX, 3,
|
MESA_SHADER_VERTEX, 3,
|
||||||
inputs, outputs, NULL, 0);
|
inputs, outputs, NULL, 0);
|
||||||
} else {
|
} else {
|
||||||
const uint semantic_names[] = { TGSI_SEMANTIC_POSITION,
|
const enum tgsi_semantic semantic_names[] = {
|
||||||
TGSI_SEMANTIC_COLOR,
|
TGSI_SEMANTIC_POSITION,
|
||||||
st->needs_texcoord_semantic ? TGSI_SEMANTIC_TEXCOORD :
|
TGSI_SEMANTIC_COLOR,
|
||||||
TGSI_SEMANTIC_GENERIC };
|
st->needs_texcoord_semantic ? TGSI_SEMANTIC_TEXCOORD :
|
||||||
|
TGSI_SEMANTIC_GENERIC
|
||||||
|
};
|
||||||
const uint semantic_indexes[] = { 0, 0, 0 };
|
const uint semantic_indexes[] = { 0, 0, 0 };
|
||||||
|
|
||||||
st->passthrough_vs =
|
st->passthrough_vs =
|
||||||
|
@@ -92,7 +92,7 @@ semantic_to_varying_slot(unsigned semantic)
|
|||||||
static void *
|
static void *
|
||||||
lookup_shader(struct st_context *st,
|
lookup_shader(struct st_context *st,
|
||||||
uint num_attribs,
|
uint num_attribs,
|
||||||
const uint *semantic_names,
|
const enum tgsi_semantic *semantic_names,
|
||||||
const uint *semantic_indexes)
|
const uint *semantic_indexes)
|
||||||
{
|
{
|
||||||
struct pipe_context *pipe = st->pipe;
|
struct pipe_context *pipe = st->pipe;
|
||||||
@@ -168,7 +168,7 @@ st_DrawTex(struct gl_context *ctx, GLfloat x, GLfloat y, GLfloat z,
|
|||||||
struct pipe_resource *vbuffer = NULL;
|
struct pipe_resource *vbuffer = NULL;
|
||||||
GLuint i, numTexCoords, numAttribs;
|
GLuint i, numTexCoords, numAttribs;
|
||||||
GLboolean emitColor;
|
GLboolean emitColor;
|
||||||
uint semantic_names[2 + MAX_TEXTURE_UNITS];
|
enum tgsi_semantic semantic_names[2 + MAX_TEXTURE_UNITS];
|
||||||
uint semantic_indexes[2 + MAX_TEXTURE_UNITS];
|
uint semantic_indexes[2 + MAX_TEXTURE_UNITS];
|
||||||
struct pipe_vertex_element velements[2 + MAX_TEXTURE_UNITS];
|
struct pipe_vertex_element velements[2 + MAX_TEXTURE_UNITS];
|
||||||
unsigned offset;
|
unsigned offset;
|
||||||
|
Reference in New Issue
Block a user