Re: [Mesa-dev] [PATCH mesa 1/2] meson: centralise the libdrm versions information
On 31 January 2018 at 17:11, Dylan Baker wrote: > Quoting Emil Velikov (2018-01-31 03:42:00) >> On 30 January 2018 at 21:31, Dylan Baker wrote: >> > Quoting Emil Velikov (2018-01-30 10:43:06) >> >> On 29 January 2018 at 18:57, Dylan Baker wrote: >> >> > Quoting Eric Engestrom (2018-01-29 10:15:50) >> >> >> The big comment is taken from the equivalent block in configure.ac >> >> >> >> >> >> Signed-off-by: Eric Engestrom >> >> >> --- >> >> >> meson.build | 30 >> >> >> + >> >> >> src/gallium/targets/d3dadapter9/meson.build | 2 +- >> >> >> src/mesa/drivers/dri/meson.build| 2 +- >> >> >> 3 files changed, 24 insertions(+), 10 deletions(-) >> >> >> >> >> >> diff --git a/meson.build b/meson.build >> >> >> index 0a00798c2a5093ec803b..6d7a8e976ff6ad002d9a 100644 >> >> >> --- a/meson.build >> >> >> +++ b/meson.build >> >> >> @@ -41,6 +41,20 @@ pre_args = [ >> >> >> >> >> >> '-DPACKAGE_BUGREPORT="https://bugs.freedesktop.org/enter_bug.cgi?product=Mesa";', >> >> >> ] >> >> >> >> >> >> +# The idea is that libdrm is distributed as one cohesive package, even >> >> >> +# though it is composed of multiple libraries. However some drivers >> >> >> +# may have different version requirements than others. This list >> >> >> +# codifies which drivers need which version of libdrm. Any libdrm >> >> >> +# version dependencies in non-driver-specific code should be reflected >> >> >> +# in the first entry. >> >> >> +libdrm_version = '2.4.75' >> >> >> +libdrm_amdgpu_version= '2.4.89' >> >> >> +libdrm_etnaviv_version = '2.4.82' >> >> >> +libdrm_freedreno_version = '2.4.82' >> >> >> +libdrm_intel_version = '2.4.75' >> >> >> +libdrm_nouveau_version = '2.4.66' >> >> >> +libdrm_radeon_version= '2.4.71' >> >> > >> >> > Is there any reason we can't just make these (for example): >> >> > libdrm_radeon_version= '>= 2.4.71' >> >> > >> >> > Since that avoids all of the format calls? >> >> > >> >> Is there particular reason why meson doesn't allow plain >> >> concatenation, and one must go through the format dance? >> >> Off the top of my head, I think that most higher level programming >> >> languages (including python) have it, making for clearer and more >> >> obvious code. >> >> >> >> That aside: >> >> A huge +1 from me on the idea, although the libdrm_foo checks should >> >> become libdrm && libdrm_foo. >> >> See commit 2b4eaabff01a3a8ea0c4742ac481492092c1ab4f. >> >> >> >> Thanks >> >> Emil >> > >> > I'm confused by that commit. pkg-config is supposed to handle this, >> > libdrm_intel >> > (for example) has `Requires : libdrm` in it, so when you generate libs you >> > get >> > `-ldrm_intel -ldrm`. Why do we need to check libdrm as well? If it's just >> > that >> > we need to make sure that the version matches we should fix the pkg-config >> > files >> > in libdrm to set `Requires : libdrm >= version`. Or am I missing something? >> > >> Only libdrm_intel has Requires: libdrm. Everyone else has the >> 'correct' Requires.Private >> Thus adding a version check won't be enough. >> >> Personally the commit feels like a workaround but Dave and Ilia wanted >> it, so we went ahead. >> >> -Emil > > If we need to ensure that the versions of libdrm == libdrm_* then > Requires.private is the wrong field to use. What do you think the correct > thing > to do here is? > The perfect solution is to go back in time ;-) That aside, I'd stick with what Dave/Ilia is suggesting. -Emil ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH mesa 1/2] meson: centralise the libdrm versions information
Quoting Emil Velikov (2018-01-31 03:42:00) > On 30 January 2018 at 21:31, Dylan Baker wrote: > > Quoting Emil Velikov (2018-01-30 10:43:06) > >> On 29 January 2018 at 18:57, Dylan Baker wrote: > >> > Quoting Eric Engestrom (2018-01-29 10:15:50) > >> >> The big comment is taken from the equivalent block in configure.ac > >> >> > >> >> Signed-off-by: Eric Engestrom > >> >> --- > >> >> meson.build | 30 > >> >> + > >> >> src/gallium/targets/d3dadapter9/meson.build | 2 +- > >> >> src/mesa/drivers/dri/meson.build| 2 +- > >> >> 3 files changed, 24 insertions(+), 10 deletions(-) > >> >> > >> >> diff --git a/meson.build b/meson.build > >> >> index 0a00798c2a5093ec803b..6d7a8e976ff6ad002d9a 100644 > >> >> --- a/meson.build > >> >> +++ b/meson.build > >> >> @@ -41,6 +41,20 @@ pre_args = [ > >> >> > >> >> '-DPACKAGE_BUGREPORT="https://bugs.freedesktop.org/enter_bug.cgi?product=Mesa";', > >> >> ] > >> >> > >> >> +# The idea is that libdrm is distributed as one cohesive package, even > >> >> +# though it is composed of multiple libraries. However some drivers > >> >> +# may have different version requirements than others. This list > >> >> +# codifies which drivers need which version of libdrm. Any libdrm > >> >> +# version dependencies in non-driver-specific code should be reflected > >> >> +# in the first entry. > >> >> +libdrm_version = '2.4.75' > >> >> +libdrm_amdgpu_version= '2.4.89' > >> >> +libdrm_etnaviv_version = '2.4.82' > >> >> +libdrm_freedreno_version = '2.4.82' > >> >> +libdrm_intel_version = '2.4.75' > >> >> +libdrm_nouveau_version = '2.4.66' > >> >> +libdrm_radeon_version= '2.4.71' > >> > > >> > Is there any reason we can't just make these (for example): > >> > libdrm_radeon_version= '>= 2.4.71' > >> > > >> > Since that avoids all of the format calls? > >> > > >> Is there particular reason why meson doesn't allow plain > >> concatenation, and one must go through the format dance? > >> Off the top of my head, I think that most higher level programming > >> languages (including python) have it, making for clearer and more > >> obvious code. > >> > >> That aside: > >> A huge +1 from me on the idea, although the libdrm_foo checks should > >> become libdrm && libdrm_foo. > >> See commit 2b4eaabff01a3a8ea0c4742ac481492092c1ab4f. > >> > >> Thanks > >> Emil > > > > I'm confused by that commit. pkg-config is supposed to handle this, > > libdrm_intel > > (for example) has `Requires : libdrm` in it, so when you generate libs you > > get > > `-ldrm_intel -ldrm`. Why do we need to check libdrm as well? If it's just > > that > > we need to make sure that the version matches we should fix the pkg-config > > files > > in libdrm to set `Requires : libdrm >= version`. Or am I missing something? > > > Only libdrm_intel has Requires: libdrm. Everyone else has the > 'correct' Requires.Private > Thus adding a version check won't be enough. > > Personally the commit feels like a workaround but Dave and Ilia wanted > it, so we went ahead. > > -Emil If we need to ensure that the versions of libdrm == libdrm_* then Requires.private is the wrong field to use. What do you think the correct thing to do here is? Dylan signature.asc Description: signature ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH mesa 1/2] meson: centralise the libdrm versions information
On Tuesday, 2018-01-30 13:31:09 -0800, Dylan Baker wrote: > Quoting Emil Velikov (2018-01-30 10:43:06) > > On 29 January 2018 at 18:57, Dylan Baker wrote: > > > Quoting Eric Engestrom (2018-01-29 10:15:50) > > >> The big comment is taken from the equivalent block in configure.ac > > >> > > >> Signed-off-by: Eric Engestrom > > >> --- > > >> meson.build | 30 > > >> + > > >> src/gallium/targets/d3dadapter9/meson.build | 2 +- > > >> src/mesa/drivers/dri/meson.build| 2 +- > > >> 3 files changed, 24 insertions(+), 10 deletions(-) > > >> > > >> diff --git a/meson.build b/meson.build > > >> index 0a00798c2a5093ec803b..6d7a8e976ff6ad002d9a 100644 > > >> --- a/meson.build > > >> +++ b/meson.build > > >> @@ -41,6 +41,20 @@ pre_args = [ > > >> > > >> '-DPACKAGE_BUGREPORT="https://bugs.freedesktop.org/enter_bug.cgi?product=Mesa";', > > >> ] > > >> > > >> +# The idea is that libdrm is distributed as one cohesive package, even > > >> +# though it is composed of multiple libraries. However some drivers > > >> +# may have different version requirements than others. This list > > >> +# codifies which drivers need which version of libdrm. Any libdrm > > >> +# version dependencies in non-driver-specific code should be reflected > > >> +# in the first entry. > > >> +libdrm_version = '2.4.75' > > >> +libdrm_amdgpu_version= '2.4.89' > > >> +libdrm_etnaviv_version = '2.4.82' > > >> +libdrm_freedreno_version = '2.4.82' > > >> +libdrm_intel_version = '2.4.75' > > >> +libdrm_nouveau_version = '2.4.66' > > >> +libdrm_radeon_version= '2.4.71' > > > > > > Is there any reason we can't just make these (for example): > > > libdrm_radeon_version= '>= 2.4.71' > > > > > > Since that avoids all of the format calls? > > > > > Is there particular reason why meson doesn't allow plain > > concatenation, and one must go through the format dance? > > Off the top of my head, I think that most higher level programming > > languages (including python) have it, making for clearer and more > > obvious code. I'm an idiot, meson supports `'foo' + 'bar'`; I'll send a v2 in a minute. > > > > That aside: > > A huge +1 from me on the idea, although the libdrm_foo checks should > > become libdrm && libdrm_foo. > > See commit 2b4eaabff01a3a8ea0c4742ac481492092c1ab4f. > > > > Thanks > > Emil > > I'm confused by that commit. pkg-config is supposed to handle this, > libdrm_intel > (for example) has `Requires : libdrm` in it, so when you generate libs you get > `-ldrm_intel -ldrm`. Why do we need to check libdrm as well? If it's just that > we need to make sure that the version matches we should fix the pkg-config > files > in libdrm to set `Requires : libdrm >= version`. Or am I missing something? I must say I'm confused as well: specific drivers should depend on the version of libdrm_$drv they need, and the generic code all drivers use depends on the version of libdrm it needs; this should cover all the cases. Quoting the comment in the code (I think you wrote it Emil?): > The idea is that libdrm is distributed as one cohesive package, even > though it is composed of multiple libraries. This means that libdrm_$drv 2.4.99 comes with libdrm 2.4.99, so there is no need to check both versions as they will always be identical, right? Are there distributions that provide separate libdrm_$drv and libdrm packages? ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH mesa 1/2] meson: centralise the libdrm versions information
On 30 January 2018 at 21:31, Dylan Baker wrote: > Quoting Emil Velikov (2018-01-30 10:43:06) >> On 29 January 2018 at 18:57, Dylan Baker wrote: >> > Quoting Eric Engestrom (2018-01-29 10:15:50) >> >> The big comment is taken from the equivalent block in configure.ac >> >> >> >> Signed-off-by: Eric Engestrom >> >> --- >> >> meson.build | 30 >> >> + >> >> src/gallium/targets/d3dadapter9/meson.build | 2 +- >> >> src/mesa/drivers/dri/meson.build| 2 +- >> >> 3 files changed, 24 insertions(+), 10 deletions(-) >> >> >> >> diff --git a/meson.build b/meson.build >> >> index 0a00798c2a5093ec803b..6d7a8e976ff6ad002d9a 100644 >> >> --- a/meson.build >> >> +++ b/meson.build >> >> @@ -41,6 +41,20 @@ pre_args = [ >> >> >> >> '-DPACKAGE_BUGREPORT="https://bugs.freedesktop.org/enter_bug.cgi?product=Mesa";', >> >> ] >> >> >> >> +# The idea is that libdrm is distributed as one cohesive package, even >> >> +# though it is composed of multiple libraries. However some drivers >> >> +# may have different version requirements than others. This list >> >> +# codifies which drivers need which version of libdrm. Any libdrm >> >> +# version dependencies in non-driver-specific code should be reflected >> >> +# in the first entry. >> >> +libdrm_version = '2.4.75' >> >> +libdrm_amdgpu_version= '2.4.89' >> >> +libdrm_etnaviv_version = '2.4.82' >> >> +libdrm_freedreno_version = '2.4.82' >> >> +libdrm_intel_version = '2.4.75' >> >> +libdrm_nouveau_version = '2.4.66' >> >> +libdrm_radeon_version= '2.4.71' >> > >> > Is there any reason we can't just make these (for example): >> > libdrm_radeon_version= '>= 2.4.71' >> > >> > Since that avoids all of the format calls? >> > >> Is there particular reason why meson doesn't allow plain >> concatenation, and one must go through the format dance? >> Off the top of my head, I think that most higher level programming >> languages (including python) have it, making for clearer and more >> obvious code. >> >> That aside: >> A huge +1 from me on the idea, although the libdrm_foo checks should >> become libdrm && libdrm_foo. >> See commit 2b4eaabff01a3a8ea0c4742ac481492092c1ab4f. >> >> Thanks >> Emil > > I'm confused by that commit. pkg-config is supposed to handle this, > libdrm_intel > (for example) has `Requires : libdrm` in it, so when you generate libs you get > `-ldrm_intel -ldrm`. Why do we need to check libdrm as well? If it's just that > we need to make sure that the version matches we should fix the pkg-config > files > in libdrm to set `Requires : libdrm >= version`. Or am I missing something? > Only libdrm_intel has Requires: libdrm. Everyone else has the 'correct' Requires.Private Thus adding a version check won't be enough. Personally the commit feels like a workaround but Dave and Ilia wanted it, so we went ahead. -Emil ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH mesa 1/2] meson: centralise the libdrm versions information
Quoting Emil Velikov (2018-01-30 10:43:06) > On 29 January 2018 at 18:57, Dylan Baker wrote: > > Quoting Eric Engestrom (2018-01-29 10:15:50) > >> The big comment is taken from the equivalent block in configure.ac > >> > >> Signed-off-by: Eric Engestrom > >> --- > >> meson.build | 30 > >> + > >> src/gallium/targets/d3dadapter9/meson.build | 2 +- > >> src/mesa/drivers/dri/meson.build| 2 +- > >> 3 files changed, 24 insertions(+), 10 deletions(-) > >> > >> diff --git a/meson.build b/meson.build > >> index 0a00798c2a5093ec803b..6d7a8e976ff6ad002d9a 100644 > >> --- a/meson.build > >> +++ b/meson.build > >> @@ -41,6 +41,20 @@ pre_args = [ > >> > >> '-DPACKAGE_BUGREPORT="https://bugs.freedesktop.org/enter_bug.cgi?product=Mesa";', > >> ] > >> > >> +# The idea is that libdrm is distributed as one cohesive package, even > >> +# though it is composed of multiple libraries. However some drivers > >> +# may have different version requirements than others. This list > >> +# codifies which drivers need which version of libdrm. Any libdrm > >> +# version dependencies in non-driver-specific code should be reflected > >> +# in the first entry. > >> +libdrm_version = '2.4.75' > >> +libdrm_amdgpu_version= '2.4.89' > >> +libdrm_etnaviv_version = '2.4.82' > >> +libdrm_freedreno_version = '2.4.82' > >> +libdrm_intel_version = '2.4.75' > >> +libdrm_nouveau_version = '2.4.66' > >> +libdrm_radeon_version= '2.4.71' > > > > Is there any reason we can't just make these (for example): > > libdrm_radeon_version= '>= 2.4.71' > > > > Since that avoids all of the format calls? > > > Is there particular reason why meson doesn't allow plain > concatenation, and one must go through the format dance? > Off the top of my head, I think that most higher level programming > languages (including python) have it, making for clearer and more > obvious code. > > That aside: > A huge +1 from me on the idea, although the libdrm_foo checks should > become libdrm && libdrm_foo. > See commit 2b4eaabff01a3a8ea0c4742ac481492092c1ab4f. > > Thanks > Emil I'm confused by that commit. pkg-config is supposed to handle this, libdrm_intel (for example) has `Requires : libdrm` in it, so when you generate libs you get `-ldrm_intel -ldrm`. Why do we need to check libdrm as well? If it's just that we need to make sure that the version matches we should fix the pkg-config files in libdrm to set `Requires : libdrm >= version`. Or am I missing something? Dylan signature.asc Description: signature ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH mesa 1/2] meson: centralise the libdrm versions information
On 29 January 2018 at 18:57, Dylan Baker wrote: > Quoting Eric Engestrom (2018-01-29 10:15:50) >> The big comment is taken from the equivalent block in configure.ac >> >> Signed-off-by: Eric Engestrom >> --- >> meson.build | 30 >> + >> src/gallium/targets/d3dadapter9/meson.build | 2 +- >> src/mesa/drivers/dri/meson.build| 2 +- >> 3 files changed, 24 insertions(+), 10 deletions(-) >> >> diff --git a/meson.build b/meson.build >> index 0a00798c2a5093ec803b..6d7a8e976ff6ad002d9a 100644 >> --- a/meson.build >> +++ b/meson.build >> @@ -41,6 +41,20 @@ pre_args = [ >> >> '-DPACKAGE_BUGREPORT="https://bugs.freedesktop.org/enter_bug.cgi?product=Mesa";', >> ] >> >> +# The idea is that libdrm is distributed as one cohesive package, even >> +# though it is composed of multiple libraries. However some drivers >> +# may have different version requirements than others. This list >> +# codifies which drivers need which version of libdrm. Any libdrm >> +# version dependencies in non-driver-specific code should be reflected >> +# in the first entry. >> +libdrm_version = '2.4.75' >> +libdrm_amdgpu_version= '2.4.89' >> +libdrm_etnaviv_version = '2.4.82' >> +libdrm_freedreno_version = '2.4.82' >> +libdrm_intel_version = '2.4.75' >> +libdrm_nouveau_version = '2.4.66' >> +libdrm_radeon_version= '2.4.71' > > Is there any reason we can't just make these (for example): > libdrm_radeon_version= '>= 2.4.71' > > Since that avoids all of the format calls? > Is there particular reason why meson doesn't allow plain concatenation, and one must go through the format dance? Off the top of my head, I think that most higher level programming languages (including python) have it, making for clearer and more obvious code. That aside: A huge +1 from me on the idea, although the libdrm_foo checks should become libdrm && libdrm_foo. See commit 2b4eaabff01a3a8ea0c4742ac481492092c1ab4f. Thanks Emil ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH mesa 1/2] meson: centralise the libdrm versions information
Quoting Eric Engestrom (2018-01-30 09:55:53) > > > On January 30, 2018 5:34:07 PM UTC, Dylan Baker wrote: > > Quoting Eric Engestrom (2018-01-29 10:15:50) > > > The big comment is taken from the equivalent block in configure.ac > > > > > > Signed-off-by: Eric Engestrom > > > --- > > > meson.build | 30 > > + > > > src/gallium/targets/d3dadapter9/meson.build | 2 +- > > > src/mesa/drivers/dri/meson.build| 2 +- > > > 3 files changed, 24 insertions(+), 10 deletions(-) > > > > > > diff --git a/meson.build b/meson.build > > > index 0a00798c2a5093ec803b..6d7a8e976ff6ad002d9a 100644 > > > --- a/meson.build > > > +++ b/meson.build > > > @@ -41,6 +41,20 @@ pre_args = [ > > > > > '-DPACKAGE_BUGREPORT="https://bugs.freedesktop.org/enter_bug.cgi?product=Mesa";', > > > ] > > > > > > +# The idea is that libdrm is distributed as one cohesive package, > > even > > > +# though it is composed of multiple libraries. However some drivers > > > +# may have different version requirements than others. This list > > > +# codifies which drivers need which version of libdrm. Any libdrm > > > +# version dependencies in non-driver-specific code should be > > reflected > > > +# in the first entry. > > > +libdrm_version = '2.4.75' > > > +libdrm_amdgpu_version= '2.4.89' > > > +libdrm_etnaviv_version = '2.4.82' > > > +libdrm_freedreno_version = '2.4.82' > > > +libdrm_intel_version = '2.4.75' > > > +libdrm_nouveau_version = '2.4.66' > > > +libdrm_radeon_version= '2.4.71' > > > > Is there any reason we can't just make these (for example): > > libdrm_radeon_version= '>= 2.4.71' > > > > Since that avoids all of the format calls? > > Sure. I was trying to only have the actual numbers here, but in hindsight > all these format() calls are a bit ugly. > I'll send a v2 tomorrow. > I understand, I just didn't see a case where we don't want the '>=' as well. Thanks for doing this, it's been on my long list of todo's for a while now :) signature.asc Description: signature ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH mesa 1/2] meson: centralise the libdrm versions information
On January 30, 2018 5:34:07 PM UTC, Dylan Baker wrote: > Quoting Eric Engestrom (2018-01-29 10:15:50) > > The big comment is taken from the equivalent block in configure.ac > > > > Signed-off-by: Eric Engestrom > > --- > > meson.build | 30 > + > > src/gallium/targets/d3dadapter9/meson.build | 2 +- > > src/mesa/drivers/dri/meson.build| 2 +- > > 3 files changed, 24 insertions(+), 10 deletions(-) > > > > diff --git a/meson.build b/meson.build > > index 0a00798c2a5093ec803b..6d7a8e976ff6ad002d9a 100644 > > --- a/meson.build > > +++ b/meson.build > > @@ -41,6 +41,20 @@ pre_args = [ > > > '-DPACKAGE_BUGREPORT="https://bugs.freedesktop.org/enter_bug.cgi?product=Mesa";', > > ] > > > > +# The idea is that libdrm is distributed as one cohesive package, > even > > +# though it is composed of multiple libraries. However some drivers > > +# may have different version requirements than others. This list > > +# codifies which drivers need which version of libdrm. Any libdrm > > +# version dependencies in non-driver-specific code should be > reflected > > +# in the first entry. > > +libdrm_version = '2.4.75' > > +libdrm_amdgpu_version= '2.4.89' > > +libdrm_etnaviv_version = '2.4.82' > > +libdrm_freedreno_version = '2.4.82' > > +libdrm_intel_version = '2.4.75' > > +libdrm_nouveau_version = '2.4.66' > > +libdrm_radeon_version= '2.4.71' > > Is there any reason we can't just make these (for example): > libdrm_radeon_version= '>= 2.4.71' > > Since that avoids all of the format calls? Sure. I was trying to only have the actual numbers here, but in hindsight all these format() calls are a bit ugly. I'll send a v2 tomorrow. > > [snip] > > Dylan ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH mesa 1/2] meson: centralise the libdrm versions information
Quoting Eric Engestrom (2018-01-29 10:15:50) > The big comment is taken from the equivalent block in configure.ac > > Signed-off-by: Eric Engestrom > --- > meson.build | 30 > + > src/gallium/targets/d3dadapter9/meson.build | 2 +- > src/mesa/drivers/dri/meson.build| 2 +- > 3 files changed, 24 insertions(+), 10 deletions(-) > > diff --git a/meson.build b/meson.build > index 0a00798c2a5093ec803b..6d7a8e976ff6ad002d9a 100644 > --- a/meson.build > +++ b/meson.build > @@ -41,6 +41,20 @@ pre_args = [ > > '-DPACKAGE_BUGREPORT="https://bugs.freedesktop.org/enter_bug.cgi?product=Mesa";', > ] > > +# The idea is that libdrm is distributed as one cohesive package, even > +# though it is composed of multiple libraries. However some drivers > +# may have different version requirements than others. This list > +# codifies which drivers need which version of libdrm. Any libdrm > +# version dependencies in non-driver-specific code should be reflected > +# in the first entry. > +libdrm_version = '2.4.75' > +libdrm_amdgpu_version= '2.4.89' > +libdrm_etnaviv_version = '2.4.82' > +libdrm_freedreno_version = '2.4.82' > +libdrm_intel_version = '2.4.75' > +libdrm_nouveau_version = '2.4.66' > +libdrm_radeon_version= '2.4.71' Is there any reason we can't just make these (for example): libdrm_radeon_version= '>= 2.4.71' Since that avoids all of the format calls? [snip] Dylan signature.asc Description: signature ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH mesa 1/2] meson: centralise the libdrm versions information
The big comment is taken from the equivalent block in configure.ac Signed-off-by: Eric Engestrom --- meson.build | 30 + src/gallium/targets/d3dadapter9/meson.build | 2 +- src/mesa/drivers/dri/meson.build| 2 +- 3 files changed, 24 insertions(+), 10 deletions(-) diff --git a/meson.build b/meson.build index 0a00798c2a5093ec803b..6d7a8e976ff6ad002d9a 100644 --- a/meson.build +++ b/meson.build @@ -41,6 +41,20 @@ pre_args = [ '-DPACKAGE_BUGREPORT="https://bugs.freedesktop.org/enter_bug.cgi?product=Mesa";', ] +# The idea is that libdrm is distributed as one cohesive package, even +# though it is composed of multiple libraries. However some drivers +# may have different version requirements than others. This list +# codifies which drivers need which version of libdrm. Any libdrm +# version dependencies in non-driver-specific code should be reflected +# in the first entry. +libdrm_version = '2.4.75' +libdrm_amdgpu_version= '2.4.89' +libdrm_etnaviv_version = '2.4.82' +libdrm_freedreno_version = '2.4.82' +libdrm_intel_version = '2.4.75' +libdrm_nouveau_version = '2.4.66' +libdrm_radeon_version= '2.4.71' + with_vulkan_icd_dir = get_option('vulkan-icd-dir') with_tests = get_option('build-tests') with_valgrind = get_option('valgrind') @@ -199,7 +213,7 @@ endif dep_libdrm_intel = [] if with_dri_i915 or with_gallium_i915 - dep_libdrm_intel = dependency('libdrm_intel', version : '>= 2.4.75') + dep_libdrm_intel = dependency('libdrm_intel', version : '>= @0@'.format(libdrm_intel_version)) endif system_has_kms_drm = ['openbsd', 'netbsd', 'freebsd', 'dragonfly', 'linux'].contains(host_machine.system()) @@ -922,7 +936,7 @@ else endif with_gallium_drisw_kms = false -dep_libdrm = dependency('libdrm', version : '>= 2.4.75', +dep_libdrm = dependency('libdrm', version : '>= @0@'.format(libdrm_version), required : with_dri2 or with_dri3) if dep_libdrm.found() pre_args += '-DHAVE_LIBDRM' @@ -957,20 +971,20 @@ dep_libdrm_nouveau = [] dep_libdrm_etnaviv = [] dep_libdrm_freedreno = [] if with_amd_vk or with_gallium_radeonsi - dep_libdrm_amdgpu = dependency('libdrm_amdgpu', version : '>= 2.4.89') + dep_libdrm_amdgpu = dependency('libdrm_amdgpu', version : '>= @0@'.format(libdrm_amdgpu_version)) endif if (with_gallium_radeonsi or with_dri_r100 or with_dri_r200 or with_gallium_r300 or with_gallium_r600) - dep_libdrm_radeon = dependency('libdrm_radeon', version : '>= 2.4.71') + dep_libdrm_radeon = dependency('libdrm_radeon', version : '>= @0@'.format(libdrm_radeon_version)) endif if with_gallium_nouveau or with_dri_nouveau - dep_libdrm_nouveau = dependency('libdrm_nouveau', version : '>= 2.4.66') + dep_libdrm_nouveau = dependency('libdrm_nouveau', version : '>= @0@'.format(libdrm_nouveau_version)) endif if with_gallium_etnaviv - dep_libdrm_etnaviv = dependency('libdrm_etnaviv', version : '>= 2.4.82') + dep_libdrm_etnaviv = dependency('libdrm_etnaviv', version : '>= @0@'.format(libdrm_etnaviv_version)) endif if with_gallium_freedreno - dep_libdrm_freedreno = dependency('libdrm_freedreno', version : '>= 2.4.89') + dep_libdrm_freedreno = dependency('libdrm_freedreno', version : '>= @0@'.format(libdrm_freedreno_version)) endif llvm_modules = ['bitwriter', 'engine', 'mcdisassembler', 'mcjit'] @@ -1201,7 +1215,7 @@ inc_include = include_directories('include') gl_priv_reqs = [ 'x11', 'xext', 'xdamage >= 1.1', 'xfixes', 'x11-xcb', 'xcb', - 'xcb-glx >= 1.8.1', 'libdrm >= 2.4.75', + 'xcb-glx >= 1.8.1', 'libdrm >= @0@'.format(libdrm_version), ] if dep_xxf86vm != [] and dep_xxf86vm.found() gl_priv_reqs += 'xxf86vm' diff --git a/src/gallium/targets/d3dadapter9/meson.build b/src/gallium/targets/d3dadapter9/meson.build index 5476e80e70cf9e2dba5a..ef8062beef06a5daaa52 100644 --- a/src/gallium/targets/d3dadapter9/meson.build +++ b/src/gallium/targets/d3dadapter9/meson.build @@ -78,5 +78,5 @@ pkg.generate( name : 'd3d', description : 'Native D3D driver modules', version : '.'.join(nine_version), - requires_private : 'libdrm >= 2.4.75', + requires_private : 'libdrm >= @0@'.format(libdrm_version), ) diff --git a/src/mesa/drivers/dri/meson.build b/src/mesa/drivers/dri/meson.build index 94798b0f5dadccb651ab..519639e8a4ec1d08b8f2 100644 --- a/src/mesa/drivers/dri/meson.build +++ b/src/mesa/drivers/dri/meson.build @@ -73,6 +73,6 @@ if with_dri description : 'Direct Rendering Infrastructure', version : meson.project_version(), variables : ['dridriverdir=${prefix}/' + dri_drivers_path], -requires_private : ['libdrm >= 2.4.75'], # FIXME: don't hardcode this +requires_private : ['libdrm >= @0@'.format(libdrm_version)], ) endif -- Cheers, Eric ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev