[Mesa-dev] [PATCH v4 2/3] nir: Add a lowering pass for UYVY textures

2017-06-21 Thread Johnson Lin
Similar with support for YUYV but with byte order difference in sampler --- src/compiler/nir/nir.h | 1 + src/compiler/nir/nir_lower_tex.c | 18 ++ 2 files changed, 19 insertions(+) diff --git a/src/compiler/nir/nir.h b/src/compiler/nir/nir.h index ab7ba14303b7..1b4e470

[Mesa-dev] [PATCH v4 1/3] dri: Add UYVY as available format

2017-06-21 Thread Johnson Lin
UYVY is diffrent with YUYV in byte order. YUYV is already declared in dri_interface.h, this CL add the difinitions for UYVY. Drivers can add UYVY as supported format --- include/GL/internal/dri_interface.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/include/GL/internal/d

[Mesa-dev] [PATCH v4 3/3] i965/i915: Add UYVY as the supported format

2017-06-21 Thread Johnson Lin
Trigger the correct sampler options for it. Similar with YUYV --- src/intel/compiler/brw_compiler.h| 1 + src/intel/compiler/brw_nir.c | 1 + src/mesa/drivers/dri/i915/intel_screen.c | 21 - src/mesa/drivers/dri/i965/brw_wm.c | 7 +++ src/mesa/d

[Mesa-dev] [PATCH v3 1/3] dri: Add UYVY as available format

2017-06-20 Thread Johnson Lin
UYVY is diffrent with YUYV in byte order. YUYV is already declared in dri_interface.h, this CL add the difinitions for UYVY. Drivers can add UYVY as supported format --- include/GL/internal/dri_interface.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/include/GL/internal/d

[Mesa-dev] [PATCH v3 3/3] i965/i915: Add UYVY as the supported format

2017-06-20 Thread Johnson Lin
Trigger the correct sampler options for it. Similar with YUYV --- src/intel/compiler/brw_compiler.h| 1 + src/intel/compiler/brw_nir.c | 1 + src/mesa/drivers/dri/i915/intel_screen.c | 9 ++--- src/mesa/drivers/dri/i965/brw_wm.c | 7 +++ src/mesa/drivers/dri/i965/

[Mesa-dev] [PATCH v3 2/3] nir: Add a lowering pass for UYVY textures

2017-06-20 Thread Johnson Lin
Similar with support for YUYV but with byte order difference in sampler --- src/compiler/nir/nir.h | 1 + src/compiler/nir/nir_lower_tex.c | 18 ++ 2 files changed, 19 insertions(+) diff --git a/src/compiler/nir/nir.h b/src/compiler/nir/nir.h index ab7ba14303b7..1b4e470

[Mesa-dev] [PATCH v2 3/3] i965/i915: Add UYVY as the supported format

2017-06-19 Thread Johnson Lin
Trigger the correct sampler options for it. Similar with YUYV --- src/intel/compiler/brw_compiler.h| 1 + src/intel/compiler/brw_nir.c | 1 + src/mesa/drivers/dri/i915/intel_screen.c | 7 +-- src/mesa/drivers/dri/i965/brw_wm.c | 7 +++ src/mesa/drivers/dri/i965/in

[Mesa-dev] [PATCH v2 1/3] dri: Add UYVY as available format

2017-06-19 Thread Johnson Lin
UYVY is diffrent with YUYV in byte order. YUYV is already declared in dri_interface.h, this CL add the difinitions for UYVY. Drivers can add UYVY as supported format --- include/GL/internal/dri_interface.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/include/GL/internal/d

[Mesa-dev] [PATCH v2 2/3] nir: Add a lowering pass for UYVY textures

2017-06-19 Thread Johnson Lin
Similar with support for YUYV but with byte order difference in sampler --- src/compiler/nir/nir.h | 1 + src/compiler/nir/nir_lower_tex.c | 16 2 files changed, 17 insertions(+) diff --git a/src/compiler/nir/nir.h b/src/compiler/nir/nir.h index ab7ba14303b7..1b4e47058

[Mesa-dev] [PATCH v1 1/3] dri: Add UYVY as available format UYVY is diffrent with YUYV in byte order. YUYV is already declared in dri_interface.h, this CL add the difinitions for UYVY. Drivers can add

2017-06-15 Thread Johnson Lin
--- include/GL/internal/dri_interface.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/include/GL/internal/dri_interface.h b/include/GL/internal/dri_interface.h index fc2d4bbe22ef..6992da16d5f8 100644 --- a/include/GL/internal/dri_interface.h +++ b/include/GL/internal/dri_

[Mesa-dev] [PATCH v1 2/3] nir: Add a lowering pass for UYVY textures Similar with support for YUYV but with byte order difference in sampler

2017-06-15 Thread Johnson Lin
--- src/compiler/nir/nir.h | 1 + src/compiler/nir/nir_lower_tex.c | 16 2 files changed, 17 insertions(+) diff --git a/src/compiler/nir/nir.h b/src/compiler/nir/nir.h index ab7ba14303b7..1b4e47058d4d 100644 --- a/src/compiler/nir/nir.h +++ b/src/compiler/nir/nir.h @@

[Mesa-dev] [PATCH v1 3/3] i965/i915: Add UYVY as the supported format Trigger the correct sampler options for it. Similar with YUYV

2017-06-15 Thread Johnson Lin
--- src/intel/compiler/brw_compiler.h| 1 + src/intel/compiler/brw_nir.c | 1 + src/mesa/drivers/dri/i915/intel_screen.c | 7 +-- src/mesa/drivers/dri/i965/brw_wm.c | 7 +++ src/mesa/drivers/dri/i965/intel_screen.c | 7 +-- 5 files changed, 19 insertions(+), 4

[Mesa-dev] [PATCH] nir/lower_tex: Fix minor error in YUV color conversion matrix

2017-05-03 Thread Johnson Lin
The matrix used for YCbCr to RGB is listed in: https://en.wikipedia.org/wiki/YCbCr There was an error in converting the offsets from integers to unorm values: 0.0625=16/256 should be 16.0/255,and 0.5=128.0/256 should be 128.0/255. With this fix, the CSC result is bit aligned with wikipedia's con

[Mesa-dev] [PATCH] nir/lower_tex: Fix minor error in YUV color conversion matrix

2017-05-02 Thread Johnson Lin
The matrix used for YCbCr to RGB is listed in: https://en.wikipedia.org/wiki/YCbCr There was an error in converting the offsets from integers to unorm values: 0.0625=16/256 should be 16.0/255,and 0.5=128.0/256 should be 128.0/255. With this fix, the CSC result is bit aligned with wikipedia's con

[Mesa-dev] [PATCH] fix minor error in YUV2RGB matrix used in shader

2017-05-02 Thread Johnson Lin
The matrix used for YCbCr to RGB is listed in Wiki https://en.wikipedia.org/ wiki/YCbCr; There is minor error in the matrix constant: 0.0625=16/256 should be 16.0/255,and 0.5=128.0/256 should be 128.0/255. Note that conversion from a 0-255 byte number to 0-1.0 float is to divide by 255 instead of

[Mesa-dev] [PATCH] fix minor error in YUV2RGB matrix used in shader

2017-04-28 Thread Johnson Lin
The matrix used for YCbCr to RGB is listed in Wiki https://en.wikipedia.org/wiki/YCbCr; There is minor error in the matrix constant: 0.0625=16/256 should be 16.0/255, and 0.5=128.0/256 should be 128.0/255. Note that conversion from a 0-255 byte number to 0-1.0 float is to divide by 255 instead o

[Mesa-dev] [PATCH] fix minor error in YUV2RGB matrix used in shader

2017-04-28 Thread Johnson Lin
The matrix used for YCbCr to RGB is listed in Wiki https://en.wikipedia.org/wiki/YCbCr; There is minor error in the matrix constant: 0.0625=16/256 should be 16.0/255, and 0.5=128.0/256 should be 128.0/255. Note that conversion from a 0-255 byte number to 0-1.0 float is to divide by 255 instead o