nir/i965/freedreno/vc4: add a bindless bool to type size functions

This required to calculate sizes correctly when we have bindless
samplers/images.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
This commit is contained in:
Timothy Arceri
2019-03-29 12:39:48 +11:00
committed by Karol Herbst
parent 3b2a9ffd60
commit 035759b61b
16 changed files with 76 additions and 59 deletions

View File

@@ -32,20 +32,20 @@
extern "C" {
#endif
int type_size_scalar(const struct glsl_type *type);
int type_size_vec4(const struct glsl_type *type);
int type_size_dvec4(const struct glsl_type *type);
int type_size_scalar(const struct glsl_type *type, bool bindless);
int type_size_vec4(const struct glsl_type *type, bool bindless);
int type_size_dvec4(const struct glsl_type *type, bool bindless);
static inline int
type_size_scalar_bytes(const struct glsl_type *type)
type_size_scalar_bytes(const struct glsl_type *type, bool bindless)
{
return type_size_scalar(type) * 4;
return type_size_scalar(type, bindless) * 4;
}
static inline int
type_size_vec4_bytes(const struct glsl_type *type)
type_size_vec4_bytes(const struct glsl_type *type, bool bindless)
{
return type_size_vec4(type) * 16;
return type_size_vec4(type, bindless) * 16;
}
/* Flags set in the instr->pass_flags field by i965 analysis passes */