i965: Guard GetBufferSubData's streaming memcpy load with USE_SSE41
authorKenneth Graunke <kenneth@whitecape.org>
Fri, 11 Aug 2017 04:10:31 +0000 (21:10 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Sat, 12 Aug 2017 08:42:32 +0000 (01:42 -0700)
This should hopefully fix build issues on 32-bit Android-x86.

v2: s/USE_SSE4_1/USE_SS41/, caught by Gražvydas Ignotas.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=102050
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
src/mesa/drivers/dri/i965/intel_buffer_objects.c

index ee59116828310172374181cffdbcbc6c60d30a30..658b1edf1c91ee0b79032b6af94a29eb942d7dcf 100644 (file)
@@ -342,6 +342,7 @@ brw_get_buffer_subdata(struct gl_context *ctx,
 
    unsigned int map_flags = MAP_READ;
    mem_copy_fn memcpy_fn = memcpy;
+#ifdef USE_SSE41
    if (!intel_obj->buffer->cache_coherent && cpu_has_sse4_1) {
       /* Rather than acquire a new WB mmaping of the buffer object and pull
        * it into the CPU cache, keep using the WC mmap that we have for writes,
@@ -350,6 +351,7 @@ brw_get_buffer_subdata(struct gl_context *ctx,
       map_flags |= MAP_COHERENT;
       memcpy_fn = (mem_copy_fn) _mesa_streaming_load_memcpy;
    }
+#endif
 
    void *map = brw_bo_map(brw, intel_obj->buffer, map_flags);
    if (unlikely(!map)) {