mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-26 02:00:12 +01:00
i965: Provide means to create registers of a given size.
Implemented by Ilia Mirkin <imirkin@alum.mit.edu>. Acked-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
This commit is contained in:
parent
f373b7ed82
commit
9b32fd0f70
2 changed files with 15 additions and 0 deletions
|
|
@ -107,6 +107,7 @@ public:
|
|||
bool equals(const src_reg &r) const;
|
||||
|
||||
src_reg(class vec4_visitor *v, const struct glsl_type *type);
|
||||
src_reg(class vec4_visitor *v, const struct glsl_type *type, int size);
|
||||
|
||||
explicit src_reg(dst_reg reg);
|
||||
|
||||
|
|
|
|||
|
|
@ -639,6 +639,20 @@ src_reg::src_reg(class vec4_visitor *v, const struct glsl_type *type)
|
|||
this->type = brw_type_for_base_type(type);
|
||||
}
|
||||
|
||||
src_reg::src_reg(class vec4_visitor *v, const struct glsl_type *type, int size)
|
||||
{
|
||||
assert(size > 0);
|
||||
|
||||
init();
|
||||
|
||||
this->file = GRF;
|
||||
this->reg = v->virtual_grf_alloc(type_size(type) * size);
|
||||
|
||||
this->swizzle = BRW_SWIZZLE_NOOP;
|
||||
|
||||
this->type = brw_type_for_base_type(type);
|
||||
}
|
||||
|
||||
dst_reg::dst_reg(class vec4_visitor *v, const struct glsl_type *type)
|
||||
{
|
||||
init();
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue