intel/compiler: Set correct return format for brw_SAMPLE
on GFX8 onwards, we have only single bit to determine correct return format. v2: - Define macro and use it instead of hardcoded value. (Lionel) Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com> Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Reviewed-by: Francisco Jerez <currojerez@riseup.net> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11766>
This commit is contained in:
@@ -1301,6 +1301,9 @@ enum brw_message_target {
|
||||
#define BRW_SAMPLER_RETURN_FORMAT_UINT32 2
|
||||
#define BRW_SAMPLER_RETURN_FORMAT_SINT32 3
|
||||
|
||||
#define GFX8_SAMPLER_RETURN_FORMAT_32BITS 0
|
||||
#define GFX8_SAMPLER_RETURN_FORMAT_16BITS 1
|
||||
|
||||
#define BRW_SAMPLER_MESSAGE_SIMD8_SAMPLE 0
|
||||
#define BRW_SAMPLER_MESSAGE_SIMD16_SAMPLE 0
|
||||
#define BRW_SAMPLER_MESSAGE_SIMD16_SAMPLE_BIAS 0
|
||||
|
@@ -1063,6 +1063,9 @@ fs_generator::generate_get_buffer_size(fs_inst *inst,
|
||||
dst = vec16(dst);
|
||||
}
|
||||
|
||||
uint32_t return_format =
|
||||
devinfo->ver >= 8 ? GFX8_SAMPLER_RETURN_FORMAT_32BITS :
|
||||
BRW_SAMPLER_RETURN_FORMAT_SINT32;
|
||||
brw_SAMPLE(p,
|
||||
retype(dst, BRW_REGISTER_TYPE_UW),
|
||||
inst->base_mrf,
|
||||
@@ -1074,7 +1077,7 @@ fs_generator::generate_get_buffer_size(fs_inst *inst,
|
||||
inst->mlen,
|
||||
inst->header_size > 0,
|
||||
simd_mode,
|
||||
BRW_SAMPLER_RETURN_FORMAT_SINT32);
|
||||
return_format);
|
||||
}
|
||||
|
||||
void
|
||||
|
Reference in New Issue
Block a user