On Tue, Oct 28, 2014 at 5:30 PM, Matt Turner <matts...@gmail.com> wrote:
> On Tue, Oct 28, 2014 at 3:59 PM, Matt Turner <matts...@gmail.com> wrote:
>>>> -   assert(stage == MESA_SHADER_FRAGMENT);
>>>
>>> I like removing these asserts from the function bodies, but I'm
>>> confused why you're doing it. The VS isn't going to call
>>> fire_fb_write, or emit a derivative instruction.
>>
>> Oh, you're actually removing the stage member entirely. Isn't that
>> useful to have?
>>
>> Maybe I need to keep reading the series..
>
> Okay, still don't understand. It seems like your objective in patch 3
> is to be able to print things other than "fragment" under various
> INTEL_DEBUG=... settings. Wouldn't it be simpler to contain that logic
> in the generator using the stage member -- which would be nice to have
> for assertions anyway?

What I was trying to do here was to make the generator independent of
the shader stage.  It receives a cfg_t and spits out assembly and
doesn't care about what stage it may be.  It simplifies the generator
a little and passing in the debug name means that the generator
doesn't have to know about blorp, for example.  I think my biggest
problem with losing the asserts is that they protect casts of
prog_data to brw_wm_prog_data (except for the one in
generate_assembly), but those casts only happens in fs specific
opcodes.

Either way, I'm not attached to this change, we can put stage back in.

Kristian
_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to