[Mesa-dev] [PATCH] nir: acknowledge the existence of nir_builder.h

Eric Anholt eric at anholt.net
Mon Mar 30 09:37:40 PDT 2015


Emil Velikov <emil.l.velikov at gmail.com> writes:

> On 30/03/15 02:05, Eric Anholt wrote:
>> Emil Velikov <emil.l.velikov at gmail.com> writes:
>> 
>>> The header was added with commit 2a135c470e3(nir: Add an ALU op builder
>>> kind of like ir_builder.h) but did not made it into to the sources list,
>>> and its dependency of nir_builder_opcodes.h was missing.
>>>
>>> Fortunately it remained unused until resent commit faf6106c6f6(nir:
>> 
>> "recent"
>> 
> Thanks :-)
>
>>> Implement a Mesa IR -> NIR translator.)
>>>
>>> Cc: Kenneth Graunke <kenneth at whitecape.org>
>>> Cc: Eric Anholt <eric at anholt.net>
>>> Signed-off-by: Emil Velikov <emil.l.velikov at gmail.com>
>>> ---
>>>
>>> Not sure how the out-of-tree build was able to finish without this, 
> To asnwer this one myself. As we walk through the subdirs recursively,
> the BUILT_SOURCES are generated. Even with parallel build,
> the separate jobs run within the same unit (Makefile). So by the time
> we're in mesa/Makefile all the glsl sources are generated.
>
>>> although the commit looks like a must have if we want the file in the 
>>> tarball.
>>>
>>> Based on top of the earlier Android series.
>>>
>>> -Emil
>>>
>>> ---
>>>  src/glsl/Android.gen.mk   | 2 ++
>>>  src/glsl/Makefile.am      | 2 ++
>>>  src/glsl/Makefile.sources | 1 +
>>>  3 files changed, 5 insertions(+)
>>>
>>> diff --git a/src/glsl/Android.gen.mk b/src/glsl/Android.gen.mk
>>> index 82f2bf1..2f54da4 100644
>>> --- a/src/glsl/Android.gen.mk
>>> +++ b/src/glsl/Android.gen.mk
>>> @@ -97,6 +97,8 @@ $(intermediates)/nir/nir_builder_opcodes.h: $(nir_builder_opcodes_deps)
>>>  	@mkdir -p $(dir $@)
>>>  	@$(MESA_PYTHON2) $(nir_builder_opcodes_gen) $< > $@
>>>  
>>> +$(LOCAL_PATH)/nir/nir_builder.h: $(intermediates)/nir/nir_builder_opcodes.h
>>> +
>>>  nir_constant_expressions_gen := $(LOCAL_PATH)/nir/nir_constant_expressions.py
>>>  nir_constant_expressions_deps := \
>>>  	$(LOCAL_PATH)/nir/nir_opcodes.py \
>>> diff --git a/src/glsl/Makefile.am b/src/glsl/Makefile.am
>>> index ed90366..58af166 100644
>>> --- a/src/glsl/Makefile.am
>>> +++ b/src/glsl/Makefile.am
>>> @@ -244,6 +244,8 @@ nir/nir_builder_opcodes.h: nir/nir_opcodes.py nir/nir_builder_opcodes_h.py
>>>  	$(MKDIR_P) nir;							\
>>>  	$(PYTHON2) $(PYTHON_FLAGS) $(srcdir)/nir/nir_builder_opcodes_h.py > $@
>>>  
>>> +nir/nir_builder.h: nir/nir_builder_opcodes.h
>>> +
>>>  nir/nir_constant_expressions.c: nir/nir_opcodes.py nir/nir_constant_expressions.py nir/nir_constant_expressions.h
>>>  	$(MKDIR_P) nir;							\
>>>  	$(PYTHON2) $(PYTHON_FLAGS) $(srcdir)/nir/nir_constant_expressions.py > $@
>> 
>> This is weird -- nir_builder.h isn't a build target that needs to be
>> regenerated.  What's it for?
>> 
> True, nir_builder.h does not need to be generated, but it depends on a
> file that is - nir_builder_opcodes.h.  Thus we should note that
> dependency. Plus it makes sense given a similar rule a few lines below.
>
> nir/nir.h: nir/nir_opcodes.h

We don't note dependencies for any other headers that get included by
things that aren't generated based on the contents of those headers.  So
I don't get what this dependency is supposed to be doing.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 818 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20150330/e74cca78/attachment.sig>


More information about the mesa-dev mailing list