[Mesa-dev] [PATCH 2/3] mesa: Modify drirc's default option values
To complement the last change made to drirc options, default option values should also be changed. --- src/gallium/auxiliary/pipe-loader/driinfo_gallium.h | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/gallium/auxiliary/pipe-loader/driinfo_gallium.h b/src/gallium/auxiliary/pipe-loader/driinfo_gallium.h index 48a57c9..2327446 100644 --- a/src/gallium/auxiliary/pipe-loader/driinfo_gallium.h +++ b/src/gallium/auxiliary/pipe-loader/driinfo_gallium.h @@ -8,10 +8,10 @@ DRI_CONF_SECTION_END DRI_CONF_SECTION_QUALITY DRI_CONF_FORCE_S3TC_ENABLE("false") - DRI_CONF_PP_CELSHADE(0) - DRI_CONF_PP_NORED(0) - DRI_CONF_PP_NOGREEN(0) - DRI_CONF_PP_NOBLUE(0) + DRI_CONF_PP_CELSHADE("false") + DRI_CONF_PP_NORED("false") + DRI_CONF_PP_NOGREEN("false") + DRI_CONF_PP_NOBLUE("false") DRI_CONF_PP_JIMENEZMLAA(0, 0, 32) DRI_CONF_PP_JIMENEZMLAA_COLOR(0, 0, 32) DRI_CONF_SECTION_END -- 2.7.4 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH 3/3] mesa: Fix backward compatbility for XML parser
After changing the type of drirc values, the parser will be unable to recognize xml files before the change. To achieve backward compatbility, the parser is relaxed to recognize boolean type options with enum values. --- src/util/xmlconfig.c | 22 -- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/src/util/xmlconfig.c b/src/util/xmlconfig.c index d3f47ec..2999f24 100644 --- a/src/util/xmlconfig.c +++ b/src/util/xmlconfig.c @@ -317,8 +317,26 @@ parseValue(driOptionValue *v, driOptionType type, const XML_Char *string) v->_bool = true; tail = string + 4; } -else -return false; +else { +/** Some drirc options, such as pp_shalde, were formerly enum values. + * Now that they have been turned into boolean values, to achieve + * backward compatbility relax the check here a little bit */ +XML_Char *start = string; +int value = strToI(string, &tail, 0); +if (tail == start) { +/* no enum value found */ +string = start; +return false; +} else { +if (value == 1) +v->_bool = true; +else if (value == 0) +v->_bool = false; +else +return false; /* wrong value here */ +} + } + break; case DRI_ENUM: /* enum is just a special integer */ case DRI_INT: -- 2.7.4 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH 1/3] mesa: Modify type of drirc options
Turn all drirc's semantically boolean options into actual boolean options. --- src/util/xmlpool/t_options.h | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/util/xmlpool/t_options.h b/src/util/xmlpool/t_options.h index d3f31fc..4ea3615 100644 --- a/src/util/xmlpool/t_options.h +++ b/src/util/xmlpool/t_options.h @@ -220,22 +220,22 @@ DRI_CONF_OPT_BEGIN_B(float_depth, def) \ DRI_CONF_OPT_END #define DRI_CONF_PP_CELSHADE(def) \ -DRI_CONF_OPT_BEGIN_V(pp_celshade,enum,def,"0:1") \ +DRI_CONF_OPT_BEGIN_B(pp_celshade,def) \ DRI_CONF_DESC(en,gettext("A post-processing filter to cel-shade the output")) \ DRI_CONF_OPT_END #define DRI_CONF_PP_NORED(def) \ -DRI_CONF_OPT_BEGIN_V(pp_nored,enum,def,"0:1") \ +DRI_CONF_OPT_BEGIN_B(pp_nored,def) \ DRI_CONF_DESC(en,gettext("A post-processing filter to remove the red channel")) \ DRI_CONF_OPT_END #define DRI_CONF_PP_NOGREEN(def) \ -DRI_CONF_OPT_BEGIN_V(pp_nogreen,enum,def,"0:1") \ +DRI_CONF_OPT_BEGIN_B(pp_nogreen,def) \ DRI_CONF_DESC(en,gettext("A post-processing filter to remove the green channel")) \ DRI_CONF_OPT_END #define DRI_CONF_PP_NOBLUE(def) \ -DRI_CONF_OPT_BEGIN_V(pp_noblue,enum,def,"0:1") \ +DRI_CONF_OPT_BEGIN_B(pp_noblue,def) \ DRI_CONF_DESC(en,gettext("A post-processing filter to remove the blue channel")) \ DRI_CONF_OPT_END -- 2.7.4 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH 0/3] mesa: Modify drirc options
This serie of patches changes drirc's semanticaclly boolean options, options that are enum type options but which in essence are boolean options e.g. pp_shalde, into actual boolean optioinns. Backwawrd compatbility is maintained by relaxinig xmlconfig parser so that xml files before this change can still be parsed correctly. Driconf, unfortunately, will be affected by this. The issue will be addressedd later by releasing a new version of Driconf. Also note that these changes are made to fulfil requirementss to participate in EVoC (Endless Vacaction of Code) hosted by X.org. QuRyu (3): mesa: Modify type of drirc options mesa: Modify drirc's default option values mesa: Fix backward compatbility for XML parser .../auxiliary/pipe-loader/driinfo_gallium.h| 8 src/util/xmlconfig.c | 22 -- src/util/xmlpool/t_options.h | 8 3 files changed, 28 insertions(+), 10 deletions(-) -- 2.7.4 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH V2 0/2] mesa: Modify drirc options
From: Quentin Liu This serie of patches changes drirc's semanticaclly boolean options, options that are enum type options but which in essence are boolean options e.g. pp_shalde, into actual boolean optioinns. Backwawrd compatbility is maintained by relaxinig xmlconfig parser so that xml files before this change can still be parsed correctly. Driconf, unfortunately, will be affected by this. The issue will be addressedd later by releasing a new version of Driconf. Also note that these changes are made to fulfil requirementss to participate in EVoC (Endless Vacaction of Code) hosted by X.org. Quentin Liu (2): mesa: Fix backward compatibility for XML parser mesa: Modify drirc option types src/gallium/auxiliary/pipe-loader/driinfo_gallium.h | 8 src/util/xmlconfig.c| 17 +++-- src/util/xmlpool/t_options.h| 8 3 files changed, 23 insertions(+), 10 deletions(-) -- 2.7.4 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH V2 1/2] mesa: Fix backward compatibility for XML parser
From: Quentin Liu If the type of drirc options are changed, the parser will not be able to recognize xml files that had been present before the change. To achieve backward compatibility, the parser is relaxed to recognize boolean type options with enum values. --- src/util/xmlconfig.c | 17 +++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/src/util/xmlconfig.c b/src/util/xmlconfig.c index d3f47ec..d81a07b 100644 --- a/src/util/xmlconfig.c +++ b/src/util/xmlconfig.c @@ -317,8 +317,21 @@ parseValue(driOptionValue *v, driOptionType type, const XML_Char *string) v->_bool = true; tail = string + 4; } -else -return false; +else { +/* Some drirc options, such as pp_celshalde, were formerly enum + * values. Now that they have been turned into boolean values, + * to achieve backward compatibility relax the check here a + * little bit */ +int value = strToI(string, &tail, 0); +if (value == 1) +v->_bool = true; +else if (value == 0) +v->_bool = false; +else +return false; /* wrong value here */ +} + } + break; case DRI_ENUM: /* enum is just a special integer */ case DRI_INT: -- 2.7.4 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH V2 2/2] mesa: Modify drirc option types
From: Quentin Liu The type and default values of certain drirc options are changed, namely, those semantically boolean options such as pp_celshade. --- src/gallium/auxiliary/pipe-loader/driinfo_gallium.h | 8 src/util/xmlpool/t_options.h| 8 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/gallium/auxiliary/pipe-loader/driinfo_gallium.h b/src/gallium/auxiliary/pipe-loader/driinfo_gallium.h index 48a57c9..2327446 100644 --- a/src/gallium/auxiliary/pipe-loader/driinfo_gallium.h +++ b/src/gallium/auxiliary/pipe-loader/driinfo_gallium.h @@ -8,10 +8,10 @@ DRI_CONF_SECTION_END DRI_CONF_SECTION_QUALITY DRI_CONF_FORCE_S3TC_ENABLE("false") - DRI_CONF_PP_CELSHADE(0) - DRI_CONF_PP_NORED(0) - DRI_CONF_PP_NOGREEN(0) - DRI_CONF_PP_NOBLUE(0) + DRI_CONF_PP_CELSHADE("false") + DRI_CONF_PP_NORED("false") + DRI_CONF_PP_NOGREEN("false") + DRI_CONF_PP_NOBLUE("false") DRI_CONF_PP_JIMENEZMLAA(0, 0, 32) DRI_CONF_PP_JIMENEZMLAA_COLOR(0, 0, 32) DRI_CONF_SECTION_END diff --git a/src/util/xmlpool/t_options.h b/src/util/xmlpool/t_options.h index d3f31fc..4ea3615 100644 --- a/src/util/xmlpool/t_options.h +++ b/src/util/xmlpool/t_options.h @@ -220,22 +220,22 @@ DRI_CONF_OPT_BEGIN_B(float_depth, def) \ DRI_CONF_OPT_END #define DRI_CONF_PP_CELSHADE(def) \ -DRI_CONF_OPT_BEGIN_V(pp_celshade,enum,def,"0:1") \ +DRI_CONF_OPT_BEGIN_B(pp_celshade,def) \ DRI_CONF_DESC(en,gettext("A post-processing filter to cel-shade the output")) \ DRI_CONF_OPT_END #define DRI_CONF_PP_NORED(def) \ -DRI_CONF_OPT_BEGIN_V(pp_nored,enum,def,"0:1") \ +DRI_CONF_OPT_BEGIN_B(pp_nored,def) \ DRI_CONF_DESC(en,gettext("A post-processing filter to remove the red channel")) \ DRI_CONF_OPT_END #define DRI_CONF_PP_NOGREEN(def) \ -DRI_CONF_OPT_BEGIN_V(pp_nogreen,enum,def,"0:1") \ +DRI_CONF_OPT_BEGIN_B(pp_nogreen,def) \ DRI_CONF_DESC(en,gettext("A post-processing filter to remove the green channel")) \ DRI_CONF_OPT_END #define DRI_CONF_PP_NOBLUE(def) \ -DRI_CONF_OPT_BEGIN_V(pp_noblue,enum,def,"0:1") \ +DRI_CONF_OPT_BEGIN_B(pp_noblue,def) \ DRI_CONF_DESC(en,gettext("A post-processing filter to remove the blue channel")) \ DRI_CONF_OPT_END -- 2.7.4 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH V2 1/2] mesa: Fix backward compatibility for XML parser
From: Quentin Liu If the type of drirc options are changed, the parser will not be able to recognize xml files that had been present before the change. To achieve backward compatibility, the parser is relaxed to recognize boolean type options with enum values. --- src/util/xmlconfig.c | 17 +++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/src/util/xmlconfig.c b/src/util/xmlconfig.c index d3f47ec..d81a07b 100644 --- a/src/util/xmlconfig.c +++ b/src/util/xmlconfig.c @@ -317,8 +317,21 @@ parseValue(driOptionValue *v, driOptionType type, const XML_Char *string) v->_bool = true; tail = string + 4; } -else -return false; +else { +/* Some drirc options, such as pp_celshalde, were formerly enum + * values. Now that they have been turned into boolean values, + * to achieve backward compatibility relax the check here a + * little bit */ +int value = strToI(string, &tail, 0); +if (value == 1) +v->_bool = true; +else if (value == 0) +v->_bool = false; +else +return false; /* wrong value here */ +} + } + break; case DRI_ENUM: /* enum is just a special integer */ case DRI_INT: -- 2.7.4 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH V2 0/2] mesa: Modify drirc options
From: Quentin Liu This serie of patches changes drirc's semanticaclly boolean options, options that are enum type options but which in essence are boolean options e.g. pp_shalde, into actual boolean optioinns. Backwawrd compatbility is maintained by relaxinig xmlconfig parser so that xml files before this change can still be parsed correctly. Driconf, unfortunately, will be affected by this. The issue will be addressedd later by releasing a new version of Driconf. Also note that these changes are made to fulfil requirementss to participate in EVoC (Endless Vacaction of Code) hosted by X.org. Quentin Liu (2): mesa: Fix backward compatibility for XML parser mesa: Modify drirc option types src/gallium/auxiliary/pipe-loader/driinfo_gallium.h | 8 src/util/xmlconfig.c| 17 +++-- src/util/xmlpool/t_options.h| 8 3 files changed, 23 insertions(+), 10 deletions(-) -- 2.7.4 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH V2 2/2] mesa: Modify drirc option types
From: Quentin Liu The type and default values of certain drirc options are changed, namely, those semantically boolean options such as pp_celshade. --- src/gallium/auxiliary/pipe-loader/driinfo_gallium.h | 8 src/util/xmlpool/t_options.h| 8 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/gallium/auxiliary/pipe-loader/driinfo_gallium.h b/src/gallium/auxiliary/pipe-loader/driinfo_gallium.h index 48a57c9..2327446 100644 --- a/src/gallium/auxiliary/pipe-loader/driinfo_gallium.h +++ b/src/gallium/auxiliary/pipe-loader/driinfo_gallium.h @@ -8,10 +8,10 @@ DRI_CONF_SECTION_END DRI_CONF_SECTION_QUALITY DRI_CONF_FORCE_S3TC_ENABLE("false") - DRI_CONF_PP_CELSHADE(0) - DRI_CONF_PP_NORED(0) - DRI_CONF_PP_NOGREEN(0) - DRI_CONF_PP_NOBLUE(0) + DRI_CONF_PP_CELSHADE("false") + DRI_CONF_PP_NORED("false") + DRI_CONF_PP_NOGREEN("false") + DRI_CONF_PP_NOBLUE("false") DRI_CONF_PP_JIMENEZMLAA(0, 0, 32) DRI_CONF_PP_JIMENEZMLAA_COLOR(0, 0, 32) DRI_CONF_SECTION_END diff --git a/src/util/xmlpool/t_options.h b/src/util/xmlpool/t_options.h index d3f31fc..4ea3615 100644 --- a/src/util/xmlpool/t_options.h +++ b/src/util/xmlpool/t_options.h @@ -220,22 +220,22 @@ DRI_CONF_OPT_BEGIN_B(float_depth, def) \ DRI_CONF_OPT_END #define DRI_CONF_PP_CELSHADE(def) \ -DRI_CONF_OPT_BEGIN_V(pp_celshade,enum,def,"0:1") \ +DRI_CONF_OPT_BEGIN_B(pp_celshade,def) \ DRI_CONF_DESC(en,gettext("A post-processing filter to cel-shade the output")) \ DRI_CONF_OPT_END #define DRI_CONF_PP_NORED(def) \ -DRI_CONF_OPT_BEGIN_V(pp_nored,enum,def,"0:1") \ +DRI_CONF_OPT_BEGIN_B(pp_nored,def) \ DRI_CONF_DESC(en,gettext("A post-processing filter to remove the red channel")) \ DRI_CONF_OPT_END #define DRI_CONF_PP_NOGREEN(def) \ -DRI_CONF_OPT_BEGIN_V(pp_nogreen,enum,def,"0:1") \ +DRI_CONF_OPT_BEGIN_B(pp_nogreen,def) \ DRI_CONF_DESC(en,gettext("A post-processing filter to remove the green channel")) \ DRI_CONF_OPT_END #define DRI_CONF_PP_NOBLUE(def) \ -DRI_CONF_OPT_BEGIN_V(pp_noblue,enum,def,"0:1") \ +DRI_CONF_OPT_BEGIN_B(pp_noblue,def) \ DRI_CONF_DESC(en,gettext("A post-processing filter to remove the blue channel")) \ DRI_CONF_OPT_END -- 2.7.4 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH V2 2/2] mesa: Modify drirc option types
From: Quentin Liu The type and default values of certain drirc options are changed, namely, those semantically boolean options such as pp_celshade. --- src/gallium/auxiliary/pipe-loader/driinfo_gallium.h | 8 src/util/xmlpool/t_options.h| 8 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/gallium/auxiliary/pipe-loader/driinfo_gallium.h b/src/gallium/auxiliary/pipe-loader/driinfo_gallium.h index 48a57c9..2327446 100644 --- a/src/gallium/auxiliary/pipe-loader/driinfo_gallium.h +++ b/src/gallium/auxiliary/pipe-loader/driinfo_gallium.h @@ -8,10 +8,10 @@ DRI_CONF_SECTION_END DRI_CONF_SECTION_QUALITY DRI_CONF_FORCE_S3TC_ENABLE("false") - DRI_CONF_PP_CELSHADE(0) - DRI_CONF_PP_NORED(0) - DRI_CONF_PP_NOGREEN(0) - DRI_CONF_PP_NOBLUE(0) + DRI_CONF_PP_CELSHADE("false") + DRI_CONF_PP_NORED("false") + DRI_CONF_PP_NOGREEN("false") + DRI_CONF_PP_NOBLUE("false") DRI_CONF_PP_JIMENEZMLAA(0, 0, 32) DRI_CONF_PP_JIMENEZMLAA_COLOR(0, 0, 32) DRI_CONF_SECTION_END diff --git a/src/util/xmlpool/t_options.h b/src/util/xmlpool/t_options.h index d3f31fc..4ea3615 100644 --- a/src/util/xmlpool/t_options.h +++ b/src/util/xmlpool/t_options.h @@ -220,22 +220,22 @@ DRI_CONF_OPT_BEGIN_B(float_depth, def) \ DRI_CONF_OPT_END #define DRI_CONF_PP_CELSHADE(def) \ -DRI_CONF_OPT_BEGIN_V(pp_celshade,enum,def,"0:1") \ +DRI_CONF_OPT_BEGIN_B(pp_celshade,def) \ DRI_CONF_DESC(en,gettext("A post-processing filter to cel-shade the output")) \ DRI_CONF_OPT_END #define DRI_CONF_PP_NORED(def) \ -DRI_CONF_OPT_BEGIN_V(pp_nored,enum,def,"0:1") \ +DRI_CONF_OPT_BEGIN_B(pp_nored,def) \ DRI_CONF_DESC(en,gettext("A post-processing filter to remove the red channel")) \ DRI_CONF_OPT_END #define DRI_CONF_PP_NOGREEN(def) \ -DRI_CONF_OPT_BEGIN_V(pp_nogreen,enum,def,"0:1") \ +DRI_CONF_OPT_BEGIN_B(pp_nogreen,def) \ DRI_CONF_DESC(en,gettext("A post-processing filter to remove the green channel")) \ DRI_CONF_OPT_END #define DRI_CONF_PP_NOBLUE(def) \ -DRI_CONF_OPT_BEGIN_V(pp_noblue,enum,def,"0:1") \ +DRI_CONF_OPT_BEGIN_B(pp_noblue,def) \ DRI_CONF_DESC(en,gettext("A post-processing filter to remove the blue channel")) \ DRI_CONF_OPT_END -- 2.7.4 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH V2 0/2] mesa: Modify drirc options
From: Quentin Liu This serie of patches changes drirc's semanticaclly boolean options, options that are enum type options but which in essence are boolean options e.g. pp_shalde, into actual boolean optioinns. Backwawrd compatbility is maintained by relaxinig xmlconfig parser so that xml files before this change can still be parsed correctly. Driconf, unfortunately, will be affected by this. The issue will be addressedd later by releasing a new version of Driconf. Also note that these changes are made to fulfil requirementss to participate in EVoC (Endless Vacaction of Code) hosted by X.org. Quentin Liu (2): mesa: Fix backward compatibility for XML parser mesa: Modify drirc option types src/gallium/auxiliary/pipe-loader/driinfo_gallium.h | 8 src/util/xmlconfig.c| 17 +++-- src/util/xmlpool/t_options.h| 8 3 files changed, 23 insertions(+), 10 deletions(-) -- 2.7.4 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH V2 1/2] mesa: Fix backward compatibility for XML parser
From: Quentin Liu If the type of drirc options are changed, the parser will not be able to recognize xml files that had been present before the change. To achieve backward compatibility, the parser is relaxed to recognize boolean type options with enum values. --- src/util/xmlconfig.c | 17 +++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/src/util/xmlconfig.c b/src/util/xmlconfig.c index d3f47ec..d81a07b 100644 --- a/src/util/xmlconfig.c +++ b/src/util/xmlconfig.c @@ -317,8 +317,21 @@ parseValue(driOptionValue *v, driOptionType type, const XML_Char *string) v->_bool = true; tail = string + 4; } -else -return false; +else { +/* Some drirc options, such as pp_celshalde, were formerly enum + * values. Now that they have been turned into boolean values, + * to achieve backward compatibility relax the check here a + * little bit */ +int value = strToI(string, &tail, 0); +if (value == 1) +v->_bool = true; +else if (value == 0) +v->_bool = false; +else +return false; /* wrong value here */ +} + } + break; case DRI_ENUM: /* enum is just a special integer */ case DRI_INT: -- 2.7.4 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev