[Mesa-dev] [PATCH 3/4] st/mesa: emit sampler view decls in PBO upload shader
Nicolai Hähnle
nhaehnle at gmail.com
Thu Mar 17 16:47:48 UTC 2016
On 16.03.2016 19:43, Brian Paul wrote:
> The return type is float, which is what was implicitly used before, AFAICT.
Isn't this technically incorrect when the uploaded texture is integer?
To be honest, it's not really clear to me what the return type is
supposed to mean. I don't think any of the hardware drivers uses it.
Cheers,
Nicolai
> ---
> src/mesa/state_tracker/st_cb_texture.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/src/mesa/state_tracker/st_cb_texture.c b/src/mesa/state_tracker/st_cb_texture.c
> index bffa4d0..6ee55c6 100644
> --- a/src/mesa/state_tracker/st_cb_texture.c
> +++ b/src/mesa/state_tracker/st_cb_texture.c
> @@ -1228,6 +1228,12 @@ create_pbo_upload_fs(struct st_context *st)
>
> out = ureg_DECL_output(ureg, TGSI_SEMANTIC_COLOR, 0);
> sampler = ureg_DECL_sampler(ureg, 0);
> + ureg_DECL_sampler_view(ureg, 0, TGSI_TEXTURE_BUFFER,
> + TGSI_RETURN_TYPE_FLOAT,
> + TGSI_RETURN_TYPE_FLOAT,
> + TGSI_RETURN_TYPE_FLOAT,
> + TGSI_RETURN_TYPE_FLOAT);
> +
> if (screen->get_param(screen, PIPE_CAP_TGSI_FS_POSITION_IS_SYSVAL)) {
> pos = ureg_DECL_system_value(ureg, TGSI_SEMANTIC_POSITION, 0);
> } else {
>
More information about the mesa-dev
mailing list