Skip to content

Instantly share code, notes, and snippets.

@anarsoul
Created December 17, 2017 07:47
Show Gist options
  • Save anarsoul/342a75689b4ab310acd1da2135c0fa57 to your computer and use it in GitHub Desktop.
Save anarsoul/342a75689b4ab310acd1da2135c0fa57 to your computer and use it in GitHub Desktop.
shader: MESA_SHADER_FRAGMENT
name: GLSL3
inputs: 1
outputs: 1
uniforms: 2
shared: 0
decl_var uniform INTERP_MODE_NONE float diffTest (3, 0, 0)
decl_var uniform INTERP_MODE_NONE vec4 uAnotherColor (4, 1, 0)
decl_var shader_in INTERP_MODE_SMOOTH float diff (VARYING_SLOT_VAR9, 0, 0)
decl_var shader_out INTERP_MODE_NONE vec4 gl_FragColor (FRAG_RESULT_COLOR, 0, 0)
decl_function main returning void
impl main {
block block_0:
/* preds: */
vec1 32 ssa_0 = load_const (0x00000000 /* 0.000000 */)
vec1 32 ssa_1 = intrinsic load_input (ssa_0) () (0, 0) /* base=0 */ /* component=0 */ /* diff */
vec1 32 ssa_2 = intrinsic load_uniform (ssa_0) () (0, 1, 0) /* base=0 */ /* range=1 */ /* component=0 */ /* diffTest */
vec1 32 ssa_3 = fmul ssa_1, ssa_2
vec4 32 ssa_4 = intrinsic load_uniform (ssa_0) () (1, 1, 0) /* base=1 */ /* range=1 */ /* component=0 */ /* uAnotherColor */
vec4 32 ssa_5 = fmul ssa_3.xxxx, ssa_4
intrinsic store_output (ssa_5, ssa_0) () (0, 15, 0) /* base=0 */ /* wrmask=xyzw */ /* component=0 */ /* gl_FragColor */
/* succs: block_0 */
block block_0:
}
========prog========
-------block------
const 0 ssa0
st_col 6 new
mul 5 ssa5
mul 3 ssa3
ld_var 1 ssa1
ld_uni 2 ssa2
ld_uni 4 ssa4
====================
========prog========
-------block------
st_col 6 new
mul 5 ssa5
mul 3 ssa3
ld_var 1 ssa1
ld_uni 2 ssa2
ld_uni 4 ssa4
====================
ppir: node_to_instr create move 7 from store 6
======ppir instr list======
vary texl unif vmul smul vadd sadd comb stor const0|1
*000: null null 4 5 null 7 null null null |
001: null null 2 null 3 null null null null |
002: 1 null null null null null null null null |
------------------------
======ppir instr depend======
[0[1[2]]]
------------------------
======ppir regalloc result======
002: (1|0|)
001: (2|60|) (3|0|0 60)
000: (4|60|) (5|64|0 60) (7|0|64)
--------------------------
========ppir codegen========
002: 02200083 10003c00 00000000
001: 02280a04 00000000 00000000 00000000
000: 00001625 02000800 27800000 e4001e07 fcf00000
-----------------------
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment