Compare commits
43 Commits
mesa-21.3.
...
mesa-21.3.
Author | SHA1 | Date | |
---|---|---|---|
|
112de3a07a | ||
|
7c4f2f1eb8 | ||
|
371727f3a7 | ||
|
ea7aac8a3a | ||
|
a6887c3c4f | ||
|
9c98620378 | ||
|
935e5fce5e | ||
|
12beba1f71 | ||
|
102b83d77d | ||
|
36bc6e18a2 | ||
|
fbd47b9d43 | ||
|
b5ff627603 | ||
|
f15d2c8d3a | ||
|
2143a663da | ||
|
83011a9226 | ||
|
f85939fa86 | ||
|
823a047198 | ||
|
ec6eaf7adf | ||
|
2c51e96672 | ||
|
107c8232e0 | ||
|
089a957bef | ||
|
ec2e78b3ff | ||
|
f7a52a16cf | ||
|
85c655f946 | ||
|
44bfdb08fb | ||
|
7a579039cc | ||
|
c7684b11e2 | ||
|
448da15129 | ||
|
b4fb2974de | ||
|
d3226c6e95 | ||
|
e91c5034a7 | ||
|
d0e7882abd | ||
|
bb025625e1 | ||
|
fc8bc2d307 | ||
|
709fd542be | ||
|
bd8a5ae4d8 | ||
|
48174fea16 | ||
|
f36373e072 | ||
|
d9b0864420 | ||
|
834af3f195 | ||
|
74cb10a290 | ||
|
fc3c71437e | ||
|
b2ec8bd740 |
5238
.pick_status.json
5238
.pick_status.json
File diff suppressed because it is too large
Load Diff
143
docs/relnotes/21.3.5.rst
Normal file
143
docs/relnotes/21.3.5.rst
Normal file
@@ -0,0 +1,143 @@
|
||||
Mesa 21.3.5 Release Notes / 2022-01-26
|
||||
======================================
|
||||
|
||||
Mesa 21.3.5 is a bug fix release which fixes bugs found since the 21.3.4 release.
|
||||
|
||||
Mesa 21.3.5 implements the OpenGL 4.6 API, but the version reported by
|
||||
glGetString(GL_VERSION) or glGetIntegerv(GL_MAJOR_VERSION) /
|
||||
glGetIntegerv(GL_MINOR_VERSION) depends on the particular driver being used.
|
||||
Some drivers don't support all the features required in OpenGL 4.6. OpenGL
|
||||
4.6 is **only** available if requested at context creation.
|
||||
Compatibility contexts may report a lower version depending on each driver.
|
||||
|
||||
Mesa 21.3.5 implements the Vulkan 1.2 API, but the version reported by
|
||||
the apiVersion property of the VkPhysicalDeviceProperties struct
|
||||
depends on the particular driver being used.
|
||||
|
||||
SHA256 checksum
|
||||
---------------
|
||||
|
||||
::
|
||||
|
||||
TBD.
|
||||
|
||||
|
||||
New features
|
||||
------------
|
||||
|
||||
- None
|
||||
|
||||
|
||||
Bug fixes
|
||||
---------
|
||||
|
||||
- glGetActiveUniform failing with GL_INVALID_VALUE for no reason
|
||||
- CopelliaSim crashes on adding vision sensor to a scene on Ubuntu 20+, runs fine on Ubuntu 18.04
|
||||
- Dirt Rally: Flickering glitches on certain foliage going from Mesa 21.2.5 to 21.3.0
|
||||
- FrontFacing input is broken on Intel/Vulkan
|
||||
- llvmpipe: Unimplemented get_driver_uuid/get_device_uuid causes segfaults in e.g. Wine
|
||||
|
||||
|
||||
Changes
|
||||
-------
|
||||
|
||||
Alejandro Piñeiro (1):
|
||||
|
||||
- vulkan: return default string for undefined enum
|
||||
|
||||
Alyssa Rosenzweig (3):
|
||||
|
||||
- pan/bi: Schedule around blend shader register clobbering
|
||||
- panfrost: Use u_reduced_prim for primitive checks
|
||||
- panfrost: Only cull polygons
|
||||
|
||||
Bas Nieuwenhuizen (1):
|
||||
|
||||
- util/fossilize_db: Fix double free in error handling.
|
||||
|
||||
Carsten Haitzler (1):
|
||||
|
||||
- panfrost: Don't double-free when handling error for unsupported GPU
|
||||
|
||||
Charles Baker (1):
|
||||
|
||||
- zink: Output PackHalf2x16 to uint not float
|
||||
|
||||
Emma Anholt (1):
|
||||
|
||||
- softpipe: respect !independent_blend_enable for color masks.
|
||||
|
||||
Eric Engestrom (4):
|
||||
|
||||
- .pick_status.json: Update to 06504fb9e2382e43b889fd6ca642bb785b544d4d
|
||||
- .pick_status.json: Mark 1b88777e97f635612c560a2f00d349ea271581b1 as denominated
|
||||
- .pick_status.json: Mark d1530a3f3b1625baa42e84cba9844b6eb4ac76ce as denominated
|
||||
- .pick_status.json: Mark 58a843ab14e0eecf044a35154da72cdf7ab6f15a as denominated
|
||||
|
||||
Ian Romanick (1):
|
||||
|
||||
- intel/fs: Fix gl_FrontFacing optimization on Gfx12+
|
||||
|
||||
Kenneth Graunke (1):
|
||||
|
||||
- iris: Fix and refactor check for clear color being fully zero
|
||||
|
||||
Lepton Wu (1):
|
||||
|
||||
- driconf: Fix unhandled tags in static conf
|
||||
|
||||
Lionel Landwerlin (2):
|
||||
|
||||
- intel/fs: disable VRS when omask is written
|
||||
- anv: fix missing descriptor copy of bufferview/surfacestate content
|
||||
|
||||
Mike Blumenkrantz (10):
|
||||
|
||||
- zink: always set number of timestamp results to 1 for internal qbo
|
||||
- zink: fix availability buffer sizing/copying for xfb queries
|
||||
- zink: skip readback of qbos with no results
|
||||
- Revert "zink: when performing an implicit reset, sync qbos"
|
||||
- zink: use even more accurate stride values for query result copies
|
||||
- aux/trace: copy over stream_output_target_offset method from context
|
||||
- util/vbuf: fix buffer translation sizing
|
||||
- zink: remove SpvMemorySemanticsMakeVisibleMask from nir_intrinsic_memory_barrier
|
||||
- zink: check EXT_image_drm_format_modifier for dmabuf support
|
||||
- zink: stop allocating such massive staging regions for buffer maps
|
||||
|
||||
Pavel Ondračka (1):
|
||||
|
||||
- r300: properly initialize new_vs in r300_draw_init_vertex_shader
|
||||
|
||||
Pierre-Eric Pelloux-Prayer (2):
|
||||
|
||||
- driconf: enable vs_position_always_invariant for Dirt Rally
|
||||
- mesa: use less temporaries in build_lighting
|
||||
|
||||
Qiang Yu (1):
|
||||
|
||||
- nir: fix nir_tex_instr hash not count is_sparse field
|
||||
|
||||
Rhys Perry (1):
|
||||
|
||||
- nir/unsigned_upper_bound: don't follow 64-bit f2u32()
|
||||
|
||||
Rob Clark (5):
|
||||
|
||||
- mesa/st: Lowered ucp should still mark rast state dirty
|
||||
- freedreno: Pass shader cache key instead of shader key
|
||||
- freedreno: Add FD_DIRTY_RASTERIZER_CLIP_PLANE_ENABLE
|
||||
- freedreno/a6xx: Fix clip_mask
|
||||
- freedreno/a5xx: Fix clip_mask
|
||||
|
||||
Stefan Brüns (1):
|
||||
|
||||
- llvmpipe: Add get_{driver,device}_uuid implementations
|
||||
|
||||
Tapani Pälli (2):
|
||||
|
||||
- mesa: refactor GetProgramiv to use program resource list
|
||||
- mesa: move GetProgramInterfaceiv as a shader_query function
|
||||
|
||||
Yiwei Zhang (1):
|
||||
|
||||
- venus: VkExternalImageFormatProperties is optional
|
@@ -272,6 +272,7 @@ hash_tex(uint32_t hash, const nir_tex_instr *instr)
|
||||
hash = HASH(hash, instr->is_array);
|
||||
hash = HASH(hash, instr->is_shadow);
|
||||
hash = HASH(hash, instr->is_new_style_shadow);
|
||||
hash = HASH(hash, instr->is_sparse);
|
||||
unsigned component = instr->component;
|
||||
hash = HASH(hash, component);
|
||||
for (unsigned i = 0; i < 4; ++i)
|
||||
|
@@ -1465,7 +1465,6 @@ nir_unsigned_upper_bound(nir_shader *shader, struct hash_table *range_ht,
|
||||
case nir_op_b32csel:
|
||||
case nir_op_ubfe:
|
||||
case nir_op_bfm:
|
||||
case nir_op_f2u32:
|
||||
case nir_op_fmul:
|
||||
case nir_op_extract_u8:
|
||||
case nir_op_extract_i8:
|
||||
@@ -1476,6 +1475,7 @@ nir_unsigned_upper_bound(nir_shader *shader, struct hash_table *range_ht,
|
||||
case nir_op_u2u8:
|
||||
case nir_op_u2u16:
|
||||
case nir_op_u2u32:
|
||||
case nir_op_f2u32:
|
||||
if (nir_ssa_scalar_chase_alu_src(scalar, 0).def->bit_size > 32) {
|
||||
/* If src is >32 bits, return max */
|
||||
return max;
|
||||
|
@@ -2271,6 +2271,8 @@ trace_context_create(struct trace_screen *tr_scr,
|
||||
TR_CTX_INIT(create_stream_output_target);
|
||||
TR_CTX_INIT(stream_output_target_destroy);
|
||||
TR_CTX_INIT(set_stream_output_targets);
|
||||
/* this is lavapipe-only and can't be traced */
|
||||
tr_ctx->base.stream_output_target_offset = pipe->stream_output_target_offset;
|
||||
TR_CTX_INIT(resource_copy_region);
|
||||
TR_CTX_INIT(blit);
|
||||
TR_CTX_INIT(flush_resource);
|
||||
|
@@ -491,9 +491,10 @@ u_vbuf_translate_buffers(struct u_vbuf *mgr, struct translate_key *key,
|
||||
* themselves, meaning that if stride < element_size, the mapped size will
|
||||
* be too small and conversion will overrun the map buffer
|
||||
*
|
||||
* instead, add the size of the largest possible attribute to ensure the map is large enough
|
||||
* instead, add the size of the largest possible attribute to the final attribute's offset
|
||||
* in order to ensure the map is large enough
|
||||
*/
|
||||
unsigned last_offset = offset + size - vb->stride;
|
||||
unsigned last_offset = size - vb->stride;
|
||||
size = MAX2(size, last_offset + sizeof(double)*4);
|
||||
}
|
||||
|
||||
|
@@ -454,7 +454,7 @@ fd3_program_create(void *data, struct ir3_shader_variant *bs,
|
||||
struct ir3_shader_variant *vs, struct ir3_shader_variant *hs,
|
||||
struct ir3_shader_variant *ds, struct ir3_shader_variant *gs,
|
||||
struct ir3_shader_variant *fs,
|
||||
const struct ir3_shader_key *key) in_dt
|
||||
const struct ir3_cache_key *key) in_dt
|
||||
{
|
||||
struct fd_context *ctx = fd_context(data);
|
||||
struct fd3_program_state *state = CALLOC_STRUCT(fd3_program_state);
|
||||
|
@@ -560,7 +560,7 @@ fd4_program_create(void *data, struct ir3_shader_variant *bs,
|
||||
struct ir3_shader_variant *vs, struct ir3_shader_variant *hs,
|
||||
struct ir3_shader_variant *ds, struct ir3_shader_variant *gs,
|
||||
struct ir3_shader_variant *fs,
|
||||
const struct ir3_shader_key *key) in_dt
|
||||
const struct ir3_cache_key *key) in_dt
|
||||
{
|
||||
struct fd_context *ctx = fd_context(data);
|
||||
struct fd4_program_state *state = CALLOC_STRUCT(fd4_program_state);
|
||||
|
@@ -91,6 +91,7 @@ fd5_draw_vbo(struct fd_context *ctx, const struct pipe_draw_info *info,
|
||||
.vastc_srgb = fd5_ctx->vastc_srgb,
|
||||
.fastc_srgb = fd5_ctx->fastc_srgb,
|
||||
},
|
||||
.clip_plane_enable = ctx->rasterizer->clip_plane_enable,
|
||||
},
|
||||
.rasterflat = ctx->rasterizer->flatshade,
|
||||
.sprite_coord_enable = ctx->rasterizer->sprite_coord_enable,
|
||||
|
@@ -658,7 +658,7 @@ fd5_emit_state(struct fd_context *ctx, struct fd_ringbuffer *ring,
|
||||
OUT_RING(ring, A5XX_GRAS_CL_VPORT_ZSCALE_0(ctx->viewport.scale[2]));
|
||||
}
|
||||
|
||||
if (dirty & FD_DIRTY_PROG)
|
||||
if (dirty & (FD_DIRTY_PROG | FD_DIRTY_RASTERIZER_CLIP_PLANE_ENABLE))
|
||||
fd5_program_emit(ctx, ring, emit);
|
||||
|
||||
if (dirty & FD_DIRTY_RASTERIZER) {
|
||||
|
@@ -250,9 +250,12 @@ fd5_program_emit(struct fd_context *ctx, struct fd_ringbuffer *ring,
|
||||
setup_stages(emit, s);
|
||||
|
||||
bool do_streamout = (s[VS].v->shader->stream_output.num_outputs > 0);
|
||||
uint8_t clip_mask = s[VS].v->clip_mask, cull_mask = s[VS].v->cull_mask;
|
||||
uint8_t clip_mask = s[VS].v->clip_mask,
|
||||
cull_mask = s[VS].v->cull_mask;
|
||||
uint8_t clip_cull_mask = clip_mask | cull_mask;
|
||||
|
||||
clip_mask &= ctx->rasterizer->clip_plane_enable;
|
||||
|
||||
fssz = (s[FS].i->double_threadsize) ? FOUR_QUADS : TWO_QUADS;
|
||||
|
||||
pos_regid = ir3_find_output_regid(s[VS].v, VARYING_SLOT_POS);
|
||||
@@ -711,7 +714,7 @@ fd5_program_create(void *data, struct ir3_shader_variant *bs,
|
||||
struct ir3_shader_variant *vs, struct ir3_shader_variant *hs,
|
||||
struct ir3_shader_variant *ds, struct ir3_shader_variant *gs,
|
||||
struct ir3_shader_variant *fs,
|
||||
const struct ir3_shader_key *key) in_dt
|
||||
const struct ir3_cache_key *key) in_dt
|
||||
{
|
||||
struct fd_context *ctx = fd_context(data);
|
||||
struct fd5_program_state *state = CALLOC_STRUCT(fd5_program_state);
|
||||
|
@@ -52,7 +52,7 @@ void fd5_emit_shader(struct fd_ringbuffer *ring,
|
||||
const struct ir3_shader_variant *so);
|
||||
|
||||
void fd5_program_emit(struct fd_context *ctx, struct fd_ringbuffer *ring,
|
||||
struct fd5_emit *emit);
|
||||
struct fd5_emit *emit) in_dt;
|
||||
|
||||
void fd5_prog_init(struct pipe_context *pctx);
|
||||
|
||||
|
@@ -151,7 +151,8 @@ setup_state_map(struct fd_context *ctx)
|
||||
BIT(FD6_GROUP_ZSA));
|
||||
fd_context_add_map(ctx, FD_DIRTY_ZSA | FD_DIRTY_BLEND | FD_DIRTY_PROG,
|
||||
BIT(FD6_GROUP_LRZ) | BIT(FD6_GROUP_LRZ_BINNING));
|
||||
fd_context_add_map(ctx, FD_DIRTY_PROG, BIT(FD6_GROUP_PROG));
|
||||
fd_context_add_map(ctx, FD_DIRTY_PROG | FD_DIRTY_RASTERIZER_CLIP_PLANE_ENABLE,
|
||||
BIT(FD6_GROUP_PROG));
|
||||
fd_context_add_map(ctx, FD_DIRTY_RASTERIZER, BIT(FD6_GROUP_RASTERIZER));
|
||||
fd_context_add_map(ctx,
|
||||
FD_DIRTY_FRAMEBUFFER | FD_DIRTY_RASTERIZER_DISCARD |
|
||||
|
@@ -156,6 +156,7 @@ fd6_draw_vbo(struct fd_context *ctx, const struct pipe_draw_info *info,
|
||||
.sample_shading = (ctx->min_samples > 1),
|
||||
.msaa = (ctx->framebuffer.samples > 1),
|
||||
},
|
||||
.clip_plane_enable = ctx->rasterizer->clip_plane_enable,
|
||||
},
|
||||
.rasterflat = ctx->rasterizer->flatshade,
|
||||
.sprite_coord_enable = ctx->rasterizer->sprite_coord_enable,
|
||||
@@ -195,7 +196,7 @@ fd6_draw_vbo(struct fd_context *ctx, const struct pipe_draw_info *info,
|
||||
|
||||
ir3_fixup_shader_state(&ctx->base, &emit.key.key);
|
||||
|
||||
if (!(ctx->dirty & FD_DIRTY_PROG)) {
|
||||
if (!(ctx->gen_dirty & BIT(FD6_GROUP_PROG))) {
|
||||
emit.prog = fd6_ctx->prog;
|
||||
} else {
|
||||
fd6_ctx->prog = fd6_emit_get_prog(&emit);
|
||||
|
@@ -351,8 +351,10 @@ next_regid(uint32_t reg, uint32_t increment)
|
||||
static void
|
||||
setup_stateobj(struct fd_ringbuffer *ring, struct fd_context *ctx,
|
||||
struct fd6_program_state *state,
|
||||
const struct ir3_shader_key *key, bool binning_pass) assert_dt
|
||||
const struct ir3_cache_key *cache_key,
|
||||
bool binning_pass) assert_dt
|
||||
{
|
||||
const struct ir3_shader_key *key = &cache_key->key;
|
||||
uint32_t pos_regid, psize_regid, color_regid[8], posz_regid;
|
||||
uint32_t clip0_regid, clip1_regid;
|
||||
uint32_t face_regid, coord_regid, zwcoord_regid, samp_id_regid;
|
||||
@@ -536,6 +538,8 @@ setup_stateobj(struct fd_ringbuffer *ring, struct fd_context *ctx,
|
||||
cull_mask = last_shader->cull_mask;
|
||||
uint8_t clip_cull_mask = clip_mask | cull_mask;
|
||||
|
||||
clip_mask &= cache_key->clip_plane_enable;
|
||||
|
||||
/* If we have streamout, link against the real FS, rather than the
|
||||
* dummy FS used for binning pass state, to ensure the OUTLOC's
|
||||
* match. Depending on whether we end up doing sysmem or gmem,
|
||||
@@ -1184,7 +1188,7 @@ fd6_program_create(void *data, struct ir3_shader_variant *bs,
|
||||
struct ir3_shader_variant *vs, struct ir3_shader_variant *hs,
|
||||
struct ir3_shader_variant *ds, struct ir3_shader_variant *gs,
|
||||
struct ir3_shader_variant *fs,
|
||||
const struct ir3_shader_key *key) in_dt
|
||||
const struct ir3_cache_key *key) in_dt
|
||||
{
|
||||
struct fd_context *ctx = fd_context(data);
|
||||
struct fd6_program_state *state = CALLOC_STRUCT(fd6_program_state);
|
||||
|
@@ -172,8 +172,9 @@ enum fd_dirty_3d_state {
|
||||
* from hw perspective:
|
||||
*/
|
||||
FD_DIRTY_RASTERIZER_DISCARD = BIT(24),
|
||||
FD_DIRTY_BLEND_DUAL = BIT(25),
|
||||
#define NUM_DIRTY_BITS 26
|
||||
FD_DIRTY_RASTERIZER_CLIP_PLANE_ENABLE = BIT(25),
|
||||
FD_DIRTY_BLEND_DUAL = BIT(26),
|
||||
#define NUM_DIRTY_BITS 27
|
||||
|
||||
/* additional flag for state requires updated resource tracking: */
|
||||
FD_DIRTY_RESOURCE = BIT(31),
|
||||
|
@@ -38,6 +38,8 @@
|
||||
#include "freedreno_texture.h"
|
||||
#include "freedreno_util.h"
|
||||
|
||||
#define get_safe(ptr, field) ((ptr) ? (ptr)->field : 0)
|
||||
|
||||
/* All the generic state handling.. In case of CSO's that are specific
|
||||
* to the GPU version, when the bind and the delete are common they can
|
||||
* go in here.
|
||||
@@ -434,7 +436,8 @@ fd_rasterizer_state_bind(struct pipe_context *pctx, void *hwcso) in_dt
|
||||
{
|
||||
struct fd_context *ctx = fd_context(pctx);
|
||||
struct pipe_scissor_state *old_scissor = fd_context_get_scissor(ctx);
|
||||
bool discard = ctx->rasterizer && ctx->rasterizer->rasterizer_discard;
|
||||
bool discard = get_safe(ctx->rasterizer, rasterizer_discard);
|
||||
unsigned clip_plane_enable = get_safe(ctx->rasterizer, clip_plane_enable);
|
||||
|
||||
ctx->rasterizer = hwcso;
|
||||
fd_context_dirty(ctx, FD_DIRTY_RASTERIZER);
|
||||
@@ -453,8 +456,11 @@ fd_rasterizer_state_bind(struct pipe_context *pctx, void *hwcso) in_dt
|
||||
if (old_scissor != fd_context_get_scissor(ctx))
|
||||
fd_context_dirty(ctx, FD_DIRTY_SCISSOR);
|
||||
|
||||
if (ctx->rasterizer && (discard != ctx->rasterizer->rasterizer_discard))
|
||||
if (discard != get_safe(ctx->rasterizer, rasterizer_discard))
|
||||
fd_context_dirty(ctx, FD_DIRTY_RASTERIZER_DISCARD);
|
||||
|
||||
if (clip_plane_enable != get_safe(ctx->rasterizer, clip_plane_enable))
|
||||
fd_context_dirty(ctx, FD_DIRTY_RASTERIZER_CLIP_PLANE_ENABLE);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@@ -157,7 +157,7 @@ ir3_cache_lookup(struct ir3_cache *cache, const struct ir3_cache_key *key,
|
||||
cache->data, bs, variants[MESA_SHADER_VERTEX],
|
||||
variants[MESA_SHADER_TESS_CTRL], variants[MESA_SHADER_TESS_EVAL],
|
||||
variants[MESA_SHADER_GEOMETRY], variants[MESA_SHADER_FRAGMENT],
|
||||
&key->key);
|
||||
key);
|
||||
state->key = *key;
|
||||
|
||||
/* NOTE: uses copy of key in state obj, because pointer passed by caller
|
||||
|
@@ -27,6 +27,8 @@
|
||||
#ifndef IR3_CACHE_H_
|
||||
#define IR3_CACHE_H_
|
||||
|
||||
#include "pipe/p_state.h"
|
||||
|
||||
#include "ir3/ir3_shader.h"
|
||||
|
||||
/*
|
||||
@@ -39,6 +41,11 @@
|
||||
struct ir3_cache_key {
|
||||
struct ir3_shader_state *vs, *hs, *ds, *gs, *fs; // 5 pointers
|
||||
struct ir3_shader_key key; // 7 dwords
|
||||
|
||||
/* Additional state that effects the cached program state, but
|
||||
* not the compiled shader:
|
||||
*/
|
||||
unsigned clip_plane_enable : PIPE_MAX_CLIP_PLANES;
|
||||
};
|
||||
|
||||
/* per-gen backend program state object should subclass this for it's
|
||||
@@ -54,7 +61,7 @@ struct ir3_cache_funcs {
|
||||
void *data, struct ir3_shader_variant *bs, /* binning pass vs */
|
||||
struct ir3_shader_variant *vs, struct ir3_shader_variant *hs,
|
||||
struct ir3_shader_variant *ds, struct ir3_shader_variant *gs,
|
||||
struct ir3_shader_variant *fs, const struct ir3_shader_key *key);
|
||||
struct ir3_shader_variant *fs, const struct ir3_cache_key *key);
|
||||
void (*destroy_state)(void *data, struct ir3_program_state *state);
|
||||
};
|
||||
|
||||
|
@@ -337,6 +337,16 @@ pipe_format_for_aspect(enum pipe_format format, unsigned pipe_mask)
|
||||
}
|
||||
}
|
||||
|
||||
static bool
|
||||
clear_color_is_fully_zero(const struct iris_resource *res)
|
||||
{
|
||||
return !res->aux.clear_color_unknown &&
|
||||
res->aux.clear_color.u32[0] == 0 &&
|
||||
res->aux.clear_color.u32[1] == 0 &&
|
||||
res->aux.clear_color.u32[2] == 0 &&
|
||||
res->aux.clear_color.u32[3] == 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* The pipe->blit() driver hook.
|
||||
*
|
||||
@@ -590,10 +600,7 @@ get_copy_region_aux_settings(struct iris_context *ice,
|
||||
* original format (e.g. A8_UNORM/R8_UINT).
|
||||
*/
|
||||
*out_clear_supported = (devinfo->ver >= 11 && !is_render_target) ||
|
||||
(res->aux.clear_color.u32[0] == 0 &&
|
||||
res->aux.clear_color.u32[1] == 0 &&
|
||||
res->aux.clear_color.u32[2] == 0 &&
|
||||
res->aux.clear_color.u32[3] == 0);
|
||||
clear_color_is_fully_zero(res);
|
||||
break;
|
||||
default:
|
||||
*out_aux_usage = ISL_AUX_USAGE_NONE;
|
||||
|
@@ -560,6 +560,18 @@ llvmpipe_get_compute_param(struct pipe_screen *_screen,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void
|
||||
llvmpipe_get_driver_uuid(struct pipe_screen *pscreen, char *uuid)
|
||||
{
|
||||
memset(uuid, 0, PIPE_UUID_SIZE);
|
||||
}
|
||||
|
||||
static void
|
||||
llvmpipe_get_device_uuid(struct pipe_screen *pscreen, char *uuid)
|
||||
{
|
||||
memset(uuid, 0, PIPE_UUID_SIZE);
|
||||
}
|
||||
|
||||
static const struct nir_shader_compiler_options gallivm_nir_options = {
|
||||
.lower_scmp = true,
|
||||
.lower_flrp32 = true,
|
||||
@@ -1040,6 +1052,9 @@ llvmpipe_create_screen(struct sw_winsys *winsys)
|
||||
|
||||
screen->base.get_timestamp = llvmpipe_get_timestamp;
|
||||
|
||||
screen->base.get_driver_uuid = llvmpipe_get_driver_uuid;
|
||||
screen->base.get_device_uuid = llvmpipe_get_device_uuid;
|
||||
|
||||
screen->base.finalize_nir = llvmpipe_finalize_nir;
|
||||
|
||||
screen->base.get_disk_shader_cache = lp_get_disk_shader_cache;
|
||||
|
@@ -2715,7 +2715,8 @@ panfrost_draw_emit_tiler(struct panfrost_batch *batch,
|
||||
}
|
||||
}
|
||||
|
||||
bool points = info->mode == PIPE_PRIM_POINTS;
|
||||
enum pipe_prim_type prim = u_reduced_prim(info->mode);
|
||||
bool polygon = (prim == PIPE_PRIM_TRIANGLES);
|
||||
void *prim_size = pan_section_ptr(job, TILER_JOB, PRIMITIVE_SIZE);
|
||||
|
||||
#if PAN_ARCH >= 6
|
||||
@@ -2731,8 +2732,17 @@ panfrost_draw_emit_tiler(struct panfrost_batch *batch,
|
||||
cfg.four_components_per_vertex = true;
|
||||
cfg.draw_descriptor_is_64b = true;
|
||||
cfg.front_face_ccw = rast->front_ccw;
|
||||
cfg.cull_front_face = rast->cull_face & PIPE_FACE_FRONT;
|
||||
cfg.cull_back_face = rast->cull_face & PIPE_FACE_BACK;
|
||||
|
||||
/*
|
||||
* From the Gallium documentation,
|
||||
* pipe_rasterizer_state::cull_face "indicates which faces of
|
||||
* polygons to cull". Points and lines are not considered
|
||||
* polygons and should be drawn even if all faces are culled.
|
||||
* The hardware does not take primitive type into account when
|
||||
* culling, so we need to do that check ourselves.
|
||||
*/
|
||||
cfg.cull_front_face = polygon && (rast->cull_face & PIPE_FACE_FRONT);
|
||||
cfg.cull_back_face = polygon && (rast->cull_face & PIPE_FACE_BACK);
|
||||
cfg.position = pos;
|
||||
cfg.state = batch->rsd[PIPE_SHADER_FRAGMENT];
|
||||
cfg.attributes = batch->attribs[PIPE_SHADER_FRAGMENT];
|
||||
@@ -2746,9 +2756,7 @@ panfrost_draw_emit_tiler(struct panfrost_batch *batch,
|
||||
* be set to 0 and the provoking vertex is selected with the
|
||||
* PRIMITIVE.first_provoking_vertex field.
|
||||
*/
|
||||
if (info->mode == PIPE_PRIM_LINES ||
|
||||
info->mode == PIPE_PRIM_LINE_LOOP ||
|
||||
info->mode == PIPE_PRIM_LINE_STRIP) {
|
||||
if (prim == PIPE_PRIM_LINES) {
|
||||
/* The logic is inverted across arches. */
|
||||
cfg.flat_shading_vertex = rast->flatshade_first
|
||||
^ (PAN_ARCH <= 5);
|
||||
@@ -2769,7 +2777,7 @@ panfrost_draw_emit_tiler(struct panfrost_batch *batch,
|
||||
}
|
||||
}
|
||||
|
||||
panfrost_emit_primitive_size(ctx, points, psiz, prim_size);
|
||||
panfrost_emit_primitive_size(ctx, prim == PIPE_PRIM_POINTS, psiz, prim_size);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@@ -841,8 +841,6 @@ panfrost_create_screen(int fd, struct renderonly *ro)
|
||||
if (dev->debug & PAN_DBG_NO_AFBC)
|
||||
dev->has_afbc = false;
|
||||
|
||||
dev->ro = ro;
|
||||
|
||||
/* Check if we're loading against a supported GPU model. */
|
||||
|
||||
switch (dev->gpu_id) {
|
||||
@@ -862,6 +860,8 @@ panfrost_create_screen(int fd, struct renderonly *ro)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
dev->ro = ro;
|
||||
|
||||
screen->base.destroy = panfrost_destroy_screen;
|
||||
|
||||
screen->base.get_name = panfrost_get_name;
|
||||
|
@@ -312,15 +312,17 @@ void r300_draw_init_vertex_shader(struct r300_context *r300,
|
||||
struct r300_vertex_shader *vs)
|
||||
{
|
||||
struct draw_context *draw = r300->draw;
|
||||
struct pipe_shader_state new_vs;
|
||||
struct tgsi_shader_info info;
|
||||
struct vs_transform_context transform;
|
||||
const uint newLen = tgsi_num_tokens(vs->state.tokens) + 100 /* XXX */;
|
||||
struct pipe_shader_state new_vs = {
|
||||
.type = PIPE_SHADER_IR_TGSI,
|
||||
.tokens = tgsi_alloc_tokens(newLen)
|
||||
};
|
||||
unsigned i;
|
||||
|
||||
tgsi_scan_shader(vs->state.tokens, &info);
|
||||
|
||||
new_vs.tokens = tgsi_alloc_tokens(newLen);
|
||||
if (new_vs.tokens == NULL)
|
||||
return;
|
||||
|
||||
|
@@ -440,7 +440,6 @@ dEQP-GLES31.functional.debug.negative_coverage.get_error.buffer.blit_framebuffer
|
||||
dEQP-GLES31.functional.debug.negative_coverage.get_error.buffer.read_pixels_fbo_format_mismatch,Fail
|
||||
dEQP-GLES31.functional.debug.negative_coverage.log.buffer.read_pixels_fbo_format_mismatch,Fail
|
||||
dEQP-GLES31.functional.draw_base_vertex.draw_elements_instanced_base_vertex.line_loop.instanced_attributes,Fail
|
||||
dEQP-GLES31.functional.draw_buffers_indexed.overwrite_indexed.common_color_mask_buffer_color_mask,Fail
|
||||
dEQP-GLES31.functional.draw_buffers_indexed.random.max_implementation_draw_buffers.0,Fail
|
||||
dEQP-GLES31.functional.draw_buffers_indexed.random.max_implementation_draw_buffers.1,Fail
|
||||
dEQP-GLES31.functional.draw_buffers_indexed.random.max_implementation_draw_buffers.10,Fail
|
||||
|
@@ -1,3 +1,2 @@
|
||||
dEQP-GLES31.functional.draw_buffers_indexed.overwrite_indexed.common_color_mask_buffer_color_mask
|
||||
dEQP-GLES31.functional.shaders.opaque_type_indexing.sampler.const_literal.geometry.isampler2darray
|
||||
dEQP-GLES31.functional.shaders.opaque_type_indexing.sampler.const_literal.geometry.isampler3d
|
||||
|
@@ -1005,7 +1005,7 @@ blend_fallback(struct quad_stage *qs,
|
||||
rebase_colors(bqs->base_format[cbuf], quadColor);
|
||||
|
||||
if (blend->rt[blend_buf].colormask != 0xf)
|
||||
colormask_quad( blend->rt[cbuf].colormask, quadColor, dest);
|
||||
colormask_quad( blend->rt[blend_buf].colormask, quadColor, dest);
|
||||
|
||||
/* Output color values
|
||||
*/
|
||||
|
@@ -1742,7 +1742,13 @@ emit_alu(struct ntv_context *ctx, nir_alu_instr *alu)
|
||||
BUILTIN_UNOP(nir_op_ufind_msb, GLSLstd450FindUMsb)
|
||||
BUILTIN_UNOP(nir_op_find_lsb, GLSLstd450FindILsb)
|
||||
BUILTIN_UNOP(nir_op_ifind_msb, GLSLstd450FindSMsb)
|
||||
BUILTIN_UNOPF(nir_op_pack_half_2x16, GLSLstd450PackHalf2x16)
|
||||
|
||||
case nir_op_pack_half_2x16:
|
||||
assert(nir_op_infos[alu->op].num_inputs == 1);
|
||||
result = emit_builtin_unop(ctx, GLSLstd450PackHalf2x16, get_dest_type(ctx, &alu->dest.dest, nir_type_uint), src[0]);
|
||||
force_float = true;
|
||||
break;
|
||||
|
||||
BUILTIN_UNOPF(nir_op_unpack_half_2x16, GLSLstd450UnpackHalf2x16)
|
||||
BUILTIN_UNOPF(nir_op_pack_64_2x32, GLSLstd450PackDouble2x32)
|
||||
#undef BUILTIN_UNOP
|
||||
@@ -2869,7 +2875,7 @@ emit_intrinsic(struct ntv_context *ctx, nir_intrinsic_instr *intr)
|
||||
case nir_intrinsic_memory_barrier:
|
||||
spirv_builder_emit_memory_barrier(&ctx->builder, SpvScopeWorkgroup,
|
||||
SpvMemorySemanticsImageMemoryMask | SpvMemorySemanticsUniformMemoryMask |
|
||||
SpvMemorySemanticsMakeVisibleMask | SpvMemorySemanticsAcquireReleaseMask);
|
||||
SpvMemorySemanticsAcquireReleaseMask);
|
||||
break;
|
||||
|
||||
case nir_intrinsic_memory_barrier_image:
|
||||
|
@@ -183,22 +183,6 @@ is_bool_query(struct zink_query *query)
|
||||
query->type == PIPE_QUERY_GPU_FINISHED;
|
||||
}
|
||||
|
||||
static void
|
||||
qbo_sync_from_prev(struct zink_context *ctx, struct zink_query *query, unsigned id_offset, unsigned last_start)
|
||||
{
|
||||
assert(id_offset);
|
||||
|
||||
struct zink_query_buffer *prev = list_last_entry(&query->buffers, struct zink_query_buffer, list);
|
||||
unsigned result_size = get_num_results(query->type) * sizeof(uint64_t);
|
||||
/* this is get_buffer_offset() but without the zink_query object */
|
||||
unsigned qbo_offset = last_start * get_num_results(query->type) * sizeof(uint64_t);
|
||||
query->curr_query = id_offset;
|
||||
query->curr_qbo->num_results = id_offset;
|
||||
zink_copy_buffer(ctx, zink_resource(query->curr_qbo->buffer), zink_resource(prev->buffer), 0,
|
||||
qbo_offset,
|
||||
id_offset * result_size);
|
||||
}
|
||||
|
||||
static bool
|
||||
qbo_append(struct pipe_screen *screen, struct zink_query *query)
|
||||
{
|
||||
@@ -459,6 +443,8 @@ get_query_result(struct pipe_context *pctx,
|
||||
uint64_t *xfb_results = NULL;
|
||||
uint64_t *results;
|
||||
bool is_timestamp = query->type == PIPE_QUERY_TIMESTAMP || query->type == PIPE_QUERY_TIMESTAMP_DISJOINT;
|
||||
if (!qbo->num_results)
|
||||
continue;
|
||||
results = pipe_buffer_map_range(pctx, qbo->buffer, 0,
|
||||
(is_timestamp ? 1 : qbo->num_results) * result_size, flags, &xfer);
|
||||
if (!results) {
|
||||
@@ -563,7 +549,7 @@ copy_pool_results_to_buffer(struct zink_context *ctx, struct zink_query *query,
|
||||
util_range_add(&res->base.b, &res->valid_buffer_range, offset, offset + result_size);
|
||||
assert(query_id < NUM_QUERIES);
|
||||
VKCTX(CmdCopyQueryPoolResults)(batch->state->cmdbuf, pool, query_id, num_results, res->obj->buffer,
|
||||
offset, type_size, flags);
|
||||
offset, base_result_size, flags);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -575,8 +561,6 @@ copy_results_to_buffer(struct zink_context *ctx, struct zink_query *query, struc
|
||||
static void
|
||||
reset_pool(struct zink_context *ctx, struct zink_batch *batch, struct zink_query *q)
|
||||
{
|
||||
unsigned last_start = q->last_start;
|
||||
unsigned id_offset = q->curr_query - q->last_start;
|
||||
/* This command must only be called outside of a render pass instance
|
||||
*
|
||||
* - vkCmdResetQueryPool spec
|
||||
@@ -605,8 +589,6 @@ reset_pool(struct zink_context *ctx, struct zink_batch *batch, struct zink_query
|
||||
reset_qbo(q);
|
||||
else
|
||||
debug_printf("zink: qbo alloc failed on reset!");
|
||||
if (id_offset)
|
||||
qbo_sync_from_prev(ctx, q, id_offset, last_start);
|
||||
}
|
||||
|
||||
static inline unsigned
|
||||
@@ -650,6 +632,8 @@ update_qbo(struct zink_context *ctx, struct zink_query *q)
|
||||
|
||||
if (!is_timestamp)
|
||||
q->curr_qbo->num_results++;
|
||||
else
|
||||
q->curr_qbo->num_results = 1;
|
||||
q->needs_update = false;
|
||||
}
|
||||
|
||||
@@ -1014,17 +998,18 @@ zink_get_query_result_resource(struct pipe_context *pctx,
|
||||
*/
|
||||
|
||||
VkQueryResultFlags flag = is_time_query(query) ? 0 : VK_QUERY_RESULT_PARTIAL_BIT;
|
||||
unsigned src_offset = result_size * get_num_results(query->type);
|
||||
if (zink_batch_usage_check_completion(ctx, query->batch_id)) {
|
||||
uint64_t u64[2] = {0};
|
||||
if (VKCTX(GetQueryPoolResults)(screen->dev, query->query_pool, query_id, 1, 2 * result_size, u64,
|
||||
uint64_t u64[4] = {0};
|
||||
if (VKCTX(GetQueryPoolResults)(screen->dev, query->query_pool, query_id, 1, sizeof(u64), u64,
|
||||
0, size_flags | VK_QUERY_RESULT_WITH_AVAILABILITY_BIT | flag) == VK_SUCCESS) {
|
||||
pipe_buffer_write(pctx, pres, offset, result_size, (unsigned char*)u64 + result_size);
|
||||
pipe_buffer_write(pctx, pres, offset, result_size, (unsigned char*)u64 + src_offset);
|
||||
return;
|
||||
}
|
||||
}
|
||||
struct pipe_resource *staging = pipe_buffer_create(pctx->screen, 0, PIPE_USAGE_STAGING, result_size * 2);
|
||||
struct pipe_resource *staging = pipe_buffer_create(pctx->screen, 0, PIPE_USAGE_STAGING, src_offset + result_size);
|
||||
copy_results_to_buffer(ctx, query, zink_resource(staging), 0, 1, size_flags | VK_QUERY_RESULT_WITH_AVAILABILITY_BIT | flag);
|
||||
zink_copy_buffer(ctx, res, zink_resource(staging), offset, result_size, result_size);
|
||||
zink_copy_buffer(ctx, res, zink_resource(staging), offset, result_size * get_num_results(query->type), result_size);
|
||||
pipe_resource_reference(&staging, NULL);
|
||||
return;
|
||||
}
|
||||
|
@@ -1231,13 +1231,13 @@ zink_buffer_map(struct pipe_context *pctx,
|
||||
mgr = ctx->tc->base.stream_uploader;
|
||||
else
|
||||
mgr = ctx->base.stream_uploader;
|
||||
u_upload_alloc(mgr, 0, box->width + box->x,
|
||||
u_upload_alloc(mgr, 0, box->width,
|
||||
screen->info.props.limits.minMemoryMapAlignment, &offset,
|
||||
(struct pipe_resource **)&trans->staging_res, (void **)&ptr);
|
||||
res = zink_resource(trans->staging_res);
|
||||
trans->offset = offset + box->x;
|
||||
trans->offset = offset;
|
||||
usage |= PIPE_MAP_UNSYNCHRONIZED;
|
||||
ptr = ((uint8_t *)ptr) + box->x;
|
||||
ptr = ((uint8_t *)ptr);
|
||||
} else {
|
||||
/* At this point, the buffer is always idle (we checked it above). */
|
||||
usage |= PIPE_MAP_UNSYNCHRONIZED;
|
||||
|
@@ -671,7 +671,10 @@ zink_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
|
||||
return MIN2(screen->info.props.limits.maxVertexOutputComponents / 4 / 2, 16);
|
||||
|
||||
case PIPE_CAP_DMABUF:
|
||||
return screen->info.have_KHR_external_memory_fd && screen->info.have_EXT_external_memory_dma_buf && screen->info.have_EXT_queue_family_foreign;
|
||||
return screen->info.have_KHR_external_memory_fd &&
|
||||
screen->info.have_EXT_external_memory_dma_buf &&
|
||||
screen->info.have_EXT_queue_family_foreign &&
|
||||
screen->info.have_EXT_image_drm_format_modifier;
|
||||
|
||||
case PIPE_CAP_DEPTH_BOUNDS_TEST:
|
||||
return screen->info.feats.features.depthBounds;
|
||||
@@ -1941,9 +1944,11 @@ zink_internal_create_screen(const struct pipe_screen_config *config)
|
||||
screen->base.get_compiler_options = zink_get_compiler_options;
|
||||
screen->base.get_sample_pixel_grid = zink_get_sample_pixel_grid;
|
||||
screen->base.is_format_supported = zink_is_format_supported;
|
||||
screen->base.query_dmabuf_modifiers = zink_query_dmabuf_modifiers;
|
||||
screen->base.is_dmabuf_modifier_supported = zink_is_dmabuf_modifier_supported;
|
||||
screen->base.get_dmabuf_modifier_planes = zink_get_dmabuf_modifier_planes;
|
||||
if (screen->info.have_EXT_image_drm_format_modifier && screen->info.have_EXT_external_memory_dma_buf) {
|
||||
screen->base.query_dmabuf_modifiers = zink_query_dmabuf_modifiers;
|
||||
screen->base.is_dmabuf_modifier_supported = zink_is_dmabuf_modifier_supported;
|
||||
screen->base.get_dmabuf_modifier_planes = zink_get_dmabuf_modifier_planes;
|
||||
}
|
||||
screen->base.context_create = zink_context_create;
|
||||
screen->base.flush_frontbuffer = zink_flush_frontbuffer;
|
||||
screen->base.destroy = zink_destroy_screen;
|
||||
|
@@ -9675,6 +9675,7 @@ brw_nir_populate_wm_prog_data(const nir_shader *shader,
|
||||
|
||||
prog_data->per_coarse_pixel_dispatch =
|
||||
key->coarse_pixel &&
|
||||
!prog_data->uses_omask &&
|
||||
!prog_data->persample_dispatch &&
|
||||
!prog_data->uses_sample_mask &&
|
||||
(prog_data->computed_depth_mode == BRW_PSCDEPTH_OFF) &&
|
||||
|
@@ -547,17 +547,16 @@ fs_visitor::optimize_frontfacing_ternary(nir_alu_instr *instr,
|
||||
|
||||
/* For (gl_FrontFacing ? 1.0 : -1.0), emit:
|
||||
*
|
||||
* or(8) tmp.1<2>W g0.0<0,1,0>W 0x00003f80W
|
||||
* or(8) tmp.1<2>W g1.1<0,1,0>W 0x00003f80W
|
||||
* and(8) dst<1>D tmp<8,8,1>D 0xbf800000D
|
||||
*
|
||||
* and negate the result for (gl_FrontFacing ? -1.0 : 1.0).
|
||||
* and negate g1.1<0,1,0>W for (gl_FrontFacing ? -1.0 : 1.0).
|
||||
*/
|
||||
if (value1 == -1.0f)
|
||||
g1.negate = true;
|
||||
|
||||
bld.OR(subscript(tmp, BRW_REGISTER_TYPE_W, 1),
|
||||
g1, brw_imm_uw(0x3f80));
|
||||
|
||||
if (value1 == -1.0f)
|
||||
bld.MOV(tmp, negate(tmp));
|
||||
|
||||
} else if (devinfo->ver >= 6) {
|
||||
/* Bit 15 of g0.0 is 0 if the polygon is front facing. */
|
||||
fs_reg g0 = fs_reg(retype(brw_vec1_grf(0, 0), BRW_REGISTER_TYPE_W));
|
||||
|
@@ -1702,8 +1702,36 @@ void anv_UpdateDescriptorSets(
|
||||
copy->srcArrayElement,
|
||||
copy->descriptorCount);
|
||||
} else {
|
||||
for (uint32_t j = 0; j < copy->descriptorCount; j++)
|
||||
dst_desc[j] = src_desc[j];
|
||||
struct anv_buffer_view *dst_bview =
|
||||
&dst->buffer_views[dst_layout->buffer_view_index +
|
||||
copy->dstArrayElement];
|
||||
struct anv_buffer_view *src_bview =
|
||||
&src->buffer_views[src_layout->buffer_view_index +
|
||||
copy->srcArrayElement];
|
||||
/* If ANV_DESCRIPTOR_BUFFER_VIEW is present in the source descriptor,
|
||||
* it means we're using an anv_buffer_view allocated by the source
|
||||
* descriptor set. In that case we want to careful copy it because
|
||||
* his lifecycle is tied to the source descriptor set, not the
|
||||
* destination descriptor set.
|
||||
*/
|
||||
if (src_layout->data & ANV_DESCRIPTOR_BUFFER_VIEW) {
|
||||
assert(dst_layout->data & ANV_DESCRIPTOR_BUFFER_VIEW);
|
||||
for (uint32_t j = 0; j < copy->descriptorCount; j++) {
|
||||
dst_bview[j].format = src_bview[j].format;
|
||||
dst_bview[j].range = src_bview[j].range;
|
||||
dst_bview[j].address = src_bview[j].address;
|
||||
|
||||
memcpy(dst_bview[j].surface_state.map,
|
||||
src_bview[j].surface_state.map,
|
||||
src_bview[j].surface_state.alloc_size);
|
||||
|
||||
dst_desc[j].type = src_desc[j].type;
|
||||
dst_desc[j].buffer_view = &dst_bview[j];
|
||||
}
|
||||
} else {
|
||||
for (uint32_t j = 0; j < copy->descriptorCount; j++)
|
||||
dst_desc[j] = src_desc[j];
|
||||
}
|
||||
|
||||
unsigned desc_size = anv_descriptor_size(src_layout);
|
||||
if (desc_size > 0) {
|
||||
|
@@ -918,19 +918,19 @@ static struct ureg get_scenecolor( struct tnl_program *p, GLuint side )
|
||||
|
||||
|
||||
static struct ureg get_lightprod( struct tnl_program *p, GLuint light,
|
||||
GLuint side, GLuint property )
|
||||
GLuint side, GLuint property, bool *is_state_light )
|
||||
{
|
||||
GLuint attrib = material_attrib(side, property);
|
||||
if (p->materials & (1<<attrib)) {
|
||||
struct ureg light_value =
|
||||
register_param3(p, STATE_LIGHT, light, property);
|
||||
struct ureg material_value = get_material(p, side, property);
|
||||
struct ureg tmp = get_temp(p);
|
||||
emit_op2(p, OPCODE_MUL, tmp, 0, light_value, material_value);
|
||||
return tmp;
|
||||
*is_state_light = true;
|
||||
return light_value;
|
||||
}
|
||||
else
|
||||
else {
|
||||
*is_state_light = false;
|
||||
return register_param3(p, STATE_LIGHTPROD, light, attrib);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1112,20 +1112,28 @@ static void build_lighting( struct tnl_program *p )
|
||||
*/
|
||||
struct ureg lightprod_front[MAX_LIGHTS][3];
|
||||
struct ureg lightprod_back[MAX_LIGHTS][3];
|
||||
bool lightprod_front_is_state_light[MAX_LIGHTS][3];
|
||||
bool lightprod_back_is_state_light[MAX_LIGHTS][3];
|
||||
|
||||
for (i = 0; i < MAX_LIGHTS; i++) {
|
||||
if (p->state->unit[i].light_enabled) {
|
||||
lightprod_front[i][0] = get_lightprod(p, i, 0, STATE_AMBIENT);
|
||||
lightprod_front[i][0] = get_lightprod(p, i, 0, STATE_AMBIENT,
|
||||
&lightprod_front_is_state_light[i][0]);
|
||||
if (twoside)
|
||||
lightprod_back[i][0] = get_lightprod(p, i, 1, STATE_AMBIENT);
|
||||
lightprod_back[i][0] = get_lightprod(p, i, 1, STATE_AMBIENT,
|
||||
&lightprod_back_is_state_light[i][0]);
|
||||
|
||||
lightprod_front[i][1] = get_lightprod(p, i, 0, STATE_DIFFUSE);
|
||||
lightprod_front[i][1] = get_lightprod(p, i, 0, STATE_DIFFUSE,
|
||||
&lightprod_front_is_state_light[i][1]);
|
||||
if (twoside)
|
||||
lightprod_back[i][1] = get_lightprod(p, i, 1, STATE_DIFFUSE);
|
||||
lightprod_back[i][1] = get_lightprod(p, i, 1, STATE_DIFFUSE,
|
||||
&lightprod_back_is_state_light[i][1]);
|
||||
|
||||
lightprod_front[i][2] = get_lightprod(p, i, 0, STATE_SPECULAR);
|
||||
lightprod_front[i][2] = get_lightprod(p, i, 0, STATE_SPECULAR,
|
||||
&lightprod_front_is_state_light[i][2]);
|
||||
if (twoside)
|
||||
lightprod_back[i][2] = get_lightprod(p, i, 1, STATE_SPECULAR);
|
||||
lightprod_back[i][2] = get_lightprod(p, i, 1, STATE_SPECULAR,
|
||||
&lightprod_back_is_state_light[i][2]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1209,6 +1217,18 @@ static void build_lighting( struct tnl_program *p )
|
||||
/* Front face lighting:
|
||||
*/
|
||||
{
|
||||
/* Transform STATE_LIGHT into STATE_LIGHTPROD if needed. This isn't done in
|
||||
* get_lightprod to avoid using too many temps.
|
||||
*/
|
||||
for (int j = 0; j < 3; j++) {
|
||||
if (lightprod_front_is_state_light[i][j]) {
|
||||
struct ureg material_value = get_material(p, 0, STATE_AMBIENT + j);
|
||||
struct ureg tmp = get_temp(p);
|
||||
emit_op2(p, OPCODE_MUL, tmp, 0, lightprod_front[i][j], material_value);
|
||||
lightprod_front[i][j] = tmp;
|
||||
}
|
||||
}
|
||||
|
||||
struct ureg ambient = lightprod_front[i][0];
|
||||
struct ureg diffuse = lightprod_front[i][1];
|
||||
struct ureg specular = lightprod_front[i][2];
|
||||
@@ -1264,6 +1284,18 @@ static void build_lighting( struct tnl_program *p )
|
||||
/* Back face lighting:
|
||||
*/
|
||||
if (twoside) {
|
||||
/* Transform STATE_LIGHT into STATE_LIGHTPROD if needed. This isn't done in
|
||||
* get_lightprod to avoid using too many temps.
|
||||
*/
|
||||
for (int j = 0; j < 3; j++) {
|
||||
if (lightprod_back_is_state_light[i][j]) {
|
||||
struct ureg material_value = get_material(p, 1, STATE_AMBIENT + j);
|
||||
struct ureg tmp = get_temp(p);
|
||||
emit_op2(p, OPCODE_MUL, tmp, 1, lightprod_back[i][j], material_value);
|
||||
lightprod_back[i][j] = tmp;
|
||||
}
|
||||
}
|
||||
|
||||
struct ureg ambient = lightprod_back[i][0];
|
||||
struct ureg diffuse = lightprod_back[i][1];
|
||||
struct ureg specular = lightprod_back[i][2];
|
||||
|
@@ -97,7 +97,6 @@ _mesa_GetProgramInterfaceiv(GLuint program, GLenum programInterface,
|
||||
_mesa_enum_to_string(pname), params);
|
||||
}
|
||||
|
||||
unsigned i;
|
||||
struct gl_shader_program *shProg =
|
||||
_mesa_lookup_shader_program_err(ctx, program,
|
||||
"glGetProgramInterfaceiv");
|
||||
@@ -117,125 +116,7 @@ _mesa_GetProgramInterfaceiv(GLuint program, GLenum programInterface,
|
||||
return;
|
||||
}
|
||||
|
||||
/* Validate pname against interface. */
|
||||
switch(pname) {
|
||||
case GL_ACTIVE_RESOURCES:
|
||||
for (i = 0, *params = 0; i < shProg->data->NumProgramResourceList; i++)
|
||||
if (shProg->data->ProgramResourceList[i].Type == programInterface)
|
||||
(*params)++;
|
||||
break;
|
||||
case GL_MAX_NAME_LENGTH:
|
||||
if (programInterface == GL_ATOMIC_COUNTER_BUFFER ||
|
||||
programInterface == GL_TRANSFORM_FEEDBACK_BUFFER) {
|
||||
_mesa_error(ctx, GL_INVALID_OPERATION,
|
||||
"glGetProgramInterfaceiv(%s pname %s)",
|
||||
_mesa_enum_to_string(programInterface),
|
||||
_mesa_enum_to_string(pname));
|
||||
return;
|
||||
}
|
||||
/* Name length consists of base name, 3 additional chars '[0]' if
|
||||
* resource is an array and finally 1 char for string terminator.
|
||||
*/
|
||||
for (i = 0, *params = 0; i < shProg->data->NumProgramResourceList; i++) {
|
||||
if (shProg->data->ProgramResourceList[i].Type != programInterface)
|
||||
continue;
|
||||
unsigned len =
|
||||
_mesa_program_resource_name_len(&shProg->data->ProgramResourceList[i]);
|
||||
*params = MAX2(*params, len + 1);
|
||||
}
|
||||
break;
|
||||
case GL_MAX_NUM_ACTIVE_VARIABLES:
|
||||
switch (programInterface) {
|
||||
case GL_UNIFORM_BLOCK:
|
||||
for (i = 0, *params = 0; i < shProg->data->NumProgramResourceList; i++) {
|
||||
if (shProg->data->ProgramResourceList[i].Type == programInterface) {
|
||||
struct gl_uniform_block *block =
|
||||
(struct gl_uniform_block *)
|
||||
shProg->data->ProgramResourceList[i].Data;
|
||||
*params = MAX2(*params, block->NumUniforms);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case GL_SHADER_STORAGE_BLOCK:
|
||||
for (i = 0, *params = 0; i < shProg->data->NumProgramResourceList; i++) {
|
||||
if (shProg->data->ProgramResourceList[i].Type == programInterface) {
|
||||
struct gl_uniform_block *block =
|
||||
(struct gl_uniform_block *)
|
||||
shProg->data->ProgramResourceList[i].Data;
|
||||
GLint block_params = 0;
|
||||
for (unsigned j = 0; j < block->NumUniforms; j++) {
|
||||
struct gl_program_resource *uni =
|
||||
_mesa_program_resource_find_active_variable(
|
||||
shProg,
|
||||
GL_BUFFER_VARIABLE,
|
||||
block,
|
||||
j);
|
||||
if (!uni)
|
||||
continue;
|
||||
block_params++;
|
||||
}
|
||||
*params = MAX2(*params, block_params);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case GL_ATOMIC_COUNTER_BUFFER:
|
||||
for (i = 0, *params = 0; i < shProg->data->NumProgramResourceList; i++) {
|
||||
if (shProg->data->ProgramResourceList[i].Type == programInterface) {
|
||||
struct gl_active_atomic_buffer *buffer =
|
||||
(struct gl_active_atomic_buffer *)
|
||||
shProg->data->ProgramResourceList[i].Data;
|
||||
*params = MAX2(*params, buffer->NumUniforms);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case GL_TRANSFORM_FEEDBACK_BUFFER:
|
||||
for (i = 0, *params = 0; i < shProg->data->NumProgramResourceList; i++) {
|
||||
if (shProg->data->ProgramResourceList[i].Type == programInterface) {
|
||||
struct gl_transform_feedback_buffer *buffer =
|
||||
(struct gl_transform_feedback_buffer *)
|
||||
shProg->data->ProgramResourceList[i].Data;
|
||||
*params = MAX2(*params, buffer->NumVaryings);
|
||||
}
|
||||
}
|
||||
break;
|
||||
default:
|
||||
_mesa_error(ctx, GL_INVALID_OPERATION,
|
||||
"glGetProgramInterfaceiv(%s pname %s)",
|
||||
_mesa_enum_to_string(programInterface),
|
||||
_mesa_enum_to_string(pname));
|
||||
}
|
||||
break;
|
||||
case GL_MAX_NUM_COMPATIBLE_SUBROUTINES:
|
||||
switch (programInterface) {
|
||||
case GL_VERTEX_SUBROUTINE_UNIFORM:
|
||||
case GL_FRAGMENT_SUBROUTINE_UNIFORM:
|
||||
case GL_GEOMETRY_SUBROUTINE_UNIFORM:
|
||||
case GL_COMPUTE_SUBROUTINE_UNIFORM:
|
||||
case GL_TESS_CONTROL_SUBROUTINE_UNIFORM:
|
||||
case GL_TESS_EVALUATION_SUBROUTINE_UNIFORM: {
|
||||
for (i = 0, *params = 0; i < shProg->data->NumProgramResourceList; i++) {
|
||||
if (shProg->data->ProgramResourceList[i].Type == programInterface) {
|
||||
struct gl_uniform_storage *uni =
|
||||
(struct gl_uniform_storage *)
|
||||
shProg->data->ProgramResourceList[i].Data;
|
||||
*params = MAX2(*params, uni->num_compatible_subroutines);
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
default:
|
||||
_mesa_error(ctx, GL_INVALID_OPERATION,
|
||||
"glGetProgramInterfaceiv(%s pname %s)",
|
||||
_mesa_enum_to_string(programInterface),
|
||||
_mesa_enum_to_string(pname));
|
||||
}
|
||||
break;
|
||||
default:
|
||||
_mesa_error(ctx, GL_INVALID_OPERATION,
|
||||
"glGetProgramInterfaceiv(pname %s)",
|
||||
_mesa_enum_to_string(pname));
|
||||
}
|
||||
_mesa_get_program_interfaceiv(shProg, programInterface, pname, params);
|
||||
}
|
||||
|
||||
static bool
|
||||
|
@@ -1668,6 +1668,135 @@ _mesa_get_program_resourceiv(struct gl_shader_program *shProg,
|
||||
*length = amount;
|
||||
}
|
||||
|
||||
extern void
|
||||
_mesa_get_program_interfaceiv(struct gl_shader_program *shProg,
|
||||
GLenum programInterface, GLenum pname,
|
||||
GLint *params)
|
||||
{
|
||||
GET_CURRENT_CONTEXT(ctx);
|
||||
unsigned i;
|
||||
|
||||
/* Validate pname against interface. */
|
||||
switch(pname) {
|
||||
case GL_ACTIVE_RESOURCES:
|
||||
for (i = 0, *params = 0; i < shProg->data->NumProgramResourceList; i++)
|
||||
if (shProg->data->ProgramResourceList[i].Type == programInterface)
|
||||
(*params)++;
|
||||
break;
|
||||
case GL_MAX_NAME_LENGTH:
|
||||
if (programInterface == GL_ATOMIC_COUNTER_BUFFER ||
|
||||
programInterface == GL_TRANSFORM_FEEDBACK_BUFFER) {
|
||||
_mesa_error(ctx, GL_INVALID_OPERATION,
|
||||
"glGetProgramInterfaceiv(%s pname %s)",
|
||||
_mesa_enum_to_string(programInterface),
|
||||
_mesa_enum_to_string(pname));
|
||||
return;
|
||||
}
|
||||
/* Name length consists of base name, 3 additional chars '[0]' if
|
||||
* resource is an array and finally 1 char for string terminator.
|
||||
*/
|
||||
for (i = 0, *params = 0; i < shProg->data->NumProgramResourceList; i++) {
|
||||
if (shProg->data->ProgramResourceList[i].Type != programInterface)
|
||||
continue;
|
||||
unsigned len =
|
||||
_mesa_program_resource_name_len(&shProg->data->ProgramResourceList[i]);
|
||||
*params = MAX2((unsigned)*params, len + 1);
|
||||
}
|
||||
break;
|
||||
case GL_MAX_NUM_ACTIVE_VARIABLES:
|
||||
switch (programInterface) {
|
||||
case GL_UNIFORM_BLOCK:
|
||||
for (i = 0, *params = 0; i < shProg->data->NumProgramResourceList; i++) {
|
||||
if (shProg->data->ProgramResourceList[i].Type == programInterface) {
|
||||
struct gl_uniform_block *block =
|
||||
(struct gl_uniform_block *)
|
||||
shProg->data->ProgramResourceList[i].Data;
|
||||
*params = MAX2((unsigned)*params, block->NumUniforms);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case GL_SHADER_STORAGE_BLOCK:
|
||||
for (i = 0, *params = 0; i < shProg->data->NumProgramResourceList; i++) {
|
||||
if (shProg->data->ProgramResourceList[i].Type == programInterface) {
|
||||
struct gl_uniform_block *block =
|
||||
(struct gl_uniform_block *)
|
||||
shProg->data->ProgramResourceList[i].Data;
|
||||
GLint block_params = 0;
|
||||
for (unsigned j = 0; j < block->NumUniforms; j++) {
|
||||
struct gl_program_resource *uni =
|
||||
_mesa_program_resource_find_active_variable(
|
||||
shProg,
|
||||
GL_BUFFER_VARIABLE,
|
||||
block,
|
||||
j);
|
||||
if (!uni)
|
||||
continue;
|
||||
block_params++;
|
||||
}
|
||||
*params = MAX2(*params, block_params);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case GL_ATOMIC_COUNTER_BUFFER:
|
||||
for (i = 0, *params = 0; i < shProg->data->NumProgramResourceList; i++) {
|
||||
if (shProg->data->ProgramResourceList[i].Type == programInterface) {
|
||||
struct gl_active_atomic_buffer *buffer =
|
||||
(struct gl_active_atomic_buffer *)
|
||||
shProg->data->ProgramResourceList[i].Data;
|
||||
*params = MAX2((unsigned)*params, buffer->NumUniforms);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case GL_TRANSFORM_FEEDBACK_BUFFER:
|
||||
for (i = 0, *params = 0; i < shProg->data->NumProgramResourceList; i++) {
|
||||
if (shProg->data->ProgramResourceList[i].Type == programInterface) {
|
||||
struct gl_transform_feedback_buffer *buffer =
|
||||
(struct gl_transform_feedback_buffer *)
|
||||
shProg->data->ProgramResourceList[i].Data;
|
||||
*params = MAX2((unsigned)*params, buffer->NumVaryings);
|
||||
}
|
||||
}
|
||||
break;
|
||||
default:
|
||||
_mesa_error(ctx, GL_INVALID_OPERATION,
|
||||
"glGetProgramInterfaceiv(%s pname %s)",
|
||||
_mesa_enum_to_string(programInterface),
|
||||
_mesa_enum_to_string(pname));
|
||||
}
|
||||
break;
|
||||
case GL_MAX_NUM_COMPATIBLE_SUBROUTINES:
|
||||
switch (programInterface) {
|
||||
case GL_VERTEX_SUBROUTINE_UNIFORM:
|
||||
case GL_FRAGMENT_SUBROUTINE_UNIFORM:
|
||||
case GL_GEOMETRY_SUBROUTINE_UNIFORM:
|
||||
case GL_COMPUTE_SUBROUTINE_UNIFORM:
|
||||
case GL_TESS_CONTROL_SUBROUTINE_UNIFORM:
|
||||
case GL_TESS_EVALUATION_SUBROUTINE_UNIFORM: {
|
||||
for (i = 0, *params = 0; i < shProg->data->NumProgramResourceList; i++) {
|
||||
if (shProg->data->ProgramResourceList[i].Type == programInterface) {
|
||||
struct gl_uniform_storage *uni =
|
||||
(struct gl_uniform_storage *)
|
||||
shProg->data->ProgramResourceList[i].Data;
|
||||
*params = MAX2((unsigned)*params, uni->num_compatible_subroutines);
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
default:
|
||||
_mesa_error(ctx, GL_INVALID_OPERATION,
|
||||
"glGetProgramInterfaceiv(%s pname %s)",
|
||||
_mesa_enum_to_string(programInterface),
|
||||
_mesa_enum_to_string(pname));
|
||||
}
|
||||
break;
|
||||
default:
|
||||
_mesa_error(ctx, GL_INVALID_OPERATION,
|
||||
"glGetProgramInterfaceiv(pname %s)",
|
||||
_mesa_enum_to_string(pname));
|
||||
}
|
||||
}
|
||||
|
||||
static bool
|
||||
validate_io(struct gl_program *producer, struct gl_program *consumer)
|
||||
{
|
||||
|
@@ -767,13 +767,8 @@ get_programiv(struct gl_context *ctx, GLuint program, GLenum pname,
|
||||
*params = _mesa_longest_attribute_name_length(shProg);
|
||||
return;
|
||||
case GL_ACTIVE_UNIFORMS: {
|
||||
unsigned i;
|
||||
const unsigned num_uniforms =
|
||||
shProg->data->NumUniformStorage - shProg->data->NumHiddenUniforms;
|
||||
for (*params = 0, i = 0; i < num_uniforms; i++) {
|
||||
if (!shProg->data->UniformStorage[i].is_shader_storage)
|
||||
(*params)++;
|
||||
}
|
||||
_mesa_get_program_interfaceiv(shProg, GL_UNIFORM, GL_ACTIVE_RESOURCES,
|
||||
params);
|
||||
return;
|
||||
}
|
||||
case GL_ACTIVE_UNIFORM_MAX_LENGTH: {
|
||||
|
@@ -334,6 +334,11 @@ _mesa_get_program_resourceiv(struct gl_shader_program *shProg,
|
||||
GLsizei bufSize, GLsizei *length,
|
||||
GLint *params);
|
||||
|
||||
extern void
|
||||
_mesa_get_program_interfaceiv(struct gl_shader_program *shProg,
|
||||
GLenum programInterface, GLenum pname,
|
||||
GLint *params);
|
||||
|
||||
extern void
|
||||
_mesa_create_program_resource_hash(struct gl_shader_program *shProg);
|
||||
|
||||
|
@@ -555,10 +555,9 @@ st_init_driver_flags(struct st_context *st)
|
||||
f->NewDepthClamp = ST_NEW_RASTERIZER;
|
||||
}
|
||||
|
||||
f->NewClipPlaneEnable = ST_NEW_RASTERIZER;
|
||||
if (st->lower_ucp)
|
||||
f->NewClipPlaneEnable = ST_NEW_VS_STATE | ST_NEW_GS_STATE;
|
||||
else
|
||||
f->NewClipPlaneEnable = ST_NEW_RASTERIZER;
|
||||
f->NewClipPlaneEnable |= ST_NEW_VS_STATE | ST_NEW_GS_STATE;
|
||||
|
||||
f->NewLineState = ST_NEW_RASTERIZER;
|
||||
f->NewPolygonState = ST_NEW_RASTERIZER;
|
||||
|
@@ -197,7 +197,7 @@ bi_is_sched_barrier(bi_instr *I)
|
||||
}
|
||||
|
||||
static void
|
||||
bi_create_dependency_graph(struct bi_worklist st, bool inorder)
|
||||
bi_create_dependency_graph(struct bi_worklist st, bool inorder, bool is_blend)
|
||||
{
|
||||
struct util_dynarray last_read[64], last_write[64];
|
||||
|
||||
@@ -262,6 +262,17 @@ bi_create_dependency_graph(struct bi_worklist st, bool inorder)
|
||||
}
|
||||
}
|
||||
|
||||
/* Blend shaders are allowed to clobber R0-R15. Treat these
|
||||
* registers like extra destinations for scheduling purposes.
|
||||
*/
|
||||
if (ins->op == BI_OPCODE_BLEND && !is_blend) {
|
||||
for (unsigned c = 0; c < 16; ++c) {
|
||||
add_dependency(last_read, c, i, st.dependents, st.dep_counts);
|
||||
add_dependency(last_write, c, i, st.dependents, st.dep_counts);
|
||||
mark_access(last_write, c, i);
|
||||
}
|
||||
}
|
||||
|
||||
bi_foreach_src(ins, s) {
|
||||
if (ins->src[s].type != BI_INDEX_REGISTER) continue;
|
||||
|
||||
@@ -414,7 +425,7 @@ bi_flatten_block(bi_block *block, unsigned *len)
|
||||
*/
|
||||
|
||||
static struct bi_worklist
|
||||
bi_initialize_worklist(bi_block *block, bool inorder)
|
||||
bi_initialize_worklist(bi_block *block, bool inorder, bool is_blend)
|
||||
{
|
||||
struct bi_worklist st = { };
|
||||
st.instructions = bi_flatten_block(block, &st.count);
|
||||
@@ -425,7 +436,7 @@ bi_initialize_worklist(bi_block *block, bool inorder)
|
||||
st.dependents = calloc(st.count, sizeof(st.dependents[0]));
|
||||
st.dep_counts = calloc(st.count, sizeof(st.dep_counts[0]));
|
||||
|
||||
bi_create_dependency_graph(st, inorder);
|
||||
bi_create_dependency_graph(st, inorder, is_blend);
|
||||
st.worklist = calloc(BITSET_WORDS(st.count), sizeof(BITSET_WORD));
|
||||
|
||||
for (unsigned i = 0; i < st.count; ++i) {
|
||||
@@ -1796,7 +1807,8 @@ bi_schedule_block(bi_context *ctx, bi_block *block)
|
||||
|
||||
/* Copy list to dynamic array */
|
||||
struct bi_worklist st = bi_initialize_worklist(block,
|
||||
bifrost_debug & BIFROST_DBG_INORDER);
|
||||
bifrost_debug & BIFROST_DBG_INORDER,
|
||||
ctx->inputs->is_blend);
|
||||
|
||||
if (!st.count) {
|
||||
bi_free_worklist(st);
|
||||
|
@@ -1154,7 +1154,6 @@ spec@!opengl 1.1@linestipple,Fail
|
||||
spec@!opengl 1.1@linestipple@Line loop,Fail
|
||||
spec@!opengl 1.1@linestipple@Line strip,Fail
|
||||
spec@!opengl 1.1@linestipple@Restarting lines within a single Begin-End block,Fail
|
||||
spec@!opengl 1.1@point-line-no-cull,Fail
|
||||
spec@!opengl 1.1@polygon-mode-facing,Fail
|
||||
spec@!opengl 1.1@polygon-mode,Fail
|
||||
spec@!opengl 1.1@polygon-mode-offset@config 0: Expected white pixel on bottom edge,Fail
|
||||
|
@@ -293,6 +293,11 @@ TODO: document the other workarounds.
|
||||
<option name="force_integer_tex_nearest" value="true" />
|
||||
</application>
|
||||
|
||||
<application name="DiRT Rally" executable="DirtRally">
|
||||
<!-- https://gitlab.freedesktop.org/mesa/mesa/-/issues/5648 -->
|
||||
<option name="vs_position_always_invariant" value="true" />
|
||||
</application>
|
||||
|
||||
<!-- Workarounds for SPECviewperf relying on invalid / non-conformant
|
||||
OpenGL behavior. Older SPECviewperf versions might also need this.
|
||||
-->
|
||||
|
@@ -46,6 +46,7 @@ class Application(object):
|
||||
self.cname = cname('application')
|
||||
self.name = xml.attrib['name']
|
||||
self.executable = xml.attrib.get('executable', None)
|
||||
self.executable_regexp = xml.attrib.get('executable_regexp', None)
|
||||
self.sha1 = xml.attrib.get('sha1', None)
|
||||
self.application_name_match = xml.attrib.get('application_name_match', None)
|
||||
self.application_versions = xml.attrib.get('application_versions', None)
|
||||
@@ -118,6 +119,7 @@ struct driconf_option {
|
||||
struct driconf_application {
|
||||
const char *name;
|
||||
const char *executable;
|
||||
const char *executable_regexp;
|
||||
const char *sha1;
|
||||
const char *application_name_match;
|
||||
const char *application_versions;
|
||||
@@ -179,6 +181,9 @@ static const struct driconf_application ${device.cname}_applications[] = {
|
||||
% if application.executable:
|
||||
.executable = "${application.executable}",
|
||||
% endif
|
||||
% if application.executable_regexp:
|
||||
.executable_regexp = "${application.executable_regexp}",
|
||||
% endif
|
||||
% if application.sha1:
|
||||
.sha1 = "${application.sha1}",
|
||||
% endif
|
||||
|
@@ -318,8 +318,12 @@ foz_prepare(struct foz_db *foz_db, char *cache_path)
|
||||
free(filename);
|
||||
free(idx_filename);
|
||||
|
||||
if (!check_files_opened_successfully(foz_db->file[file_idx], db_idx))
|
||||
if (!check_files_opened_successfully(foz_db->file[file_idx], db_idx)) {
|
||||
/* Prevent foz_destroy from destroying it a second time. */
|
||||
foz_db->file[file_idx] = NULL;
|
||||
|
||||
continue; /* Ignore invalid user provided filename and continue */
|
||||
}
|
||||
|
||||
if (!load_foz_dbs(foz_db, db_idx, file_idx, true)) {
|
||||
fclose(db_idx);
|
||||
|
@@ -1093,6 +1093,8 @@ parseStaticConfig(struct OptConfData *data)
|
||||
const char *appattr[] = {
|
||||
"name", a->name,
|
||||
"executable", a->executable,
|
||||
"executable_regexp", a->executable_regexp,
|
||||
"sha1", a->sha1,
|
||||
"application_name_match", a->application_name_match,
|
||||
"application_versions", a->application_versions,
|
||||
NULL
|
||||
|
@@ -2196,8 +2196,25 @@ vn_GetPhysicalDeviceImageFormatProperties2(
|
||||
if (result != VK_SUCCESS || !external_info)
|
||||
return vn_result(physical_dev->instance, result);
|
||||
|
||||
if (external_info->handleType ==
|
||||
VK_EXTERNAL_MEMORY_HANDLE_TYPE_ANDROID_HARDWARE_BUFFER_BIT_ANDROID) {
|
||||
VkAndroidHardwareBufferUsageANDROID *ahb_usage =
|
||||
vk_find_struct(pImageFormatProperties->pNext,
|
||||
ANDROID_HARDWARE_BUFFER_USAGE_ANDROID);
|
||||
if (ahb_usage) {
|
||||
ahb_usage->androidHardwareBufferUsage = vn_android_get_ahb_usage(
|
||||
pImageFormatInfo->usage, pImageFormatInfo->flags);
|
||||
}
|
||||
|
||||
/* AHBs with mipmap usage will ignore this property */
|
||||
pImageFormatProperties->imageFormatProperties.maxMipLevels = 1;
|
||||
}
|
||||
|
||||
VkExternalImageFormatProperties *img_props = vk_find_struct(
|
||||
pImageFormatProperties->pNext, EXTERNAL_IMAGE_FORMAT_PROPERTIES);
|
||||
if (!img_props)
|
||||
return VK_SUCCESS;
|
||||
|
||||
VkExternalMemoryProperties *mem_props =
|
||||
&img_props->externalMemoryProperties;
|
||||
|
||||
@@ -2217,17 +2234,6 @@ vn_GetPhysicalDeviceImageFormatProperties2(
|
||||
VK_EXTERNAL_MEMORY_HANDLE_TYPE_ANDROID_HARDWARE_BUFFER_BIT_ANDROID;
|
||||
mem_props->compatibleHandleTypes =
|
||||
VK_EXTERNAL_MEMORY_HANDLE_TYPE_ANDROID_HARDWARE_BUFFER_BIT_ANDROID;
|
||||
|
||||
VkAndroidHardwareBufferUsageANDROID *ahb_usage =
|
||||
vk_find_struct(pImageFormatProperties->pNext,
|
||||
ANDROID_HARDWARE_BUFFER_USAGE_ANDROID);
|
||||
if (ahb_usage) {
|
||||
ahb_usage->androidHardwareBufferUsage = vn_android_get_ahb_usage(
|
||||
pImageFormatInfo->usage, pImageFormatInfo->flags);
|
||||
}
|
||||
|
||||
/* AHBs with mipmap usage will ignore this property */
|
||||
pImageFormatProperties->imageFormatProperties.maxMipLevels = 1;
|
||||
} else {
|
||||
mem_props->compatibleHandleTypes = supported_handle_types;
|
||||
mem_props->exportFromImportedHandleTypes =
|
||||
@@ -2236,7 +2242,7 @@ vn_GetPhysicalDeviceImageFormatProperties2(
|
||||
: 0;
|
||||
}
|
||||
|
||||
return vn_result(physical_dev->instance, result);
|
||||
return VK_SUCCESS;
|
||||
}
|
||||
|
||||
void
|
||||
|
@@ -78,8 +78,9 @@ C_TEMPLATE = Template(textwrap.dedent(u"""\
|
||||
case ${v}:
|
||||
return "${enum.values[v]}";
|
||||
% endfor
|
||||
case ${enum.max_enum_name}: return "${enum.max_enum_name}";
|
||||
default:
|
||||
unreachable("Undefined enum value.");
|
||||
return "Unknown ${enum.name} value.";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -116,7 +117,7 @@ C_TEMPLATE = Template(textwrap.dedent(u"""\
|
||||
return "${object_types[0].enum_to_name[object_type]}";
|
||||
% endfor
|
||||
default:
|
||||
unreachable("Undefined enum value.");
|
||||
return "Unknown VkObjectType value.";
|
||||
}
|
||||
}
|
||||
"""))
|
||||
@@ -246,12 +247,24 @@ class VkExtension(object):
|
||||
def CamelCase_to_SHOUT_CASE(s):
|
||||
return (s[:1] + re.sub(r'(?<![A-Z])([A-Z])', r'_\1', s[1:])).upper()
|
||||
|
||||
def compute_max_enum_name(s):
|
||||
max_enum_name = CamelCase_to_SHOUT_CASE(s)
|
||||
last_prefix = max_enum_name.rsplit('_', 1)[-1]
|
||||
# Those special prefixes need to be always at the end
|
||||
if last_prefix in ['AMD', 'EXT', 'INTEL', 'KHR', 'NV'] :
|
||||
max_enum_name = "_".join(max_enum_name.split('_')[:-1])
|
||||
max_enum_name = max_enum_name + "_MAX_ENUM_" + last_prefix
|
||||
else:
|
||||
max_enum_name = max_enum_name + "_MAX_ENUM"
|
||||
|
||||
return max_enum_name
|
||||
|
||||
class VkEnum(object):
|
||||
"""Simple struct-like class representing a single Vulkan Enum."""
|
||||
|
||||
def __init__(self, name, bitwidth=32, values=None):
|
||||
self.name = name
|
||||
self.max_enum_name = compute_max_enum_name(name)
|
||||
self.bitwidth = bitwidth
|
||||
self.extension = None
|
||||
# Maps numbers to names
|
||||
|
Reference in New Issue
Block a user