[Mesa-dev] [PATCH 1/3] hud: Handle query values according to their type

2017-06-15 Thread Boyan Ding
Performance counters may return floating point values, but the hud is currently interpreting them as int regarding of type. As hud doesn't support floating point values, cast them to ints instead. Reviewed-by: Samuel Pitoiset Signed-off-by: Boyan Ding --- src/gallium/auxiliar

[Mesa-dev] [PATCH 2/3] nvc0: Return value of appropriate type for performance metrics

2017-06-15 Thread Boyan Ding
Now that gallium hud properly handle floating point values. And it also helps AMD_performance_monitor to return return correct values for non integer types. Reviewed-by: Samuel Pitoiset Signed-off-by: Boyan Ding --- .../drivers/nouveau/nvc0/nvc0_query_hw_metric.c| 70

[Mesa-dev] [PATCH 3/3] nvc0: Change type of some metrics to float

2017-06-15 Thread Boyan Ding
Metrics such as IPC are better represented as floats instead of ints. This will help query with AMD_performance monitor to return more useful values instead of 0 and 1s. Signed-off-by: Boyan Ding --- .../drivers/nouveau/nvc0/nvc0_query_hw_metric.c| 28 +++--- 1 file changed

[Mesa-dev] [RFC 1/2] hud: Handle query values according to their type

2017-06-11 Thread Boyan Ding
Signed-off-by: Boyan Ding --- src/gallium/auxiliary/hud/hud_driver_query.c | 22 +++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/src/gallium/auxiliary/hud/hud_driver_query.c b/src/gallium/auxiliary/hud/hud_driver_query.c index 76104b5b49..7a469bd1bd 100644

[Mesa-dev] [RFC 0/2] nvc0: Fix non-integer counters in AMD_performance_monitor

2017-06-11 Thread Boyan Ding
ls in handling -- the current code looks somewhat ugly. There are also further problems that I look to solve, namely some performance counters, such as ipc, which should be floats instead of ints. But I want to get basics correct first. Boyan Ding (2): hud: Handle query values according to their

[Mesa-dev] [RFC 2/2] nvc0: Return value of appropriate type instead of u64

2017-06-11 Thread Boyan Ding
Signed-off-by: Boyan Ding --- .../drivers/nouveau/nvc0/nvc0_query_hw_metric.c| 70 +- 1 file changed, 42 insertions(+), 28 deletions(-) diff --git a/src/gallium/drivers/nouveau/nvc0/nvc0_query_hw_metric.c b/src/gallium/drivers/nouveau/nvc0/nvc0_query_hw_metric.c index

[Mesa-dev] [PATCH v2 3/4] nvc0: Add new launch descriptor format for GP100

2017-04-26 Thread Boyan Ding
v2: Also handle the the new format in indirect dispatch Use compute class check instead of chipset check Signed-off-by: Boyan Ding --- src/gallium/drivers/nouveau/nvc0/nve4_compute.c | 164 +++- src/gallium/drivers/nouveau/nvc0/nve4_compute.h | 67 ++ 2 files

[Mesa-dev] [RFC 3/4] nvc0: Add new launch descriptor format for GP100

2017-04-23 Thread Boyan Ding
Signed-off-by: Boyan Ding --- src/gallium/drivers/nouveau/nvc0/nve4_compute.c | 105 ++-- src/gallium/drivers/nouveau/nvc0/nve4_compute.h | 67 +++ 2 files changed, 166 insertions(+), 6 deletions(-) diff --git a/src/gallium/drivers/nouveau/nvc0/nve4_compute.c b

[Mesa-dev] [PATCH 2/4] nvc0: Fix index of unk fields in nve4_cp_launch_desc

2017-04-23 Thread Boyan Ding
Signed-off-by: Boyan Ding --- src/gallium/drivers/nouveau/nvc0/nve4_compute.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gallium/drivers/nouveau/nvc0/nve4_compute.h b/src/gallium/drivers/nouveau/nvc0/nve4_compute.h index 5fe58b9671..75b169323b 100644 --- a/src

[Mesa-dev] [RFC 0/4] nvc0: ARB_compute_shader for Pascal

2017-04-23 Thread Boyan Ding
discovered when writing the code. Major work is done in the latter two. Boyan Ding (4): nouveau: Fix indentation of maxwell compute class definitions nvc0: Fix index of unk fields in nve4_cp_launch_desc nvc0: Add new launch descriptor format for GP100 nvc0: Enable compute support for Pascal

[Mesa-dev] [RFC 4/4] nvc0: Enable compute support for Pascal

2017-04-23 Thread Boyan Ding
Signed-off-by: Boyan Ding --- src/gallium/drivers/nouveau/nv_object.xml.h | 2 ++ src/gallium/drivers/nouveau/nvc0/nvc0_screen.c | 6 ++ src/gallium/drivers/nouveau/nvc0/nve4_compute.c | 3 +++ 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/gallium/drivers/nouveau

[Mesa-dev] [PATCH 1/4] nouveau: Fix indentation of maxwell compute class definitions

2017-04-23 Thread Boyan Ding
Signed-off-by: Boyan Ding --- src/gallium/drivers/nouveau/nv_object.xml.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gallium/drivers/nouveau/nv_object.xml.h b/src/gallium/drivers/nouveau/nv_object.xml.h index f200c9c9c9..1263bff450 100644 --- a/src/gallium

Re: [Mesa-dev] [PATCH v2 2/2] nvc0: Add support for AMD_vertex_shader{layer, viewport_index}

2017-04-19 Thread Boyan Ding
B_shader_viewport_layer_array. Please include this one here and in docs/features.txt after ensuring that it is really enabled. Cheers, Boyan Ding > GL_NV_fill_rectangle on nvc0 > Geometry shaders enabled on swr > > diff --git a/src/gallium/drivers/nouveau/nvc0/nvc0_context.h

Re: [Mesa-dev] [PATCH v2 1/2] nvc0/ir: Only store viewport in scratch register for GP

2017-04-19 Thread Boyan Ding
2017-04-20 6:38 GMT+08:00 Lyude : > EMIT only applies to geometry shaders. For everything else, we want to > export the viewport normally. > > Signed-off-by: Lyude Reviewed-by: Boyan Ding > > Changes since v1: > - Put back old conditional for Converter::storeDst >

Re: [Mesa-dev] [PATCH 2/2] i965: Add ARB_fragment_shader_interlock support.

2017-04-17 Thread Boyan Ding
vc0, radeonsi) > diff --git a/docs/relnotes/17.1.0.html b/docs/relnotes/17.1.0.html > index e7cfe38..1b2393f 100644 > --- a/docs/relnotes/17.1.0.html > +++ b/docs/relnotes/17.1.0.html > @@ -45,6 +45,7 @@ Note: some of the new features are only available with > certain drivers. > >

Re: [Mesa-dev] [PATCH] nv50/ir: Change chipset constants to ISA constants and #define to enum.

2017-04-12 Thread Boyan Ding
2017-04-13 13:45 GMT+08:00 Matthew Mondazzi : > More relevant ISA constants put in place of chipset compares. This helps > better display which features are available to card than previous chipset > compares, making future development easier continue with. > > Signed-off-by: Matthew Mondazzi > -

Re: [Mesa-dev] [PATCH] nir: Destination component count of shader_clock intrinsic is 2

2017-04-12 Thread Boyan Ding
2017-04-13 2:25 GMT+08:00 Jason Ekstrand : > On Wed, Apr 12, 2017 at 6:14 AM, Boyan Ding wrote: >> >> This fixes the following error when using ARB_shader_clock on i965: >> vec1 32 ssa_0 = intrinsic shader_clock () () () >> intrinsic store_var (ssa_0) (

[Mesa-dev] [PATCH] nir: Destination component count of shader_clock intrinsic is 2

2017-04-12 Thread Boyan Ding
sa-sta...@lists.freedesktop.org Signed-off-by: Boyan Ding --- src/compiler/glsl/glsl_to_nir.cpp | 3 ++- src/compiler/nir/nir_intrinsics.h | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/compiler/glsl/glsl_to_nir.cpp b/src/compiler/glsl/glsl_to_nir.cpp index f0557f985b..870d457681

[Mesa-dev] [PATCH v3 8/9] nvc0/ir: Implement TGSI_OPCODE_BALLOT and TGSI_OPCODE_READ_*

2017-04-10 Thread Boyan Ding
v2: Check if each channel is masked in TGSI_OPCODE_BALLOT (Ilia Mirkin) Signed-off-by: Boyan Ding --- .../drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp | 31 ++ 1 file changed, 31 insertions(+) diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp b/src

[Mesa-dev] [PATCH v3 9/9] nvc0: Enable ARB_shader_ballot on Kepler+

2017-04-10 Thread Boyan Ding
readInvocationARB() and readFirstInvocationARB() need SHFL.IDX instruction which is introduced in Kepler. Reviewed-by: Ilia Mirkin Signed-off-by: Boyan Ding --- docs/features.txt | 2 +- docs/relnotes/17.1.0.html | 2 +- src/gallium/drivers

[Mesa-dev] [PATCH v3 2/9] nvc0/ir: Properly handle a "split form" of predicate destination

2017-04-10 Thread Boyan Ding
tting of the highest bit in setPDSTL() Cc: mesa-sta...@lists.freedesktop.org Signed-off-by: Boyan Ding --- src/gallium/drivers/nouveau/codegen/nv50_ir_emit_nvc0.cpp | 15 +-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_emit

[Mesa-dev] [PATCH v3 6/9] nvc0/ir: Add SV_LANEMASK_* system values.

2017-04-10 Thread Boyan Ding
v2: Add name strings in nv50_ir_print.cpp (Ilia Mirkin) Signed-off-by: Boyan Ding --- src/gallium/drivers/nouveau/codegen/nv50_ir.h | 5 + src/gallium/drivers/nouveau/codegen/nv50_ir_emit_gk110.cpp | 5 + src/gallium/drivers/nouveau/codegen/nv50_ir_emit_gm107.cpp | 5

[Mesa-dev] [PATCH v3 7/9] nvc0/ir: Implement TGSI_SEMANTIC_SUBGROUP_*

2017-04-10 Thread Boyan Ding
Reviewed-by: Ilia Mirkin Signed-off-by: Boyan Ding --- .../drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp | 27 ++ 1 file changed, 27 insertions(+) diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp b/src/gallium/drivers/nouveau/codegen

[Mesa-dev] [PATCH v3 5/9] nvc0/ir: Allow 0/1 immediate value as source of OP_VOTE

2017-04-10 Thread Boyan Ding
OP_VOTE accept immediate value 0/1 and emit "0x1" and "not 0x1" in the src field respectively. v2: Make sure that asImm() is not NULL (Samuel Pitoiset) v3: (Ilia Mirkin) Make the handling more symmetric with predicate version in gm107 Use i->getSrc(s) Signed-off-by: Boyan

[Mesa-dev] [PATCH v3 3/9] nvc0/ir: Emit OP_SHFL

2017-04-10 Thread Boyan Ding
v2: (Samuel Pitoiset) Add an assertion to check if the target is Kepler Make sure that asImm() is not NULL v3: (Ilia Mirkin) Check the range of immediate value of OP_SHFL Use the new setPDSTL API Signed-off-by: Boyan Ding --- .../drivers/nouveau/codegen/nv50_ir_emit_nvc0.cpp | 53

[Mesa-dev] [PATCH v3 4/9] gk110/ir: Emit OP_SHFL

2017-04-10 Thread Boyan Ding
v2: Make sure that asImm() is not NULL (Samuel Pitoiset) v3: Check the range of immediate in OP_SHFL (Ilia Mirkin) Signed-off-by: Boyan Ding --- .../drivers/nouveau/codegen/nv50_ir_emit_gk110.cpp | 56 ++ 1 file changed, 56 insertions(+) diff --git a/src/gallium/drivers

[Mesa-dev] [PATCH v3 1/9] gm107/ir: Emit third src 'bound' and optional predicate output of SHFL

2017-04-10 Thread Boyan Ding
v2: Emit the original hard-coded 0x1c03 when OP_SHFL is used in gm107's lowering (Samuel Pitoiset) Signed-off-by: Boyan Ding --- .../drivers/nouveau/codegen/nv50_ir_emit_gm107.cpp | 23 ++ .../nouveau/codegen/nv50_ir_lowering_gm107.cpp | 15 +- 2

[Mesa-dev] [PATCH 0/9] nvc0: ARB_shader_ballot for Kepler+ (v3)

2017-04-10 Thread Boyan Ding
This is the third, and hopefully the last revision of ballot series. This series mainly incorporates Ilia's feedback, with some fixes, more check and code cleanup. Please review. Boyan Ding (9): gm107/ir: Emit third src 'bound' and optional predicate output of SHFL nvc0/ir: Pr

Re: [Mesa-dev] [PATCH v2 8/9] nvc0/ir: Implement TGSI_OPCODE_BALLOT and TGSI_OPCODE_READ_*

2017-04-09 Thread Boyan Ding
2017-04-10 9:54 GMT+08:00 Ilia Mirkin : > On Sun, Apr 9, 2017 at 8:58 PM, Boyan Ding wrote: >> --- >> .../drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp | 28 >> ++ >> 1 file changed, 28 insertions(+) >> >> diff --gi

Re: [Mesa-dev] [PATCH v2 2/9] nvc0/ir: Properly handle a "split form" of predicate destination

2017-04-09 Thread Boyan Ding
2017-04-10 9:31 GMT+08:00 Ilia Mirkin : > Wow, great find! > > On Sun, Apr 9, 2017 at 8:58 PM, Boyan Ding wrote: >> GF100's ISA encoding has a weird form of predicate destination where its >> 3 bits are split across whole the instruction. Use a dedicated setPDSTL >&

[Mesa-dev] [PATCH v2 9/9] nvc0: Enable ARB_shader_ballot on Kepler+

2017-04-09 Thread Boyan Ding
readInvocationARB() and readFirstInvocationARB() need SHFL.IDX instruction which is introduced in Kepler. --- docs/features.txt | 2 +- docs/relnotes/17.1.0.html | 2 +- src/gallium/drivers/nouveau/nvc0/nvc0_screen.c | 3 ++- 3 files changed, 4 ins

[Mesa-dev] [PATCH v2 6/9] nvc0/ir: Add SV_LANEMASK_* system values.

2017-04-09 Thread Boyan Ding
--- src/gallium/drivers/nouveau/codegen/nv50_ir.h | 5 + src/gallium/drivers/nouveau/codegen/nv50_ir_emit_gk110.cpp | 5 + src/gallium/drivers/nouveau/codegen/nv50_ir_emit_gm107.cpp | 5 + src/gallium/drivers/nouveau/codegen/nv50_ir_emit_nvc0.cpp | 5 + 4 files change

[Mesa-dev] [PATCH v2 5/9] nvc0/ir: Allow 0/1 immediate value as source of OP_VOTE

2017-04-09 Thread Boyan Ding
Implementation of readFirstInvocationARB() on nvidia hardware needs a ballotARB(true) used to decide the first active thread. This expressed in gm107 asm as (supposing output is $r0): vote any $r0 0x1 0x1 To model the always true input, which corresponds to the second 0x1 above, we make OP

[Mesa-dev] [PATCH v2 7/9] nvc0/ir: Implement TGSI_SEMANTIC_SUBGROUP_*

2017-04-09 Thread Boyan Ding
--- .../drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp | 27 ++ 1 file changed, 27 insertions(+) diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp b/src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp index 3ed7d345c4..1bd01a9a32 100644 --- a/src/ga

[Mesa-dev] [PATCH v2 3/9] nvc0/ir: Emit OP_SHFL

2017-04-09 Thread Boyan Ding
v2: (Samuel Pitoiset) Add an assertion to check if the target is Kepler Make sure that asImm() is not NULL --- .../drivers/nouveau/codegen/nv50_ir_emit_nvc0.cpp | 59 ++ 1 file changed, 59 insertions(+) diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_emit_nvc0.cpp b

[Mesa-dev] [PATCH v2 1/9] gm107/ir: Emit third src 'bound' and optional predicate output of SHFL

2017-04-09 Thread Boyan Ding
v2: Emit the original hard-coded 0x1c03 when OP_SHFL is used in gm107's lowering (Samuel Pitoiset) --- .../drivers/nouveau/codegen/nv50_ir_emit_gm107.cpp | 23 ++ .../nouveau/codegen/nv50_ir_lowering_gm107.cpp | 15 +- 2 files changed, 29 insertions(+), 9 de

[Mesa-dev] [PATCH v2 2/9] nvc0/ir: Properly handle a "split form" of predicate destination

2017-04-09 Thread Boyan Ding
GF100's ISA encoding has a weird form of predicate destination where its 3 bits are split across whole the instruction. Use a dedicated setPDSTL function instead of original defId which is incorrect in this case. --- src/gallium/drivers/nouveau/codegen/nv50_ir_emit_nvc0.cpp | 13 +++-- 1 f

[Mesa-dev] [PATCH 0/9] nvc0: ARB_shader_ballot for Kepler+ (v2)

2017-04-09 Thread Boyan Ding
This is v2 series of my ARB_shader_ballot enablement. I added some fixes based on Samuel Pitoiset's feedback, which mainly include adapting existing OP_SHFL usage to the new form in gm107's lowering and addition of several assertion checks. It is also rebased against current master. Boy

[Mesa-dev] [PATCH v2 8/9] nvc0/ir: Implement TGSI_OPCODE_BALLOT and TGSI_OPCODE_READ_*

2017-04-09 Thread Boyan Ding
--- .../drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp | 28 ++ 1 file changed, 28 insertions(+) diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp b/src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp index 1bd01a9a32..2ce6f29905 100644 --- a/src/ga

[Mesa-dev] [PATCH v2 4/9] gk110/ir: Emit OP_SHFL

2017-04-09 Thread Boyan Ding
v2: Make sure that asImm() is not NULL (Samuel Pitoiset) --- .../drivers/nouveau/codegen/nv50_ir_emit_gk110.cpp | 56 ++ 1 file changed, 56 insertions(+) diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_emit_gk110.cpp b/src/gallium/drivers/nouveau/codegen/nv50_ir_emit

Re: [Mesa-dev] [PATCH 1/9] gm107/ir: Emit third src 'bound' and optional predicate output of SHFL

2017-04-08 Thread Boyan Ding
2017-04-08 20:42 GMT+08:00 Samuel Pitoiset : > > > On 04/08/2017 11:51 AM, Boyan Ding wrote: >> >> --- >> .../drivers/nouveau/codegen/nv50_ir_emit_gm107.cpp | 23 >> ++ >> 1 file changed, 19 insertions(+), 4 deletions(-) >> >&g

[Mesa-dev] [PATCH 9/9] nvc0: Enable ARB_shader_ballot on Kepler+

2017-04-08 Thread Boyan Ding
readInvocationARB() and readFirstInvocationARB() need SHFL.IDX instruction which is introduced in Kepler. --- docs/features.txt | 2 +- docs/relnotes/17.1.0.html | 2 +- src/gallium/drivers/nouveau/nvc0/nvc0_screen.c | 3 ++- 3 files changed, 4 ins

[Mesa-dev] [PATCH 7/9] nvc0/ir: Implement TGSI_SEMANTIC_SUBGROUP_*

2017-04-08 Thread Boyan Ding
--- .../drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp | 27 ++ 1 file changed, 27 insertions(+) diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp b/src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp index 13625bf3bd..56e7951e99 100644 --- a/src/ga

[Mesa-dev] [PATCH 8/9] nvc0/ir: Implement TGSI_OPCODE_BALLOT and TGSI_OPCODE_READ_*

2017-04-08 Thread Boyan Ding
--- .../drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp | 28 ++ 1 file changed, 28 insertions(+) diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp b/src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp index 56e7951e99..10cb2325e9 100644 --- a/src/ga

[Mesa-dev] [PATCH 2/9] nvc0/ir: Properly handle a "split form" of predicate destination

2017-04-08 Thread Boyan Ding
GF100's ISA encoding has a weird form of predicate destination where its 3 bits are split across whole the instruction. Use a dedicated setPDSTL function instead of original defId which is incorrect in this case. --- src/gallium/drivers/nouveau/codegen/nv50_ir_emit_nvc0.cpp | 13 +++-- 1 f

[Mesa-dev] [PATCH 6/9] nvc0/ir: Add SV_LANEMASK_* system values.

2017-04-08 Thread Boyan Ding
--- src/gallium/drivers/nouveau/codegen/nv50_ir.h | 5 + src/gallium/drivers/nouveau/codegen/nv50_ir_emit_gk110.cpp | 5 + src/gallium/drivers/nouveau/codegen/nv50_ir_emit_gm107.cpp | 5 + src/gallium/drivers/nouveau/codegen/nv50_ir_emit_nvc0.cpp | 5 + 4 files change

[Mesa-dev] [PATCH 0/9] nvc0: ARB_shader_ballot for Kepler+

2017-04-08 Thread Boyan Ding
translate readFirstInvocationARB. Patches 6-8 hook up the logic with tgsi, and the extension is eventually flipped on in the last patch. Boyan Ding (9): gm107/ir: Emit third src 'bound' and optional predicate output of SHFL nvc0/ir: Properly handle a "split form" of predicate destination nv

[Mesa-dev] [PATCH 5/9] nvc0/ir: Allow 0/1 immediate value as source of OP_VOTE

2017-04-08 Thread Boyan Ding
Implementation of readFirstInvocationARB() on nvidia hardware needs a ballotARB(true) used to decide the first active thread. This expressed in gm107 asm as (supposing output is $r0): vote any $r0 0x1 0x1 To model the always true input, which corresponds to the second 0x1 above, we make OP

[Mesa-dev] [PATCH 1/9] gm107/ir: Emit third src 'bound' and optional predicate output of SHFL

2017-04-08 Thread Boyan Ding
--- .../drivers/nouveau/codegen/nv50_ir_emit_gm107.cpp | 23 ++ 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_emit_gm107.cpp b/src/gallium/drivers/nouveau/codegen/nv50_ir_emit_gm107.cpp index 6903132efa..4a741bf45b 1

[Mesa-dev] [PATCH 4/9] gk110/ir: Emit OP_SHFL

2017-04-08 Thread Boyan Ding
--- .../drivers/nouveau/codegen/nv50_ir_emit_gk110.cpp | 50 ++ 1 file changed, 50 insertions(+) diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_emit_gk110.cpp b/src/gallium/drivers/nouveau/codegen/nv50_ir_emit_gk110.cpp index 1121ae0912..e82e3684b0 100644 --- a/src/

[Mesa-dev] [PATCH 3/9] nvc0/ir: Emit OP_SHFL

2017-04-08 Thread Boyan Ding
--- .../drivers/nouveau/codegen/nv50_ir_emit_nvc0.cpp | 51 ++ 1 file changed, 51 insertions(+) diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_emit_nvc0.cpp b/src/gallium/drivers/nouveau/codegen/nv50_ir_emit_nvc0.cpp index d5a310f88c..8dd73bd77d 100644 --- a/src/ga

[Mesa-dev] [PATCH v2 2/3] nvc0/ir: Handle TGSI_OPCODE_CLOCK

2017-04-04 Thread Boyan Ding
v2: Check if the input channels are enabled Set lower 32 bits zero instead of clockhi Signed-off-by: Boyan Ding --- src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp | 6 ++ 1 file changed, 6 insertions(+) diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp

[Mesa-dev] [PATCH v2 3/3] nouveau: enable ARB_shader_clock on nv50 and nvc0

2017-04-04 Thread Boyan Ding
v2: Also enable support on nv50 Signed-off-by: Boyan Ding --- docs/features.txt | 2 +- docs/relnotes/17.1.0.html | 2 +- src/gallium/drivers/nouveau/nv50/nv50_screen.c | 2 +- src/gallium/drivers/nouveau/nvc0/nvc0_screen.c | 2 +- 4 files

Re: [Mesa-dev] [PATCH 07/19] tgsi: add BALLOT/READ_* opcodes

2017-04-03 Thread Boyan Ding
2017-04-01 1:14 GMT+08:00 Nicolai Hähnle : > From: Ilia Mirkin > > v2 (Nicolai): > - BALLOT isn't per-channel > - expand the documentation (also for VOTE_*) > > Signed-off-by: Ilia Mirkin > Signed-off-by: Nicolai Hähnle > --- > src/gallium/auxiliary/tgsi/tgsi_info.c | 6 +-- > src/gallium/

Re: [Mesa-dev] [PATCH 2/3] nvc0/ir: Handle TGSI_OPCODE_CLOCK

2017-03-30 Thread Boyan Ding
2017-03-31 11:24 GMT+08:00 Ilia Mirkin : > On Thu, Mar 30, 2017 at 10:33 PM, Boyan Ding wrote: >> Signed-off-by: Boyan Ding >> --- >> src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp | 5 + >> 1 file changed, 5 insertions(+) >> >> diff --gi

Re: [Mesa-dev] [PATCH 1/3] gm107/ir: Emit SV_CLOCK system value

2017-03-30 Thread Boyan Ding
checked with maxwell+, just believing in the correctness in envydis and uniformity between architectures. But I will check when I reach my pascal machine later. Cheers. Boyan Ding [1] https://github.com/envytools/envytools/pull/84 > > On Thu, Mar 30, 2017 at 10:33 PM, Boyan Ding wrote: >> S

[Mesa-dev] [PATCH 3/3] nvc0: enable ARB_shader_clock

2017-03-30 Thread Boyan Ding
Signed-off-by: Boyan Ding --- docs/features.txt | 2 +- docs/relnotes/17.1.0.html | 2 +- src/gallium/drivers/nouveau/nvc0/nvc0_screen.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/features.txt b/docs/features.txt

[Mesa-dev] [PATCH 1/3] gm107/ir: Emit SV_CLOCK system value

2017-03-30 Thread Boyan Ding
Signed-off-by: Boyan Ding --- src/gallium/drivers/nouveau/codegen/nv50_ir_emit_gm107.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_emit_gm107.cpp b/src/gallium/drivers/nouveau/codegen/nv50_ir_emit_gm107.cpp index 6de3f396e3..ab9c94b4d0

[Mesa-dev] [PATCH 2/3] nvc0/ir: Handle TGSI_OPCODE_CLOCK

2017-03-30 Thread Boyan Ding
Signed-off-by: Boyan Ding --- src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp | 5 + 1 file changed, 5 insertions(+) diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp b/src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp index 7aaeedf8dd..9fbd3c0d30

[Mesa-dev] [PATCH 0/3] ARB_shader_clock for nvc0

2017-03-30 Thread Boyan Ding
This series depends on the Nicolai's work in gallium[1], and it's quite trivial. The first patch handles clock registers on Maxwell+, and the second one translates TGSI_OPCODE_CLOCK into special register reads. The last patch just flips the extension on. Boyan [1]https://lists.freedesktop.org/arc

[Mesa-dev] [PATCH v2] nouveau: enable glsl/tgsi on-disk cache

2017-03-21 Thread Boyan Ding
v2: Fix argument to nouveau_screen_get_name() Signed-off-by: Boyan Ding --- src/gallium/drivers/nouveau/nouveau_screen.c | 30 src/gallium/drivers/nouveau/nouveau_screen.h | 3 +++ 2 files changed, 33 insertions(+) diff --git a/src/gallium/drivers/nouveau

[Mesa-dev] [PATCH] nouveau: enable glsl/tgsi on-disk cache

2017-03-11 Thread Boyan Ding
Signed-off-by: Boyan Ding --- src/gallium/drivers/nouveau/nouveau_screen.c | 29 src/gallium/drivers/nouveau/nouveau_screen.h | 3 +++ 2 files changed, 32 insertions(+) diff --git a/src/gallium/drivers/nouveau/nouveau_screen.c b/src/gallium/drivers/nouveau

[Mesa-dev] [RFC v2 3/3] gk110/ir: Use the new rcp/rsq in library

2017-03-08 Thread Boyan Ding
Signed-off-by: Boyan Ding --- .../nouveau/codegen/nv50_ir_lowering_nvc0.cpp | 32 ++ .../nouveau/codegen/nv50_ir_lowering_nvc0.h| 1 + 2 files changed, 33 insertions(+) diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nvc0.cpp b/src/gallium

[Mesa-dev] [RFC v2 2/3] gk110/ir: Add rsq f64 implementation

2017-03-08 Thread Boyan Ding
Signed-off-by: Boyan Ding --- src/gallium/drivers/nouveau/codegen/lib/gk110.asm | 69 +- .../drivers/nouveau/codegen/lib/gk110.asm.h| 42 - 2 files changed, 109 insertions(+), 2 deletions(-) diff --git a/src/gallium/drivers/nouveau/codegen/lib/gk110.asm

[Mesa-dev] [RFC v2 1/3] gk110/ir: Add rcp f64 implementation

2017-03-08 Thread Boyan Ding
Signed-off-by: Boyan Ding --- src/gallium/drivers/nouveau/codegen/lib/gk110.asm | 152 - .../drivers/nouveau/codegen/lib/gk110.asm.h| 87 +++- 2 files changed, 235 insertions(+), 4 deletions(-) diff --git a/src/gallium/drivers/nouveau/codegen/lib/gk110.asm

[Mesa-dev] [RFC v2 0/3] More precise rcp and rsq for fp64 on gk110

2017-03-08 Thread Boyan Ding
rence. However, analysis with mpfr shows that all of those were 1ulp error on both sides. So the precision now should satisfy the requirement. The assembly uses an instruction format yet to be merged to upstream envytools assembler. I'll get that merged soon. Boyan Ding (3): gk110/ir: A

Re: [Mesa-dev] [RFC 1/3] gk110/ir: Add rcp f64 implementation

2017-03-06 Thread Boyan Ding
2017-03-06 0:33 GMT+08:00 Ilia Mirkin : > On Sun, Mar 5, 2017 at 10:34 AM, Boyan Ding wrote: >> Signed-off-by: Boyan Ding >> --- >> src/gallium/drivers/nouveau/codegen/lib/gk110.asm | 156 >> - >> .../drivers/nouveau/codegen/lib/gk110.asm.h

[Mesa-dev] [RFC 2/3] gk110/ir: Add rcp f64 implementation

2017-03-05 Thread Boyan Ding
Signed-off-by: Boyan Ding --- src/gallium/drivers/nouveau/codegen/lib/gk110.asm | 65 +- .../drivers/nouveau/codegen/lib/gk110.asm.h| 40 - 2 files changed, 103 insertions(+), 2 deletions(-) diff --git a/src/gallium/drivers/nouveau/codegen/lib/gk110.asm

[Mesa-dev] [RFC 0/3] More precise rcp and rsq for fp64 on gk110

2017-03-05 Thread Boyan Ding
ught to be stable enough. Boyan Ding (3): gk110/ir: Add rcp f64 implementation gk110/ir: Add rcp f64 implementation gk110/ir: Use the new rcp/rsq f64 in library src/gallium/drivers/nouveau/codegen/lib/gk110.asm | 219 - .../drivers/nouveau/codegen/lib/gk110.asm.h

[Mesa-dev] [RFC 3/3] gk110/ir: Use the new rcp/rsq f64 in library

2017-03-05 Thread Boyan Ding
Signed-off-by: Boyan Ding --- .../nouveau/codegen/nv50_ir_lowering_nvc0.cpp | 32 ++ .../nouveau/codegen/nv50_ir_lowering_nvc0.h| 1 + 2 files changed, 33 insertions(+) diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nvc0.cpp b/src/gallium

[Mesa-dev] [RFC 1/3] gk110/ir: Add rcp f64 implementation

2017-03-05 Thread Boyan Ding
Signed-off-by: Boyan Ding --- src/gallium/drivers/nouveau/codegen/lib/gk110.asm | 156 - .../drivers/nouveau/codegen/lib/gk110.asm.h| 96 - 2 files changed, 248 insertions(+), 4 deletions(-) diff --git a/src/gallium/drivers/nouveau/codegen/lib/gk110.asm

Re: [Mesa-dev] How to enable virgl?

2017-02-28 Thread Boyan Ding
2017-02-28 18:55 GMT+08:00 Christophe de Dinechin : > Newbie question… > > I’ve been investigating a regression in Fedora 25 between mesa-dri-drivers > versions 12.0.3 and 13.0.3 > (https://bugzilla.redhat.com/show_bug.cgi?id=1426549). > > The output with the Fedora version of Mesa is: > > GL_REN

Re: [Mesa-dev] [Mesa-stable] [PATCH] mesa: call DrawBuffer(s) driver hook in update_framebuffer for windows-system FB

2017-02-03 Thread Boyan Ding
2017-02-02 7:58 GMT+08:00 Brian Paul : > This makes three places in the code where we call ctx->Driver.DrawBuffers() > or ctx->Driver.DrawBuffer() like this. I think some refactoring would be > good. > > Perhaps these calls can go into _mesa_drawbuffers(). I'll try to look into > that in a few da

[Mesa-dev] [PATCH] configure.ac: Remove redundant libglvnd stanza

2017-01-24 Thread Boyan Ding
ter the new libglvnd configuration section. Signed-off-by: Boyan Ding --- configure.ac | 81 1 file changed, 32 insertions(+), 49 deletions(-) diff --git a/configure.ac b/configure.ac index 64ace9dbcb..687ad9f99b 100644 --- a/configure.a

[Mesa-dev] [PATCH] mesa: call DrawBuffer(s) driver hook in update_framebuffer for windows-system FB

2017-01-20 Thread Boyan Ding
https://bugs.freedesktop.org/show_bug.cgi?id=99116 Signed-off-by: Boyan Ding --- src/mesa/main/framebuffer.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/src/mesa/main/framebuffer.c b/src/mesa/main/framebuffer.c index c06130dc8d..55a6d5c004 100644 --- a/src/mesa/main/framebuffer.c +++ b/src/mesa

Re: [Mesa-dev] [RFC] st/mesa: Add both front and back buffers for double-buffer visuals

2017-01-19 Thread Boyan Ding
2017-01-18 18:23 GMT+08:00 Józef Kucia : > On Wed, Jan 18, 2017 at 2:25 AM, Boyan Ding wrote: >> I don't think I find that. The only place in state tracker where >> _mesa_add_renderbuffer is called is st_framebuffer_create and only one >> of the front and back buffers

Re: [Mesa-dev] [RFC] st/mesa: Add both front and back buffers for double-buffer visuals

2017-01-17 Thread Boyan Ding
2017-01-18 1:31 GMT+08:00 Brian Paul : > On 01/17/2017 06:44 AM, Boyan Ding wrote: >> >> st will only add back buffer attachment to window framebuffer when >> visual is in double-buffer mode. However, some applications may >> render to front buffer even if they have ch

[Mesa-dev] [RFC] st/mesa: Add both front and back buffers for double-buffer visuals

2017-01-17 Thread Boyan Ding
, in which it adds both front and back buffer attachments. Do the same thing in st. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=99116 Signed-off-by: Boyan Ding --- src/mesa/state_tracker/st_manager.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/mesa

[Mesa-dev] [PATCH] mesa/get: Remove unused extra_ARB_viewport_array

2017-01-09 Thread Boyan Ding
Unused since 0a7691ee (mesa: Enable enums for OES_viewport_array). Silence a warning of unused variable. Signed-off-by: Boyan Ding --- src/mesa/main/get.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/mesa/main/get.c b/src/mesa/main/get.c index 10b40d405d..f0bb041fc3 100644 --- a/src

[Mesa-dev] [PATCH] spirv: replace assert() with unreachable()

2017-01-09 Thread Boyan Ding
To match the usage at other places. Signed-off-by: Boyan Ding --- src/compiler/spirv/vtn_variables.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/compiler/spirv/vtn_variables.c b/src/compiler/spirv/vtn_variables.c index e3845365bd..26a8ca369b 100644 --- a/src

Re: [Mesa-dev] [PATCH] glsl: Do not allow scalar types in vector relational functions

2017-01-09 Thread Boyan Ding
2016-11-23 21:20 GMT+08:00 Boyan Ding : > 2016-11-07 20:27 GMT+08:00 Boyan Ding : >> 2016-11-05 3:23 GMT+08:00 Matt Turner : >>> On Sun, Oct 30, 2016 at 11:45 PM, Boyan Ding wrote: >>>> According to OpenGL Shading Language 4.50 spec, Section 8.7 "Vector >&

Re: [Mesa-dev] [PATCH] i915: Add XRGB8888 format to intel_screen_make_configs

2016-11-23 Thread Boyan Ding
2016-11-24 13:29 GMT+08:00 Derek Foreman : > On 23/11/16 07:18 PM, Boyan Ding wrote: >> >> 2016-11-24 7:01 GMT+08:00 Derek Foreman : >>> >>> This is a copy of commit 536003c11e4cb1172c540932ce3cce06f03bf44e >>> except for i915. >>> >>

Re: [Mesa-dev] [PATCH] i915: Add XRGB8888 format to intel_screen_make_configs

2016-11-23 Thread Boyan Ding
t withdrew it because it seems no one got interested in that and I don't have the hardware to test. If you're sure it is correct, this gets my Acked-by: Boyan Ding Regards, Boyan Ding [1] https://lists.freedesktop.org/archives/mesa-dev/2015-April/081501.html >

Re: [Mesa-dev] [PATCH] glsl: Do not allow scalar types in vector relational functions

2016-11-23 Thread Boyan Ding
2016-11-07 20:27 GMT+08:00 Boyan Ding : > 2016-11-05 3:23 GMT+08:00 Matt Turner : >> On Sun, Oct 30, 2016 at 11:45 PM, Boyan Ding wrote: >>> According to OpenGL Shading Language 4.50 spec, Section 8.7 "Vector >>> Relational Functions", functions of this type d

Re: [Mesa-dev] [PATCH] glsl: Do not allow scalar types in vector relational functions

2016-11-07 Thread Boyan Ding
2016-11-05 3:23 GMT+08:00 Matt Turner : > On Sun, Oct 30, 2016 at 11:45 PM, Boyan Ding wrote: >> According to OpenGL Shading Language 4.50 spec, Section 8.7 "Vector >> Relational Functions", functions of this type do not operate on scalar >> types, so rem

[Mesa-dev] [PATCH] glsl: Do not allow scalar types in vector relational functions

2016-10-30 Thread Boyan Ding
According to OpenGL Shading Language 4.50 spec, Section 8.7 "Vector Relational Functions", functions of this type do not operate on scalar types, so remove scalar types from signature definitions to make the behavior consistent with glslangValidator and other drivers. Signed-off-by:

Re: [Mesa-dev] [PATCH] loader: fix memory leak in loader_dri3_open

2016-07-29 Thread Boyan Ding
gt; } > > fd = xcb_dri3_open_reply_fds(conn, reply)[0]; > + free(reply); > fcntl(fd, F_SETFD, fcntl(fd, F_GETFD) | FD_CLOEXEC); > > return fd; > ___ > mesa-dev mailing list > mesa-dev@lists.freedesktop.org > ht

[Mesa-dev] [PATCH 7/8] xlib: Unify the style of function pointer calls in structs

2015-11-24 Thread Boyan Ding
Signed-off-by: Boyan Ding --- src/mesa/drivers/x11/glxapi.c | 144 +- 1 file changed, 72 insertions(+), 72 deletions(-) diff --git a/src/mesa/drivers/x11/glxapi.c b/src/mesa/drivers/x11/glxapi.c index a870e94..a3993d5 100644 --- a/src/mesa/drivers/x11

[Mesa-dev] [PATCH 8/8] program: Unify the style of function pointer calls in structs

2015-11-24 Thread Boyan Ding
Signed-off-by: Boyan Ding --- src/mesa/program/prog_hash_table.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/mesa/program/prog_hash_table.c b/src/mesa/program/prog_hash_table.c index 5592b6f..25ca6b3 100644 --- a/src/mesa/program/prog_hash_table.c +++ b

[Mesa-dev] [PATCH 5/8] nouveau: Unify the style of function pointer calls in structs

2015-11-24 Thread Boyan Ding
Signed-off-by: Boyan Ding --- src/mesa/drivers/dri/nouveau/nouveau_context.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/mesa/drivers/dri/nouveau/nouveau_context.c b/src/mesa/drivers/dri/nouveau/nouveau_context.c index cb854b8..6ddcadc 100644 --- a/src/mesa

[Mesa-dev] [PATCH 3/8] loader/dri3: Unify the style of function pointer calls in structs

2015-11-24 Thread Boyan Ding
Signed-off-by: Boyan Ding --- src/loader/loader_dri3_helper.c | 74 - 1 file changed, 37 insertions(+), 37 deletions(-) diff --git a/src/loader/loader_dri3_helper.c b/src/loader/loader_dri3_helper.c index 62bfe84..ca0f7a0 100644 --- a/src/loader

[Mesa-dev] [PATCH 1/8] egl/dri2: Unify the style of function pointer calls in structs

2015-11-24 Thread Boyan Ding
Signed-off-by: Boyan Ding --- src/egl/drivers/dri2/egl_dri2.c | 10 -- src/egl/drivers/dri2/platform_android.c | 8 src/egl/drivers/dri2/platform_drm.c | 14 +++--- src/egl/drivers/dri2/platform_wayland.c | 14 +++--- src/egl/drivers/dri2

[Mesa-dev] [PATCH 4/8] glX_proto_send.py: Unify the style of function pointer calls in structs

2015-11-24 Thread Boyan Ding
Signed-off-by: Boyan Ding --- src/mapi/glapi/gen/glX_proto_send.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mapi/glapi/gen/glX_proto_send.py b/src/mapi/glapi/gen/glX_proto_send.py index 2b33030..27e2d87 100644 --- a/src/mapi/glapi/gen/glX_proto_send.py +++ b/src

[Mesa-dev] [PATCH 6/8] radeon: Unify the style of function pointer calls in structs

2015-11-24 Thread Boyan Ding
Signed-off-by: Boyan Ding --- src/mesa/drivers/dri/radeon/radeon_common.c| 4 ++-- .../drivers/dri/radeon/radeon_common_context.c | 24 +++--- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/src/mesa/drivers/dri/radeon/radeon_common.c b/src/mesa

[Mesa-dev] [PATCH 2/8] glx: Unify the style of function pointer calls in structs

2015-11-24 Thread Boyan Ding
Signed-off-by: Boyan Ding --- src/glx/dri3_glx.c | 2 +- src/glx/dri_common.c | 4 ++-- src/glx/glxcmds.c| 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/glx/dri3_glx.c b/src/glx/dri3_glx.c index ee24312..8a4d893 100644 --- a/src/glx/dri3_glx.c +++ b/src/glx

[Mesa-dev] Unify the style of function pointer calls in structs

2015-11-24 Thread Boyan Ding
end the patch for it. I compile-tested the series and it builds okay. Boyan Ding [1] http://lists.freedesktop.org/archives/mesa-dev/2015-November/101007.html ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] [PATCH 0/7] DRI3 support for EGL (v4)

2015-11-17 Thread Boyan Ding
w), sequence: 2171, resource id: 108, > major code: 3 (GetWindowAttributes), minor code: 0 > > Thanks for testing and bug report, > Martin > > Hi, I do remember that Plasma 5 was running okay with compositing on when I was writing v2 of the patch series. Bu

[Mesa-dev] [PATCH v2 1/2] main: Don't restrict several KHR_debug enum to desktop GL

2015-11-08 Thread Boyan Ding
In preparation for supporting GL_KHR_debug in OpenGL ES v2: add a missing hunk in _mesa_IsEnabled (Emil) Signed-off-by: Boyan Ding Reviewed-by: Emil Velikov --- src/mesa/main/enable.c| 10 ++ src/mesa/main/getstring.c | 5 + 2 files changed, 3 insertions(+), 12 deletions

[Mesa-dev] [PATCH 1/2] main: Don't restrict several KHR_debug enum to desktop GL

2015-11-04 Thread Boyan Ding
In preparation for supporting GL_KHR_debug in OpenGL ES Signed-off-by: Boyan Ding --- src/mesa/main/enable.c| 5 + src/mesa/main/getstring.c | 5 + 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/src/mesa/main/enable.c b/src/mesa/main/enable.c index 42f6799..33000fd

[Mesa-dev] [RFC 2/2] Revert "Revert "mesa: enable KHR_debug for ES contexts""

2015-11-04 Thread Boyan Ding
This reverts commit bbf728f11b45121bf2d03b61bc0ffc69e0ff0836. Signed-off-by: Boyan Ding --- I wonder if there are still things left, but I think it is worth trying since GL_KHR_debug doesn't seem to be essentially different on GL and GLES. docs/relnotes/11.1.0.html | 1 + src/mesa

  1   2   >