diff options
author | Eduardo Lima Mitev <[email protected]> | 2018-12-17 21:41:24 +0100 |
---|---|---|
committer | Eduardo Lima Mitev <[email protected]> | 2018-12-18 21:15:20 +0100 |
commit | 5820e63418ce2449b19d1bcba8184388e76355d7 (patch) | |
tree | 3f046d7823f5399b57f24556ee98c6a75dfed9d8 /docs | |
parent | 5dad1abfdcfc772c63e7c883ab34ae1ad39461f3 (diff) |
freedreno/ir3: Make imageStore use num components from image format
emit_intrinsic_store_image() is always using 4 components when
collecting registers for the value. When image has less than
4 components (e.g, r32f, rg32i, etc) this results in extra mov
instructions.
This patch uses the actual number of components from the image format.
For example, in a shader like:
layout (r32f, binding=0) writeonly uniform imageBuffer u_image;
...
void main(void) {
...
imageStore (u_image, some_offset, vec4(1.0));
...
}
instruction count is reduced in at least 3 instructions (note image
format is r32f, 1 component only).
This obviously reduces register pressure as well.
v2: - Added support for image formats from NV_image_format extension
(Ilia Mirkin).
- Return 4 components by default instead of asserting. (Rob Clark).
v3: Added more missing formats (Ilia Mirkin).
v4: Added a debug message for unknown image formats (Rob Clark).
Reviewed-by: Ilia Mirkin <[email protected]>
Reviewed-by: Rob Clark <[email protected]>
Diffstat (limited to 'docs')
0 files changed, 0 insertions, 0 deletions