diff options
author | Eduardo Lima Mitev <[email protected]> | 2018-10-23 21:24:11 +0200 |
---|---|---|
committer | Eduardo Lima Mitev <[email protected]> | 2018-10-24 18:18:35 +0200 |
commit | b0c427043bc01dde32e91893f2fb881e9bd99967 (patch) | |
tree | 203c75ef73bb54f57e94f4ac26a97eadb8387676 /src/amd | |
parent | d9a04196d9b3919ed216842510606654eb64222d (diff) |
ir3_compiler/nir: fix imageSize() for buffer-backed images
GL_EXT_texture_buffer introduced texture buffers, which can be used
in shaders through a new type imageBuffer.
Because how image access is implemented in freedreno, calling
imageSize on an imageBuffer returns the size in bytes instead of texels,
which is incorrect.
This patch adds a division of imageSize result by the bytes-per-pixel
of the image format, when image is buffer-backed.
Fixes all tests under
dEQP-GLES31.functional.image_load_store.buffer.image_size.*
v2: Pre-compute and submit the log2 of the image format's bpp as shader
constant instead of emitting the LOG2 instruction in code. (Rob Clark)
v3: Use ffs (find-first-bit) helper for computing log2 (Ilia Mirkin)
Reviewed-by: Rob Clark <[email protected]>
Diffstat (limited to 'src/amd')
0 files changed, 0 insertions, 0 deletions