<div dir="ltr"><div><div>1) I'll change that<br></div>2) I'll fix that too<br></div>3) I commented on what's wrong with that in a previous patch, I'll change it to be more like the original <br></div><div class="gmail_extra">
<br><br><div class="gmail_quote">On Mon, Jul 22, 2013 at 2:41 PM, Chad Versace <span dir="ltr"><<a href="mailto:chad.versace@linux.intel.com" target="_blank">chad.versace@linux.intel.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">On 07/10/2013 03:19 PM, Dylan Baker wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
A few errors according to the pep8 tool were left behind.<br>
1255-1257: I believe these to be false positives, my reading of PEP 8<br>
makes them seem correct, and the tool does not complain about<br>
other similar lines<br>
247, 392: These are part of a mako template that is embedded in the<br>
python file. A better solution than wrapping them would be to<br>
split them out of the python and put them in their own mako<br>
files.<br>
---<br>
generated_tests/gen_builtin_<u></u>packing_tests.py | 311 ++++++++++++++-------------<br>
1 file changed, 161 insertions(+), 150 deletions(-)<br>
</blockquote>
<br>
<br>
<br>
</div><div><div class="h5"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
def make_inputs_for_unpack_half_<u></u>2x16():<br>
# For each of the two classes of float16 values, subnormal and normalized,<br>
# below are listed the exponent and mantissa of the class's boundary<br>
# values and some values slightly inside the bounds.<br>
- bounds = (<br>
- ( 0, 0), # zero<br>
-<br>
- ( 0, 1), # subnormal_min<br>
- ( 0, 2), # subnormal_min + min_step<br>
-<br>
- ( 0, 1022), # subnormal_max - min_step<br>
- ( 0, 1023), # subnormal_max<br>
-<br>
- ( 1, 0), # normal_min<br>
- ( 1, 1), # normal_min + min_step<br>
-<br>
- (30, 1022), # normal_max - max_step<br>
- (30, 1023), # normal_max<br>
-<br>
- (31, 0), # inf<br>
- )<br>
+ bounds = ((0, 0), # zero<br>
+ (0, 1), # subnormal_min<br>
+ (0, 2), # subnormal_min + min_step<br>
+ (0, 1022), # subnormal_max - min_step<br>
+ (0, 1023), # subnormal_max<br>
+ (1, 0), # normal_min<br>
+ (1, 1), # normal_min + min_step<br>
+ (30, 1022), # normal_max - max_step<br>
+ (30, 1023), # normal_max<br>
+ (31, 0)) # inf<br>
</blockquote>
<br>
<br></div></div>
The original was a table with each cell right-justified. It's ok if you<br>
want to remove the spurious empty lines, but please preserve the<br>
tabular formatting.<div class="im"><br>
<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
@@ -1218,51 +1230,58 @@ def make_inouts_for_unpack_4x8(<u></u>unpack_1x8_func, uint8_inputs):<br>
glsl_literal(vec4_1[2]),<br>
glsl_literal(vec4_1[3])))<br>
<br>
- inout_seq.append(<br>
- InOutTuple(input=glsl_literal(<u></u>u32_0),<br>
- valid_outputs=valid_outputs_0)<u></u>)<br>
- inout_seq.append(<br>
- InOutTuple(input=glsl_literal(<u></u>u32_1),<br>
- valid_outputs=valid_outputs_1)<u></u>)<br>
+ inout_seq.append(InOutTuple(<u></u>input=glsl_literal(u32_0),<br>
+ valid_outputs=valid_outputs_0)<u></u>)<br>
+ inout_seq.append(InOutTuple(<u></u>input=glsl_literal(u32_1),<br>
+ valid_outputs=valid_outputs_1)<u></u>)<br>
</blockquote>
<br>
<br></div>
This looks completely wrong. However, this looks right:<br>
<br>
<br>
inout_seq.append(InOutTuple(<u></u>input=glsl_literal(u32_0),<br>
valid_outputs=valid_outputs_0)<u></u>)<br>
inout_seq.append(InOutTuple(<u></u>input=glsl_literal(u32_1),<div><div class="h5"><br>
valid_outputs=valid_outputs_1)<u></u>)<br>
<br>
<br>
<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
return inout_seq<br>
<br>
# This table maps GLSL pack/unpack function names to the precision of their<br>
# return type.<br>
-result_precision_table = {<br>
- "packSnorm2x16": "highp",<br>
- "packSnorm4x8": "highp",<br>
- "packUnorm2x16": "highp",<br>
- "packUnorm4x8": "highp",<br>
- "packHalf2x16": "highp",<br>
-<br>
- "unpackSnorm2x16": "highp",<br>
- "unpackSnorm4x8": "highp",<br>
- "unpackUnorm2x16": "highp",<br>
- "unpackUnorm4x8": "highp",<br>
- "unpackHalf2x16": "mediump",<br>
- }<br>
+result_precision_table = {"packSnorm2x16": "highp",<br>
+ "packSnorm4x8": "highp",<br>
+ "packUnorm2x16": "highp",<br>
+ "packUnorm4x8": "highp",<br>
+ "packHalf2x16": "highp",<br>
+ "unpackSnorm2x16": "highp",<br>
+ "unpackSnorm4x8": "highp",<br>
+ "unpackUnorm2x16": "highp",<br>
+ "unpackUnorm4x8": "highp",<br>
+ "unpackHalf2x16": "mediump"}<br>
</blockquote>
<br>
<br></div></div>
Did the PEP8 tool complain about this? The original dict was PEP8-compliant,<br>
except maybe for the spurious newline and accidental double-space after *packHalf2x16.<div><div class="h5"><br>
<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
# This table maps GLSL pack/unpack function names to a sequence of InOutTuple.<br>
-inout_table = {<br>
- "packSnorm2x16": make_inouts_for_pack_2x16(<u></u>pack_snorm_1x16, full_input_table["<u></u>packSnorm2x16"], reduced_input_table["<u></u>packSnorm2x16"]),<br>
- "packSnorm4x8": make_inouts_for_pack_4x8(pack_<u></u>snorm_1x8, full_input_table["<u></u>packSnorm4x8"]),<br>
- "packUnorm2x16": make_inouts_for_pack_2x16(<u></u>pack_unorm_1x16, full_input_table["<u></u>packUnorm2x16"], reduced_input_table["<u></u>packUnorm2x16"]),<br>
- "packUnorm4x8": make_inouts_for_pack_4x8(pack_<u></u>unorm_1x8, full_input_table["<u></u>packUnorm4x8"]),<br>
- "packHalf2x16": make_inouts_for_pack_2x16(<u></u>pack_half_1x16, full_input_table["<u></u>packHalf2x16"], reduced_input_table["<u></u>packHalf2x16"]),<br>
-<br>
-<br>
- "unpackSnorm2x16": make_inouts_for_unpack_2x16(<u></u>unpack_snorm_1x16, full_input_table["<u></u>unpackSnorm2x16"]),<br>
- "unpackSnorm4x8": make_inouts_for_unpack_4x8(<u></u>unpack_snorm_1x8, full_input_table["<u></u>unpackSnorm4x8"]),<br>
- "unpackUnorm2x16": make_inouts_for_unpack_2x16(<u></u>unpack_unorm_1x16, full_input_table["<u></u>unpackUnorm2x16"]),<br>
- "unpackUnorm4x8": make_inouts_for_unpack_4x8(<u></u>unpack_unorm_1x8, full_input_table["<u></u>unpackUnorm4x8"]),<br>
- "unpackHalf2x16": make_inouts_for_unpack_2x16(<u></u>unpack_half_1x16, full_input_table["<u></u>unpackHalf2x16"]),<br>
- }<br>
+inout_table = {"packSnorm2x16": make_inouts_for_pack_2x16(<br>
+ pack_snorm_1x16,<br>
+ full_input_table["<u></u>packSnorm2x16"],<br>
+ reduced_input_table["<u></u>packSnorm2x16"]),<br>
+ "packSnorm4x8": make_inouts_for_pack_4x8(<br>
+ pack_snorm_1x8, full_input_table["<u></u>packSnorm4x8"]),<br>
+ "packUnorm2x16": make_inouts_for_pack_2x16(<br>
+ pack_unorm_1x16, full_input_table["<u></u>packUnorm2x16"],<br>
+ reduced_input_table["<u></u>packUnorm2x16"]),<br>
+ "packUnorm4x8": make_inouts_for_pack_4x8(<br>
+ pack_unorm_1x8, full_input_table["<u></u>packUnorm4x8"]),<br>
+ "packHalf2x16": make_inouts_for_pack_2x16(<br>
+ pack_half_1x16, full_input_table["<u></u>packHalf2x16"],<br>
+ reduced_input_table["<u></u>packHalf2x16"]),<br>
+ "unpackSnorm2x16": make_inouts_for_unpack_2x16(<br>
+ unpack_snorm_1x16, full_input_table["<u></u>unpackSnorm2x16"]),<br>
+ "unpackSnorm4x8": make_inouts_for_unpack_4x8(<br>
+ unpack_snorm_1x8, full_input_table["<u></u>unpackSnorm4x8"]),<br>
+ "unpackUnorm2x16": make_inouts_for_unpack_2x16(<br>
+ unpack_unorm_1x16, full_input_table["<u></u>unpackUnorm2x16"]),<br>
+ "unpackUnorm4x8": make_inouts_for_unpack_4x8(<br>
+ unpack_unorm_1x8, full_input_table["<u></u>unpackUnorm4x8"]),<br>
+ "unpackHalf2x16": make_inouts_for_unpack_2x16(<br>
+ unpack_half_1x16, full_input_table["<u></u>unpackHalf2x16"])}<br>
+<br>
</blockquote>
<br>
<br>
<br>
</div></div><div class="im"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
- glsl_es_300_funcs = (<br>
- FuncInfo("packSnorm2x16", requirements),<br>
- FuncInfo("packUnorm2x16", requirements),<br>
- FuncInfo("packHalf2x16", requirements),<br>
-<br>
- FuncInfo("unpackSnorm2x16", requirements),<br>
- FuncInfo("unpackUnorm2x16", requirements),<br>
- FuncInfo("unpackHalf2x16", requirements),<br>
- )<br>
+ glsl_es_300_funcs = (FuncInfo("packSnorm2x16", requirements),<br>
+ FuncInfo("packUnorm2x16", requirements),<br>
+ FuncInfo("packHalf2x16", requirements),<br>
+ FuncInfo("unpackSnorm2x16", requirements),<br>
+ FuncInfo("unpackUnorm2x16", requirements),<br>
+ FuncInfo("unpackHalf2x16", requirements))<br>
</blockquote>
<br></div>
Again, did the PEP8 tool complain about this? If so, I'm very surprised.<br>
<br>
</blockquote></div><br></div>