> diff --git a/src/glsl/builtins/tools/texture_builtins.py
> b/src/glsl/builtins/tools/texture_builtins.py
> index 654eb06..37fb749 100755
> --- a/src/glsl/builtins/tools/texture_builtins.py
> +++ b/src/glsl/builtins/tools/texture_builtins.py
> @@ -57,6 +57,12 @@ def get_txs_dim(sampler_type):
> return 2
> return get_coord_dim(sampler_type)
>
> +def has_lod(sampler_type):
> + if 'Buffer' in sampler_type: return False
> + if 'Rect' in sampler_type: return False
> + if 'MS' in sampler_type: return False
> + return True
> +
> def generate_sigs(g, tex_inst, sampler_type, variant = 0, unused_fields = 0):
> coord_dim = get_coord_dim(sampler_type)
> extra_dim = get_extra_dim(sampler_type, variant & Proj, unused_fields)
> @@ -74,11 +80,13 @@ def generate_sigs(g, tex_inst, sampler_type, variant = 0,
> unused_fields = 0):
> print " (parameters"
> print " (declare (in) " + g + "sampler" + sampler_type + "
> sampler)",
> if tex_inst != "txs":
> - print "\n (declare (in) " + vec_type("i" if tex_inst == "txf"
> else "", coord_dim + extra_dim) + " P)",
> + print "\n (declare (in) " + vec_type("i" if tex_inst in
> ['txf','txf_ms'] else "", coord_dim + extra_dim) + " P)",
> if tex_inst == "txl":
> print "\n (declare (in) float lod)",
> - elif ((tex_inst == "txf" or tex_inst == "txs") and "Buffer" not in
> sampler_type and "Rect" not in sampler_type):
> + elif tex_inst in ['txf', 'txs'] and has_lod(sampler_type):
> print "\n (declare (in) int lod)",
> + elif tex_inst == "txf_ms":
> + print "\n (declare (in) int sample)",Weird indentation > diff --git a/src/glsl/glsl_types.cpp b/src/glsl/glsl_types.cpp > index 4a2c879..0970522 100644 > --- a/src/glsl/glsl_types.cpp > +++ b/src/glsl/glsl_types.cpp > @@ -178,6 +178,8 @@ glsl_type::sampler_index() const > return TEXTURE_BUFFER_INDEX; > case GLSL_SAMPLER_DIM_EXTERNAL: > return TEXTURE_EXTERNAL_INDEX; > + case GLSL_SAMPLER_DIM_MS: > + return (t->sampler_array) ? TEXTURE_2D_MULTISAMPLE_ARRAY_INDEX: > TEXTURE_2D_MULTISAMPLE_INDEX; Missing space before ":" Other than that, patch 4 through this one are: Reviewed-by: Eric Anholt <[email protected]>
pgpraY77miMWS.pgp
Description: PGP signature
_______________________________________________ mesa-dev mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/mesa-dev
