[Mesa-dev] [PATCH v3 1/2] clover: fix sampler argument type detection
Francisco Jerez
currojerez at riseup.net
Mon Dec 12 00:44:57 UTC 2016
Serge Martin <edb+mesa at sigluy.net> writes:
> ---
> src/gallium/state_trackers/clover/llvm/codegen/common.cpp | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/src/gallium/state_trackers/clover/llvm/codegen/common.cpp b/src/gallium/state_trackers/clover/llvm/codegen/common.cpp
> index 13ccd59..aa6ca50 100644
> --- a/src/gallium/state_trackers/clover/llvm/codegen/common.cpp
> +++ b/src/gallium/state_trackers/clover/llvm/codegen/common.cpp
> @@ -118,6 +118,11 @@ namespace {
> module::argument::zero_ext,
> module::argument::image_format);
>
> + } else if (type_name == "sampler_t") {
> + args.emplace_back(module::argument::sampler, arg_api_size,
> + target_size, target_align,
> + module::argument::zero_ext);
> +
Change looks reasonable, but, do you expect this to write anything into
the kernel's input buffer? Currently it won't (see the implementation
of sampler_argument::bind in core/kernel.cpp). If you didn't expect it
to, you should probably pass zero instead of 'target_size' and
'target_align' for consistency. If you did, you'll need to fix
core/kernel.cpp in addition.
> } else {
> // Other types.
> const auto actual_type =
> --
> 2.5.5
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 212 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20161211/c558a515/attachment.sig>
More information about the mesa-dev
mailing list