diff options
author | Jason Ekstrand <[email protected]> | 2019-01-12 10:58:33 -0600 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2019-03-05 10:06:50 -0600 |
commit | 61e009d2c4e4dfc071185f9e9c6366bc53168019 (patch) | |
tree | 5138789301eff4021246e9d7d616d8fead0ec860 /src/intel/compiler | |
parent | 9f7ee4f8e5b2aa492804367dd64fd5497cb23d1d (diff) |
spirv: Use the same types for resource indices as pointers
We need more space than just a 32-bit scalar and we have to burn all
that space anyway so we may as well expose it to the driver. This also
fixes a subtle bug when UBOs and SSBOs have different pointer types.
Reviewed-by: Lionel Landwerlin <[email protected]>
Diffstat (limited to 'src/intel/compiler')
-rw-r--r-- | src/intel/compiler/brw_fs_nir.cpp | 1 | ||||
-rw-r--r-- | src/intel/compiler/brw_vec4_nir.cpp | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/src/intel/compiler/brw_fs_nir.cpp b/src/intel/compiler/brw_fs_nir.cpp index a7abaf742e2..0b51d78f36c 100644 --- a/src/intel/compiler/brw_fs_nir.cpp +++ b/src/intel/compiler/brw_fs_nir.cpp @@ -4368,6 +4368,7 @@ fs_visitor::nir_emit_intrinsic(const fs_builder &bld, nir_intrinsic_instr *instr break; case nir_intrinsic_get_buffer_size: { + assert(nir_src_num_components(instr->src[0]) == 1); unsigned ssbo_index = nir_src_is_const(instr->src[0]) ? nir_src_as_uint(instr->src[0]) : 0; diff --git a/src/intel/compiler/brw_vec4_nir.cpp b/src/intel/compiler/brw_vec4_nir.cpp index 882e97a1bf1..3576074fc36 100644 --- a/src/intel/compiler/brw_vec4_nir.cpp +++ b/src/intel/compiler/brw_vec4_nir.cpp @@ -467,6 +467,7 @@ vec4_visitor::nir_emit_intrinsic(nir_intrinsic_instr *instr) } case nir_intrinsic_get_buffer_size: { + assert(nir_src_num_components(instr->src[0]) == 1); unsigned ssbo_index = nir_src_is_const(instr->src[0]) ? nir_src_as_uint(instr->src[0]) : 0; |