i965: Move compute shader code around
authorKristian Høgsberg Kristensen <krh@bitplanet.net>
Fri, 4 Sep 2015 23:35:34 +0000 (16:35 -0700)
committerKristian Høgsberg Kristensen <krh@bitplanet.net>
Mon, 14 Sep 2015 23:52:42 +0000 (16:52 -0700)
commitdc70c86b9b485cb5006a55cc2efd1f154dbfd469
tree7e0a38d8fd395135a1a444e8a2b5bc20f8d063de
parent64e25167ed284619dacab42fdada0bb0fea71321
i965: Move compute shader code around

This moves the compute shader code around in order to make the way the
code is split up more consistent. There should be no functional changes.
Typically we have a few files per stage:

    brw_vs.c, brw_wm.c brw_gs.c:

        code to drive code generation and implement precompiling and
        cache search.

    genX_<stage>_state.c

        gen specific implementation of the state emission for the shader
        stage.

The brw_*_emit() functions are all in the same files as the visitor
classes they use (with the exception of VS, which may use either vec4 or
fs).

To make compute follow this convention, we move the brw_cs_emit()
function into brw_fs.cpp. We can then rename brw_cs.cpp to brw_cs.c and
do this in C like the other similar files.  Finally, move state setup
and atoms to gen7_cs_state.c.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Signed-off-by: Kristian Høgsberg Kristensen <krh@bitplanet.net>
src/mesa/drivers/dri/i965/Makefile.sources
src/mesa/drivers/dri/i965/brw_cs.c [new file with mode: 0644]
src/mesa/drivers/dri/i965/brw_cs.cpp [deleted file]
src/mesa/drivers/dri/i965/brw_cs.h
src/mesa/drivers/dri/i965/brw_fs.cpp
src/mesa/drivers/dri/i965/gen7_cs_state.c [new file with mode: 0644]