[Bug 89597] Implement SSBOs in GLSL front-end and i965

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Fri Mar 27 00:48:00 PDT 2015


https://bugs.freedesktop.org/show_bug.cgi?id=89597

Iago Toral <itoral at igalia.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |krh at bitplanet.net

--- Comment #5 from Iago Toral <itoral at igalia.com> ---
Kristian, the prototype patch you attached defines a ir_binop_ssbo_store
operator for ir_expressions. I have a quick implementation of the ssbo write as
an expression operator that looks like this in GLSL IR:

(declare (temporary ) vec4 ssbo_write_temp)
(assign  (zw) (var_ref ssbo_write_temp)  (constant vec2 (-3.000000 -4.000000))
) 
(expression vec4 ssbo_store (constant uint (0)) (constant uint (0)) (var_ref
ssbo_write_temp) ) 

(I made it a triop because besides the block number and offset we also need the
value to write. In fact, it would have to end up being quadop because we also
need a write mask operand to know which channels we need to write).

In the beginning I found odd to implement ssbo_store as an expression operator,
mostly because it is not expected to return any value. In fact, I expected that
it would be killed by dead code elimination passes because of this reason. It
seems that I was wrong and this is working fine, but I am not aware of other
expression operators that work like this (I mean, which are not used as part of
a RHS in an assignment), so I wonder if this is how you envisioned the
implementation or if you think that we should implement the ssbo write
differently (maybe having a separate ir_ssbo_store IR node).

What do you think?

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/intel-3d-bugs/attachments/20150327/e081f420/attachment.html>


More information about the intel-3d-bugs mailing list