summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/nouveau/codegen
diff options
context:
space:
mode:
authorTimothy Arceri <[email protected]>2019-03-29 12:39:48 +1100
committerKarol Herbst <[email protected]>2019-04-12 09:02:59 +0200
commit035759b61ba1778d5143cdf3a8795a62dd5d8a60 (patch)
tree18f3e4fb796338f1e72defe381e9bd7e463e7ce3 /src/gallium/drivers/nouveau/codegen
parent3b2a9ffd60eb3612e1034019e499a27a1c2a672b (diff)
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 <[email protected]>
Diffstat (limited to 'src/gallium/drivers/nouveau/codegen')
-rw-r--r--src/gallium/drivers/nouveau/codegen/nv50_ir_from_nir.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_from_nir.cpp b/src/gallium/drivers/nouveau/codegen/nv50_ir_from_nir.cpp
index ed0c5d24b85..1e4dd15d114 100644
--- a/src/gallium/drivers/nouveau/codegen/nv50_ir_from_nir.cpp
+++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_from_nir.cpp
@@ -53,7 +53,7 @@ using std::tr1::unordered_map;
using namespace nv50_ir;
int
-type_size(const struct glsl_type *type)
+type_size(const struct glsl_type *type, bool bindless)
{
return glsl_count_attribute_slots(type, false);
}
@@ -3028,7 +3028,7 @@ Converter::handleDeref(nir_deref_instr *deref, Value * &indirect, const nir_vari
switch (deref->deref_type) {
case nir_deref_type_array: {
Value *indirect;
- uint8_t size = type_size(deref->type);
+ uint8_t size = type_size(deref->type, true);
result += size * getIndirect(&deref->arr.index, 0, indirect);
if (indirect) {