Skip to content
Commits on Source (24)
19.2.0-rc3
19.2.0-rc4
# warnings that are not useful
da5ebe30105f70e3520ce3ae145793b755552569
6b8cb087568699ca9a6e9e8b7bf49179e622b59f
# Jason doesn't want this applied to 19.2 (it's a revert)
d15fe8ca8262d502435c4f83985ac414f950bc5f
mesa (19.2.0~rc3-2) UNRELEASED; urgency=medium
mesa (19.2.0~rc4-1) experimental; urgency=medium
* New upstream release candidate.
* control: Bump libdrm-dev build-dep.
-- Timo Aaltonen <tjaalton@debian.org> Fri, 13 Sep 2019 12:34:51 +0300
-- Timo Aaltonen <tjaalton@debian.org> Thu, 19 Sep 2019 00:25:47 +0300
mesa (19.2.0~rc3-1) experimental; urgency=medium
......
......@@ -268,4 +268,6 @@ CHIPSET(0x731A, NAVI10)
CHIPSET(0x731B, NAVI10)
CHIPSET(0x731F, NAVI10)
CHIPSET(0x7360, NAVI12)
CHIPSET(0x7340, NAVI14)
......@@ -592,6 +592,7 @@ DRI_CONF_BEGIN
DRI_CONF_SECTION_PERFORMANCE
DRI_CONF_ADAPTIVE_SYNC("true")
DRI_CONF_VK_X11_OVERRIDE_MIN_IMAGE_COUNT(0)
DRI_CONF_VK_X11_STRICT_IMAGE_COUNT("false")
DRI_CONF_SECTION_END
DRI_CONF_END;
......@@ -600,7 +601,9 @@ static void radv_init_dri_options(struct radv_instance *instance)
driParseOptionInfo(&instance->available_dri_options, radv_dri_options_xml);
driParseConfigFiles(&instance->dri_options,
&instance->available_dri_options,
0, "radv", NULL);
0, "radv", NULL,
instance->engineName,
instance->engineVersion);
}
VkResult radv_CreateInstance(
......@@ -621,6 +624,13 @@ VkResult radv_CreateInstance(
client_version = VK_API_VERSION_1_0;
}
const char *engine_name = NULL;
uint32_t engine_version = 0;
if (pCreateInfo->pApplicationInfo) {
engine_name = pCreateInfo->pApplicationInfo->pEngineName;
engine_version = pCreateInfo->pApplicationInfo->engineVersion;
}
instance = vk_zalloc2(&default_alloc, pAllocator, sizeof(*instance), 8,
VK_SYSTEM_ALLOCATION_SCOPE_INSTANCE);
if (!instance)
......@@ -664,6 +674,10 @@ VkResult radv_CreateInstance(
return vk_error(instance, result);
}
instance->engineName = vk_strdup(&instance->alloc, engine_name,
VK_SYSTEM_ALLOCATION_SCOPE_INSTANCE);
instance->engineVersion = engine_version;
_mesa_locale_init();
glsl_type_singleton_init_or_ref();
......@@ -690,6 +704,8 @@ void radv_DestroyInstance(
radv_physical_device_finish(instance->physicalDevices + i);
}
vk_free(&instance->alloc, instance->engineName);
VG(VALGRIND_DESTROY_MEMPOOL(instance));
glsl_type_singleton_decref();
......
......@@ -754,7 +754,7 @@ static void allocate_user_sgprs(struct radv_shader_context *ctx,
if (ctx->shader_info->info.loads_push_constants)
user_sgpr_count++;
if (ctx->streamout_buffers)
if (ctx->shader_info->info.so.num_outputs)
user_sgpr_count++;
uint32_t available_sgprs = ctx->options->chip_class >= GFX9 && stage != MESA_SHADER_COMPUTE ? 32 : 16;
......@@ -4754,7 +4754,7 @@ ac_gs_copy_shader_emit(struct radv_shader_context *ctx)
LLVMBasicBlockRef bb;
unsigned offset;
if (!num_components)
if (stream > 0 && !num_components)
continue;
if (stream > 0 && !ctx->shader_info->info.so.num_outputs)
......
......@@ -329,6 +329,9 @@ struct radv_instance {
int physicalDeviceCount;
struct radv_physical_device physicalDevices[RADV_MAX_DRM_DEVICES];
char * engineName;
uint32_t engineVersion;
uint64_t debug_flags;
uint64_t perftest_flags;
......
......@@ -603,7 +603,8 @@ nir_link_uniform(struct gl_context *ctx,
state->num_shader_uniform_components += values;
state->num_values += values;
if (state->max_uniform_location < uniform->remap_location + entries)
if (uniform->remap_location != UNMAPPED_UNIFORM_LOC &&
state->max_uniform_location < uniform->remap_location + entries)
state->max_uniform_location = uniform->remap_location + entries;
return MAX2(uniform->array_elements, 1);
......
......@@ -647,6 +647,43 @@ get_iteration(nir_op cond_op, nir_const_value initial, nir_const_value step,
return iter_u64 > INT_MAX ? -1 : (int)iter_u64;
}
static bool
will_break_on_first_iteration(nir_const_value step,
nir_alu_type induction_base_type,
unsigned trip_offset,
nir_op cond_op, unsigned bit_size,
nir_const_value initial,
nir_const_value limit,
bool limit_rhs, bool invert_cond)
{
if (trip_offset == 1) {
nir_op add_op;
switch (induction_base_type) {
case nir_type_float:
add_op = nir_op_fadd;
break;
case nir_type_int:
case nir_type_uint:
add_op = nir_op_iadd;
break;
default:
unreachable("Unhandled induction variable base type!");
}
initial = eval_const_binop(add_op, bit_size, initial, step);
}
nir_const_value *src[2];
src[limit_rhs ? 0 : 1] = &initial;
src[limit_rhs ? 1 : 0] = &limit;
/* Evaluate the loop exit condition */
nir_const_value result;
nir_eval_const_opcode(cond_op, &result, 1, bit_size, src);
return invert_cond ? !result.b : result.b;
}
static bool
test_iterations(int32_t iter_int, nir_const_value step,
nir_const_value limit, nir_op cond_op, unsigned bit_size,
......@@ -741,6 +778,18 @@ calculate_iterations(nir_const_value initial, nir_const_value step,
assert(nir_src_bit_size(alu->src[0].src) ==
nir_src_bit_size(alu->src[1].src));
unsigned bit_size = nir_src_bit_size(alu->src[0].src);
/* get_iteration works under assumption that iterator will be
* incremented or decremented until it hits the limit,
* however if the loop condition is false on the first iteration
* get_iteration's assumption is broken. Handle such loops first.
*/
if (will_break_on_first_iteration(step, induction_base_type, trip_offset,
alu_op, bit_size, initial,
limit, limit_rhs, invert_cond)) {
return 0;
}
int iter_int = get_iteration(alu_op, initial, step, limit, bit_size);
/* If iter_int is negative the loop is ill-formed or is the conditional is
......
......@@ -318,7 +318,7 @@ nir_opt_large_constants(nir_shader *shader,
shader->constant_data = rzalloc_size(shader, shader->constant_data_size);
for (int i = 0; i < num_locals; i++) {
struct var_info *info = &var_infos[i];
if (!info->duplicate) {
if (!info->duplicate && info->is_constant) {
memcpy((char *)shader->constant_data + info->var->data.location,
info->constant_data, info->constant_data_size);
}
......
......@@ -220,7 +220,7 @@ ttn_translate_interp_mode(unsigned tgsi_interp)
case TGSI_INTERPOLATE_PERSPECTIVE:
return INTERP_MODE_SMOOTH;
case TGSI_INTERPOLATE_COLOR:
return INTERP_MODE_SMOOTH;
return INTERP_MODE_NONE;
default:
unreachable("bad TGSI interpolation mode");
}
......
......@@ -99,7 +99,7 @@ pipe_loader_load_options(struct pipe_loader_device *dev)
driParseOptionInfo(&dev->option_info, xml_options);
driParseConfigFiles(&dev->option_cache, &dev->option_info, 0,
dev->driver_name, NULL);
dev->driver_name, NULL, NULL, 0);
}
char *
......
......@@ -570,7 +570,7 @@ util_format_is_depth_and_stencil(enum pipe_format format)
/**
* For depth-stencil formats, return the equivalent depth-only format.
*/
static inline boolean
static inline enum pipe_format
util_format_get_depth_only(enum pipe_format format)
{
switch (format) {
......
......@@ -521,6 +521,7 @@ iris_destroy_screen(struct pipe_screen *pscreen)
u_transfer_helper_destroy(pscreen->transfer_helper);
iris_bufmgr_destroy(screen->bufmgr);
disk_cache_destroy(screen->disk_cache);
close(screen->fd);
ralloc_free(screen);
}
......
......@@ -2676,10 +2676,11 @@ iris_set_constant_buffer(struct pipe_context *ctx,
pipe_resource_reference(&cbuf->buffer, input->buffer);
cbuf->buffer_offset = input->buffer_offset;
}
cbuf->buffer_size =
MIN2(input->buffer_size,
iris_resource_bo(cbuf->buffer)->size - cbuf->buffer_offset);
}
struct iris_resource *res = (void *) cbuf->buffer;
res->bind_history |= PIPE_BIND_CONSTANT_BUFFER;
......@@ -6885,6 +6886,7 @@ genX(init_state)(struct iris_context *ice)
ice->state.sample_mask = 0xffff;
ice->state.num_viewports = 1;
ice->state.prim_mode = PIPE_PRIM_MAX;
ice->state.genx = calloc(1, sizeof(struct iris_genx_state));
/* Make a 1x1x1 null surface for unbound textures */
......
......@@ -71,7 +71,7 @@ files_lima = files(
)
lima_nir_algebraic_c = custom_target(
'ir/lima_nir_algebraic.c',
'lima_nir_algebraic.c',
input : 'ir/lima_nir_algebraic.py',
output : 'lima_nir_algebraic.c',
command : [
......
......@@ -33,6 +33,7 @@
void v3dX(bcl_epilogue)(struct v3d_context *v3d, struct v3d_job *job)
{
v3d_cl_ensure_space_with_branch(&job->bcl,
cl_packet_length(PRIMITIVE_COUNTS_FEEDBACK) +
#if V3D_VERSION >= 41
cl_packet_length(TRANSFORM_FEEDBACK_SPECS) +
#endif
......
......@@ -250,7 +250,8 @@ drm_create_adapter( int fd,
ctx->base.throttling = ctx->base.throttling_value > 0;
driParseOptionInfo(&defaultInitOptions, __driConfigOptionsNine);
driParseConfigFiles(&userInitOptions, &defaultInitOptions, 0, "nine", NULL);
driParseConfigFiles(&userInitOptions, &defaultInitOptions, 0,
"nine", NULL, NULL, 0);
if (driCheckOption(&userInitOptions, "throttle_value", DRI_INT)) {
throttling_value_user = driQueryOptioni(&userInitOptions, "throttle_value");
if (throttling_value_user == -1)
......
......@@ -1910,6 +1910,17 @@ fs_visitor::split_virtual_grfs()
}
foreach_block_and_inst(block, fs_inst, inst, cfg) {
/* We fix up undef instructions later */
if (inst->opcode == SHADER_OPCODE_UNDEF) {
/* UNDEF instructions are currently only used to undef entire
* registers. We need this invariant later when we split them.
*/
assert(inst->dst.file == VGRF);
assert(inst->dst.offset == 0);
assert(inst->size_written == alloc.sizes[inst->dst.nr] * REG_SIZE);
continue;
}
if (inst->dst.file == VGRF) {
int reg = vgrf_to_reg[inst->dst.nr] + inst->dst.offset / REG_SIZE;
for (unsigned j = 1; j < regs_written(inst); j++)
......@@ -1962,7 +1973,20 @@ fs_visitor::split_virtual_grfs()
}
assert(reg == reg_count);
foreach_block_and_inst(block, fs_inst, inst, cfg) {
foreach_block_and_inst_safe(block, fs_inst, inst, cfg) {
if (inst->opcode == SHADER_OPCODE_UNDEF) {
const fs_builder ibld(this, block, inst);
assert(inst->size_written % REG_SIZE == 0);
unsigned reg_offset = 0;
while (reg_offset < inst->size_written / REG_SIZE) {
reg = vgrf_to_reg[inst->dst.nr] + reg_offset;
ibld.UNDEF(fs_reg(VGRF, new_virtual_grf[reg], inst->dst.type));
reg_offset += alloc.sizes[new_virtual_grf[reg]];
}
inst->remove(block);
continue;
}
if (inst->dst.file == VGRF) {
reg = vgrf_to_reg[inst->dst.nr] + inst->dst.offset / REG_SIZE;
inst->dst.nr = new_virtual_grf[reg];
......
......@@ -52,6 +52,7 @@ static const char anv_dri_options_xml[] =
DRI_CONF_BEGIN
DRI_CONF_SECTION_PERFORMANCE
DRI_CONF_VK_X11_OVERRIDE_MIN_IMAGE_COUNT(0)
DRI_CONF_VK_X11_STRICT_IMAGE_COUNT("false")
DRI_CONF_SECTION_END
DRI_CONF_END;
......@@ -778,7 +779,9 @@ VkResult anv_CreateInstance(
driParseOptionInfo(&instance->available_dri_options, anv_dri_options_xml);
driParseConfigFiles(&instance->dri_options, &instance->available_dri_options,
0, "anv", NULL);
0, "anv", NULL,
instance->app_info.engine_name,
instance->app_info.engine_version);
*pInstance = anv_instance_to_handle(instance);
......