From cca0389c729a7aae1d9793922592358cf683eed8 Mon Sep 17 00:00:00 2001 From: Marek Olšák Date: Tue, 7 Mar 2017 02:15:14 +0100 Subject: gallium: add TGSI opcodes TEX_LZ and TXF_LZ for better code generation in radeonsi --- src/gallium/docs/source/tgsi.rst | 33 ++++++++++++++++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) (limited to 'src/gallium/docs/source/tgsi.rst') diff --git a/src/gallium/docs/source/tgsi.rst b/src/gallium/docs/source/tgsi.rst index 32ec4ef2ac3..18b42fba747 100644 --- a/src/gallium/docs/source/tgsi.rst +++ b/src/gallium/docs/source/tgsi.rst @@ -755,6 +755,29 @@ This instruction replicates its result. dst = src0.x \times src1.x + src0.y \times src1.y +.. opcode:: TEX_LZ - Texture Lookup With LOD = 0 + + This is the same as TXL with LOD = 0. Like every texture opcode, it obeys + pipe_sampler_view::u.tex.first_level and pipe_sampler_state::min_lod. + There is no way to override those two in shaders. + +.. math:: + + coord.x = src0.x + + coord.y = src0.y + + coord.z = src0.z + + coord.w = none + + lod = 0 + + unit = src1 + + dst = texture\_sample(unit, coord, lod) + + .. opcode:: TXL - Texture Lookup With explicit LOD for cube map array textures, the explicit lod value @@ -918,10 +941,18 @@ XXX doesn't look like most of the opcodes really belong here. four-component signed integer vector used to identify the single texel accessed. 3 components + level. Just like texture instructions, an optional offset vector is provided, which is subject to various driver restrictions - (regarding range, source of offsets). + (regarding range, source of offsets). This instruction ignores the sampler + state. + TXF(uint_vec coord, int_vec offset). +.. opcode:: TXF_LZ - Texel Fetch + + This is the same as TXF with level = 0. Like TXF, it obeys + pipe_sampler_view::u.tex.first_level. + + .. opcode:: TXQ - Texture Size Query As per NV_gpu_program4, retrieve the dimensions of the texture depending on -- cgit v1.2.3