[Mesa-dev] [PATCH] i965: Move brw_cs_fill_local_id_payload() to libi965_compiler

Kristian Høgsberg hoegsberg at gmail.com
Fri Dec 11 12:26:30 PST 2015

Matt Turner <mattst88 at gmail.com> writes:

> On Fri, Dec 11, 2015 at 11:22 AM, Kristian Høgsberg Kristensen
> <krh at bitplanet.net> wrote:
>> This is a helper function for setting up the local invocation ID
>> payload according to the cs_prog_data generated by the compiler. It's
>> intended to be available to users of libi965_compiler so move it there.
> I moved this to brw_cs.c (from brw_fs.cpp) in commit 6ba700c because
> its lack of extern "C" decoration on the function definition caused
> undefined references when I cleaned up the #includes. I didn't
> particularly like moving C code into C++ files willy-nilly, and it's
> because of problems like that, and really -- when it's a C function
> and is only called from C, why are we making it C++...?
> Can we find a better spot than this, and we can stop undoing each
> others' patches? :)

I didn't try to find a better spot, since it sounds like we're going to
split up and clean up brw_fs.cpp a little better eventually. Today it
has all of the front end stuff for VS, FS and CS and other helpers, and
it would make sense to move those into separate files. Until we figure
out how to organize this, I don't want to put this in its own file if
it's just going to be moved around later. I don't see any other good C
file in libi965_compiler to stick it in either.


More information about the mesa-dev mailing list