@ -7109,7 +7109,7 @@ static bool allocate_strbuffers(struct vrend_glsl_strbufs* glsl_strbufs)
return true ;
return true ;
}
}
static void set_strbuffers ( ASSERTED const struct vrend_context * rctx , const struct vrend_glsl_strbufs * glsl_strbufs ,
static void set_strbuffers ( const struct vrend_glsl_strbufs * glsl_strbufs ,
struct vrend_strarray * shader )
struct vrend_strarray * shader )
{
{
strarray_addstrbuf ( shader , & glsl_strbufs - > glsl_ver_ext ) ;
strarray_addstrbuf ( shader , & glsl_strbufs - > glsl_ver_ext ) ;
@ -7117,8 +7117,7 @@ static void set_strbuffers(ASSERTED const struct vrend_context *rctx, const stru
strarray_addstrbuf ( shader , & glsl_strbufs - > glsl_main ) ;
strarray_addstrbuf ( shader , & glsl_strbufs - > glsl_main ) ;
}
}
static bool vrend_patch_vertex_shader_interpolants ( ASSERTED const struct vrend_context * rctx ,
static bool vrend_patch_vertex_shader_interpolants ( const struct vrend_shader_cfg * cfg ,
const struct vrend_shader_cfg * cfg ,
struct vrend_strarray * prog_strings ,
struct vrend_strarray * prog_strings ,
const struct vrend_shader_info * vs_info ,
const struct vrend_shader_info * vs_info ,
const struct vrend_fs_shader_info * fs_info ,
const struct vrend_fs_shader_info * fs_info ,
@ -7224,27 +7223,24 @@ bool vrend_convert_shader(const struct vrend_context *rctx,
fill_sinfo ( & ctx , sinfo ) ;
fill_sinfo ( & ctx , sinfo ) ;
fill_var_sinfo ( & ctx , var_sinfo ) ;
fill_var_sinfo ( & ctx , var_sinfo ) ;
set_strbuffers ( rctx , & ctx . glsl_strbufs , shader ) ;
set_strbuffers ( & ctx . glsl_strbufs , shader ) ;
if ( ctx . prog_type = = TGSI_PROCESSOR_GEOMETRY ) {
if ( ctx . prog_type = = TGSI_PROCESSOR_GEOMETRY ) {
vrend_patch_vertex_shader_interpolants ( rctx ,
vrend_patch_vertex_shader_interpolants ( cfg ,
cfg ,
shader ,
shader ,
sinfo ,
sinfo ,
key - > fs_info , " gso " ,
key - > fs_info , " gso " ,
key - > flatshade ) ;
key - > flatshade ) ;
} else if ( ! key - > gs_present & &
} else if ( ! key - > gs_present & &
ctx . prog_type = = TGSI_PROCESSOR_TESS_EVAL ) {
ctx . prog_type = = TGSI_PROCESSOR_TESS_EVAL ) {
vrend_patch_vertex_shader_interpolants ( rctx ,
vrend_patch_vertex_shader_interpolants ( cfg ,
cfg ,
shader ,
shader ,
sinfo ,
sinfo ,
key - > fs_info , " teo " ,
key - > fs_info , " teo " ,
key - > flatshade ) ;
key - > flatshade ) ;
} else if ( ! key - > gs_present & & ! key - > tes_present & &
} else if ( ! key - > gs_present & & ! key - > tes_present & &
ctx . prog_type = = TGSI_PROCESSOR_VERTEX ) {
ctx . prog_type = = TGSI_PROCESSOR_VERTEX ) {
vrend_patch_vertex_shader_interpolants ( rctx ,
vrend_patch_vertex_shader_interpolants ( cfg ,
cfg ,
shader ,
shader ,
sinfo ,
sinfo ,
key - > fs_info , " vso " ,
key - > fs_info , " vso " ,
@ -7303,7 +7299,7 @@ static void require_gpu_shader5_and_msinterp(struct vrend_strarray *program)
strbuf_append ( & program - > strings [ SHADER_STRING_VER_EXT ] , gpu_shader5_and_msinterp_string ) ;
strbuf_append ( & program - > strings [ SHADER_STRING_VER_EXT ] , gpu_shader5_and_msinterp_string ) ;
}
}
static bool vrend_patch_vertex_shader_interpolants ( ASSERTED const struct vrend_context * rctx ,
static bool vrend_patch_vertex_shader_interpolants (
const struct vrend_shader_cfg * cfg ,
const struct vrend_shader_cfg * cfg ,
struct vrend_strarray * prog_strings ,
struct vrend_strarray * prog_strings ,
const struct vrend_shader_info * vs_info ,
const struct vrend_shader_info * vs_info ,
@ -7566,7 +7562,7 @@ bool vrend_shader_create_passthrough_tcs(const struct vrend_context *rctx,
emit_buf ( & ctx . glsl_strbufs , " } \n " ) ;
emit_buf ( & ctx . glsl_strbufs , " } \n " ) ;
fill_sinfo ( & ctx , sinfo ) ;
fill_sinfo ( & ctx , sinfo ) ;
set_strbuffers ( rctx , & ctx . glsl_strbufs , shader ) ;
set_strbuffers ( & ctx . glsl_strbufs , shader ) ;
VREND_DEBUG ( dbg_shader_glsl , rctx , " GLSL: " ) ;
VREND_DEBUG ( dbg_shader_glsl , rctx , " GLSL: " ) ;
VREND_DEBUG_EXT ( dbg_shader_glsl , rctx , strarray_dump ( shader ) ) ;
VREND_DEBUG_EXT ( dbg_shader_glsl , rctx , strarray_dump ( shader ) ) ;