This is like nir_texop_tex, but signals that the sampling coordinates
are immutable during the shader stage, in a way that allows the HW
that supports pre-dispatching sampling operations to pre-fetch
the result prior to scheduling the shader stage.
This is introduced to support the feature in Freedreno. Adreno HW
from a4xx supports it.
A NIR pass introduced later in this series will detect sampling
operations that are eligible for pre-dispatch, and replace
nir_texop_tex by this new op, to tell the backend to enable
pre-fetch.
Signed-off-by: Rob Clark <robdclark@chromium.org>
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
nir_texop_samples_identical, /**< Query whether all samples are definitely
* identical.
*/
+ nir_texop_tex_prefetch, /**< Regular texture look-up, eligible for pre-dispatch */
} nir_texop;
typedef struct {
case nir_texop_samples_identical:
fprintf(fp, "samples_identical ");
break;
+ case nir_texop_tex_prefetch:
+ fprintf(fp, "tex (pre-dispatchable) ");
+ break;
default:
unreachable("Invalid texture operation");
break;
break;
case nir_texop_txf_ms_mcs:
vtn_fail("unexpected nir_texop_txf_ms_mcs");
+ case nir_texop_tex_prefetch:
+ vtn_fail("unexpected nir_texop_tex_prefetch");
}
unsigned idx = 4;