[Mesa-stable] Request for more information for stable-branch patches
Stellard, Thomas
Tom.Stellard at amd.com
Tue Jul 30 12:52:13 PDT 2013
Hi Carl,
These patches are meant for the 9.2 branch. Versions of these were on the list for a few weeks prior to the 9.2 branch, but were not committed to master in time. They should apply cleanly to the 9.2 branch, if not let me know.
-Tom
________________________________________
From: Carl Worth [cworth at cworth.org]
Sent: Tuesday, July 30, 2013 12:32 PM
To: Stellard, Thomas; Francisco Jerez
Cc: mesa-stable at lists.freedesktop.org
Subject: Request for more information for stable-branch patches
Hi Tom and Francisco,
I'm currently in the process of reviewing the following patches as
candidates for the 9.1 stable branch of Mesa:
4e90bc9a12bea93c6b5522abe8151a8cfe1d6d1d gallium: Add PIPE_CAP_ENDIANNESS
8c9d3c62f60a2819948bdfb005600cdc10aa2547 clover: Return correct value for CL_DEVICE_ENDIAN_LITTLE
a3dcab43c6b6fed2f35aa0e802be6398985f100c clover: Pass corresponding module::argument to kernel::argument::bind().
2265b40e377cc2c9d1091498df2aede5df2ff684 clover: Add kernel argument fields to allow differing host/target data types.
829caf410e2c2c6f79902199da5a7900abc16129 clover: Byte-swap kernel arguments when host and device endianness differ.
f64c0ca692d3e8c78dd9ae1f015f58f1dfc1c760 clover: Extend kernel arguments for differing host and device data types.
df530829f757a8968389427eb26f45a0d46623fa clover: Respect kernel argument alignment restrictions.
The first of these patches, (reproduced below), does not apply cleanly
to the 9.1 branch. And it appears to me that most or all of the
remaining patches depend on this first one.
Could either of you prepare a backported version of this first patch for
the 9.1 branch?
Additionally, of the remaining patches, very few have any explanation of
the change in the commit message, (beyond the one-line summary). This
makes it hard for me to determine whether the patches are suitable for
the stable branch.
Here are some examples of the things I see in patches which are
obviously good candidates for the stable branch:
* A description of what the change is doing and why, so that I can
determine it meets stable-branch criteria.
* A mention of the user-visible impact of the change
* A link to a bugzilla entry (if any)
None of that needs to be very long, but some of it needs to be present
for me to make a decision on whether to include the patches.
Thanks,
-Carl
commit 4e90bc9a12bea93c6b5522abe8151a8cfe1d6d1d
Author: Tom Stellard <thomas.stellard at amd.com>
Date: Tue Jul 9 21:21:39 2013 -0700
gallium: Add PIPE_CAP_ENDIANNESS
Cc: mesa-stable at lists.freedesktop.org
[ Francisco Jerez: Fix "PIPE_ENDIAN_SMALL" in the documentation,
define PIPE_ENDIAN_NATIVE. ]
diff --git a/src/gallium/docs/source/screen.rst b/src/gallium/docs/source/screen.rst
index 683080c..60c9af1 100644
--- a/src/gallium/docs/source/screen.rst
+++ b/src/gallium/docs/source/screen.rst
@@ -168,6 +168,8 @@ The integer capabilities:
since they are linked) a driver can support. Returning 0 is equivalent
to returning 1 because every driver has to support at least a single
viewport/scissor combination.
+* ''PIPE_CAP_ENDIANNESS``:: The endianness of the device. Either
+ PIPE_ENDIAN_BIG or PIPE_ENDIAN_LITTLE.
.. _pipe_capf:
diff --git a/src/gallium/drivers/freedreno/freedreno_screen.c b/src/gallium/drivers/freedreno/freedreno_screen.c
index ff45b3e..52d51c2 100644
--- a/src/gallium/drivers/freedreno/freedreno_screen.c
+++ b/src/gallium/drivers/freedreno/freedreno_screen.c
@@ -227,6 +227,9 @@ fd_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
case PIPE_CAP_MAX_TEXEL_OFFSET:
return 7;
+ case PIPE_CAP_ENDIANNESS:
+ return PIPE_ENDIAN_LITTLE;
+
default:
DBG("unknown param %d", param);
return 0;
diff --git a/src/gallium/drivers/i915/i915_screen.c b/src/gallium/drivers/i915/i915_screen.c
index 3c751c5..556dda8 100644
--- a/src/gallium/drivers/i915/i915_screen.c
+++ b/src/gallium/drivers/i915/i915_screen.c
@@ -263,6 +263,8 @@ i915_get_param(struct pipe_screen *screen, enum pipe_cap cap)
case PIPE_CAP_TGSI_FS_COORD_ORIGIN_LOWER_LEFT:
case PIPE_CAP_TGSI_FS_COORD_PIXEL_CENTER_INTEGER:
return 0;
+ case PIPE_CAP_ENDIANNESS:
+ return PIPE_ENDIAN_LITTLE;
default:
debug_printf("%s: Unknown cap %u.\n", __FUNCTION__, cap);
diff --git a/src/gallium/drivers/ilo/ilo_screen.c b/src/gallium/drivers/ilo/ilo_screen.c
index 75fee90..e8262bc 100644
--- a/src/gallium/drivers/ilo/ilo_screen.c
+++ b/src/gallium/drivers/ilo/ilo_screen.c
@@ -421,6 +421,8 @@ ilo_get_param(struct pipe_screen *screen, enum pipe_cap param)
return 1 << 27;
case PIPE_CAP_MAX_VIEWPORTS:
return ILO_MAX_VIEWPORTS;
+ case PIPE_CAP_ENDIANNESS:
+ return PIPE_ENDIAN_LITTLE;
default:
return 0;
diff --git a/src/gallium/drivers/llvmpipe/lp_screen.c b/src/gallium/drivers/llvmpipe/lp_screen.c
index 26aac32..b3cd77f 100644
--- a/src/gallium/drivers/llvmpipe/lp_screen.c
+++ b/src/gallium/drivers/llvmpipe/lp_screen.c
@@ -231,6 +231,8 @@ llvmpipe_get_param(struct pipe_screen *screen, enum pipe_cap param)
return 0;
case PIPE_CAP_MAX_VIEWPORTS:
return PIPE_MAX_VIEWPORTS;
+ case PIPE_CAP_ENDIANNESS:
+ return PIPE_ENDIAN_NATIVE;
}
/* should only get here on unhandled cases */
debug_printf("Unexpected PIPE_CAP %d query\n", param);
diff --git a/src/gallium/drivers/nv30/nv30_screen.c b/src/gallium/drivers/nv30/nv30_screen.c
index 07ffc80..3d55d6f 100644
--- a/src/gallium/drivers/nv30/nv30_screen.c
+++ b/src/gallium/drivers/nv30/nv30_screen.c
@@ -130,6 +130,8 @@ nv30_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
case PIPE_CAP_VERTEX_ELEMENT_SRC_OFFSET_4BYTE_ALIGNED_ONLY:
case PIPE_CAP_PREFER_BLIT_BASED_TEXTURE_TRANSFER:
return 1;
+ case PIPE_CAP_ENDIANNESS:
+ return PIPE_ENDIAN_LITTLE;
default:
debug_printf("unknown param %d\n", param);
return 0;
diff --git a/src/gallium/drivers/nv50/nv50_screen.c b/src/gallium/drivers/nv50/nv50_screen.c
index 2ed85d6..2951eb4 100644
--- a/src/gallium/drivers/nv50/nv50_screen.c
+++ b/src/gallium/drivers/nv50/nv50_screen.c
@@ -189,6 +189,8 @@ nv50_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
return 0;
case PIPE_CAP_TEXTURE_BORDER_COLOR_QUIRK:
return PIPE_QUIRK_TEXTURE_BORDER_COLOR_SWIZZLE_NV50;
+ case PIPE_CAP_ENDIANNESS:
+ return PIPE_ENDIAN_LITTLE;
default:
NOUVEAU_ERR("unknown PIPE_CAP %d\n", param);
return 0;
diff --git a/src/gallium/drivers/nvc0/nvc0_screen.c b/src/gallium/drivers/nvc0/nvc0_screen.c
index b5abee3..201d12f 100644
--- a/src/gallium/drivers/nvc0/nvc0_screen.c
+++ b/src/gallium/drivers/nvc0/nvc0_screen.c
@@ -179,6 +179,8 @@ nvc0_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
return 1;
case PIPE_CAP_TEXTURE_BORDER_COLOR_QUIRK:
return PIPE_QUIRK_TEXTURE_BORDER_COLOR_SWIZZLE_NV50;
+ case PIPE_CAP_ENDIANNESS:
+ return PIPE_ENDIAN_LITTLE;
default:
NOUVEAU_ERR("unknown PIPE_CAP %d\n", param);
return 0;
diff --git a/src/gallium/drivers/r300/r300_screen.c b/src/gallium/drivers/r300/r300_screen.c
index 9c5d5f2..8d7ffa9 100644
--- a/src/gallium/drivers/r300/r300_screen.c
+++ b/src/gallium/drivers/r300/r300_screen.c
@@ -190,6 +190,8 @@ static int r300_get_param(struct pipe_screen* pscreen, enum pipe_cap param)
/* Render targets. */
case PIPE_CAP_MAX_RENDER_TARGETS:
return 4;
+ case PIPE_CAP_ENDIANNESS:
+ return PIPE_ENDIAN_LITTLE;
}
return 0;
}
diff --git a/src/gallium/drivers/r600/r600_pipe.c b/src/gallium/drivers/r600/r600_pipe.c
index 49abf50..74dd960 100644
--- a/src/gallium/drivers/r600/r600_pipe.c
+++ b/src/gallium/drivers/r600/r600_pipe.c
@@ -679,6 +679,8 @@ static int r600_get_param(struct pipe_screen* pscreen, enum pipe_cap param)
case PIPE_CAP_TEXTURE_BORDER_COLOR_QUIRK:
return PIPE_QUIRK_TEXTURE_BORDER_COLOR_SWIZZLE_R600;
+ case PIPE_CAP_ENDIANNESS:
+ return PIPE_ENDIAN_LITTLE;
}
return 0;
}
diff --git a/src/gallium/drivers/radeonsi/radeonsi_pipe.c b/src/gallium/drivers/radeonsi/radeonsi_pipe.c
index 463cc72..69b9ca9 100644
--- a/src/gallium/drivers/radeonsi/radeonsi_pipe.c
+++ b/src/gallium/drivers/radeonsi/radeonsi_pipe.c
@@ -440,6 +440,8 @@ static int r600_get_param(struct pipe_screen* pscreen, enum pipe_cap param)
case PIPE_CAP_MAX_TEXEL_OFFSET:
return 7;
+ case PIPE_CAP_ENDIANNESS:
+ return PIPE_ENDIAN_LITTLE;
}
return 0;
}
diff --git a/src/gallium/drivers/softpipe/sp_screen.c b/src/gallium/drivers/softpipe/sp_screen.c
index 2abfe89..f6acdc8 100644
--- a/src/gallium/drivers/softpipe/sp_screen.c
+++ b/src/gallium/drivers/softpipe/sp_screen.c
@@ -183,6 +183,8 @@ softpipe_get_param(struct pipe_screen *screen, enum pipe_cap param)
return 0;
case PIPE_CAP_MAX_VIEWPORTS:
return 1;
+ case PIPE_CAP_ENDIANNESS:
+ return PIPE_ENDIAN_NATIVE;
}
/* should only get here on unhandled cases */
debug_printf("Unexpected PIPE_CAP %d query\n", param);
diff --git a/src/gallium/drivers/svga/svga_screen.c b/src/gallium/drivers/svga/svga_screen.c
index 7bf6285..40b35cc 100644
--- a/src/gallium/drivers/svga/svga_screen.c
+++ b/src/gallium/drivers/svga/svga_screen.c
@@ -270,6 +270,8 @@ svga_get_param(struct pipe_screen *screen, enum pipe_cap param)
return 1;
case PIPE_CAP_MAX_VIEWPORTS:
return 1;
+ case PIPE_CAP_ENDIANNESS:
+ return PIPE_ENDIAN_LITTLE;
}
debug_printf("Unexpected PIPE_CAP_ query %u\n", param);
diff --git a/src/gallium/include/pipe/p_defines.h b/src/gallium/include/pipe/p_defines.h
index 9feaef8..fb42cdf 100644
--- a/src/gallium/include/pipe/p_defines.h
+++ b/src/gallium/include/pipe/p_defines.h
@@ -507,12 +507,22 @@ enum pipe_cap {
PIPE_CAP_QUERY_PIPELINE_STATISTICS = 81,
PIPE_CAP_TEXTURE_BORDER_COLOR_QUIRK = 82,
PIPE_CAP_MAX_TEXTURE_BUFFER_SIZE = 83,
- PIPE_CAP_MAX_VIEWPORTS = 84
+ PIPE_CAP_MAX_VIEWPORTS = 84,
+ PIPE_CAP_ENDIANNESS = 85
};
#define PIPE_QUIRK_TEXTURE_BORDER_COLOR_SWIZZLE_NV50 (1 << 0)
#define PIPE_QUIRK_TEXTURE_BORDER_COLOR_SWIZZLE_R600 (1 << 1)
+enum pipe_endian {
+ PIPE_ENDIAN_LITTLE = 0,
+ PIPE_ENDIAN_BIG = 1,
+#if defined(PIPE_ARCH_LITTLE_ENDIAN)
+ PIPE_ENDIAN_NATIVE = PIPE_ENDIAN_LITTLE
+#elif defined(PIPE_ARCH_BIG_ENDIAN)
+ PIPE_ENDIAN_NATIVE = PIPE_ENDIAN_BIG
+#endif
+};
/**
* Implementation limits which are queried through
More information about the mesa-stable
mailing list