Re: [Mesa-dev] [PATCH v4 06/20] clover/device: Replace usage of "1 << PIPE_SHADER_IR_*" with supports_ir

2018-03-08 Thread Karol Herbst
Reviewed-by: Karol Herbst 

On Thu, Mar 8, 2018 at 1:21 AM, Pierre Moreau  wrote:
> Reviewed-by: Aaron Watry 
> Signed-off-by: Pierre Moreau 
> ---
>  src/gallium/state_trackers/clover/core/device.cpp | 6 +-
>  1 file changed, 1 insertion(+), 5 deletions(-)
>
> diff --git a/src/gallium/state_trackers/clover/core/device.cpp 
> b/src/gallium/state_trackers/clover/core/device.cpp
> index 62d5221bf8..bd67bab5bc 100644
> --- a/src/gallium/state_trackers/clover/core/device.cpp
> +++ b/src/gallium/state_trackers/clover/core/device.cpp
> @@ -244,11 +244,7 @@ device::vendor_name() const {
>
>  enum pipe_shader_ir
>  device::ir_format() const {
> -   int supported_irs =
> -  pipe->get_shader_param(pipe, PIPE_SHADER_COMPUTE,
> - PIPE_SHADER_CAP_SUPPORTED_IRS);
> -
> -   if (supported_irs & (1 << PIPE_SHADER_IR_NATIVE)) {
> +   if (supports_ir(PIPE_SHADER_IR_NATIVE)) {
>return PIPE_SHADER_IR_NATIVE;
> }
>
> --
> 2.16.2
>
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCH v4 06/20] clover/device: Replace usage of "1 << PIPE_SHADER_IR_*" with supports_ir

2018-03-07 Thread Pierre Moreau
Reviewed-by: Aaron Watry 
Signed-off-by: Pierre Moreau 
---
 src/gallium/state_trackers/clover/core/device.cpp | 6 +-
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/src/gallium/state_trackers/clover/core/device.cpp 
b/src/gallium/state_trackers/clover/core/device.cpp
index 62d5221bf8..bd67bab5bc 100644
--- a/src/gallium/state_trackers/clover/core/device.cpp
+++ b/src/gallium/state_trackers/clover/core/device.cpp
@@ -244,11 +244,7 @@ device::vendor_name() const {
 
 enum pipe_shader_ir
 device::ir_format() const {
-   int supported_irs =
-  pipe->get_shader_param(pipe, PIPE_SHADER_COMPUTE,
- PIPE_SHADER_CAP_SUPPORTED_IRS);
-
-   if (supported_irs & (1 << PIPE_SHADER_IR_NATIVE)) {
+   if (supports_ir(PIPE_SHADER_IR_NATIVE)) {
   return PIPE_SHADER_IR_NATIVE;
}
 
-- 
2.16.2

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev